mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Makefile: only install required files
The previous Makefile is doing "cp *" and hence installing uninteresting files like the Makefile itself. Copy only the application-relevant files, and switch to using install for some of this where we can automatically create parent directories if required, solving issues when installing into an empty root. locale installation is optional; as before, locale files will be installed if they are present, but installation can also proceed without them.
This commit is contained in:
parent
08234805e0
commit
87e9effc84
1 changed files with 7 additions and 8 deletions
15
Makefile
15
Makefile
|
@ -8,15 +8,14 @@ all:
|
|||
install:
|
||||
rm -rf ${DESTDIR}${PREFIX}/share/anki
|
||||
mkdir -p ${DESTDIR}${PREFIX}/share/anki
|
||||
cp -av * ${DESTDIR}${PREFIX}/share/anki/
|
||||
cp -av anki aqt web ${DESTDIR}${PREFIX}/share/anki/
|
||||
-cp -av locale ${DESTDIR}${PREFIX}/share/anki/
|
||||
sed -e 's:@PREFIX@:${PREFIX}:' tools/runanki.system.in > tools/runanki.system
|
||||
chmod 755 tools/runanki.system
|
||||
cd ${DESTDIR}${PREFIX}/share/anki && (\
|
||||
mv tools/runanki.system ${DESTDIR}${PREFIX}/bin/anki;\
|
||||
test -d ${DESTDIR}${PREFIX}/share/pixmaps &&\
|
||||
mv anki.xpm anki.png ${DESTDIR}${PREFIX}/share/pixmaps/;\
|
||||
mv anki.desktop ${DESTDIR}${PREFIX}/share/applications;\
|
||||
mv anki.1 ${DESTDIR}${PREFIX}/share/man/man1/)
|
||||
install -m 0755 -D tools/runanki.system ${DESTDIR}${PREFIX}/bin/anki
|
||||
install -m 0644 -D -t ${DESTDIR}${PREFIX}/share/pixmaps anki.xpm anki.png
|
||||
install -m 0644 -D -t ${DESTDIR}${PREFIX}/share/applications anki.desktop
|
||||
install -m 0644 -D -t ${DESTDIR}${PREFIX}/share/man/man1 anki.1
|
||||
install -m 0644 -D -t ${DESTDIR}${PREFIX}/share/doc/anki README.contributing README.development README.md LICENSE
|
||||
xdg-mime install anki.xml --novendor
|
||||
xdg-mime default anki.desktop application/x-anki
|
||||
xdg-mime default anki.desktop application/x-apkg
|
||||
|
|
Loading…
Reference in a new issue