forked from ankitects/anki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (31 loc) · 1.41 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
PREFIX=/usr
all:
@echo "You can run Anki with ./runanki"
@echo "If you wish to install it system wide, type 'sudo make install'"
@echo "Uninstall with 'sudo make uninstall'"
install:
rm -rf ${DESTDIR}${PREFIX}/share/anki
mkdir -p ${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
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 LICENSE.logo
-xdg-mime install anki.xml --novendor
-xdg-mime default anki.desktop application/x-anki
-xdg-mime default anki.desktop application/x-apkg
@echo
@echo "Install complete."
uninstall:
rm -rf ${DESTDIR}${PREFIX}/share/anki
rm -rf ${DESTDIR}${PREFIX}/bin/anki
rm -rf ${DESTDIR}${PREFIX}/share/pixmaps/anki.xpm
rm -rf ${DESTDIR}${PREFIX}/share/pixmaps/anki.png
rm -rf ${DESTDIR}${PREFIX}/share/applications/anki.desktop
rm -rf ${DESTDIR}${PREFIX}/share/man/man1/anki.1
-xdg-mime uninstall ${DESTDIR}${PREFIX}/share/mime/packages/anki.xml
@echo
@echo "Uninstall complete."