runanki.system: fix prefix at install time

Currently the Makefile lets you choose your own PREFIX, but
the installed runanki.system always hardcodes the prefix as /usr.

Fix runanki.system at install time to install into the designated
PREFIX.
This commit is contained in:
Daniel Drake 2018-02-24 11:03:05 +03:00
parent 56e1643bfa
commit 4cee3807ff
3 changed files with 4 additions and 1 deletions

1
.gitignore vendored
View file

@ -7,3 +7,4 @@
aqt/forms
locale
.idea
tools/runanki.system

View file

@ -9,6 +9,8 @@ install:
rm -rf ${DESTDIR}${PREFIX}/share/anki
mkdir -p ${DESTDIR}${PREFIX}/share/anki
cp -av * ${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}/local/bin/anki;\
test -d ${DESTDIR}${PREFIX}/share/pixmaps &&\

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python3
import sys
sys.path.append("/usr/share/anki")
sys.path.append("@PREFIX@/share/anki")
import aqt
aqt.run()