OSDN Git Service

fix instaration error.
[rec10/rec10-git.git] / rec10 / trunk / src / Makefile.base
1 PREFIX = /usr/local/share
2 MAJOR = 0
3 MINOR = 9
4 REVISION = 10
5 VER = $(MAJOR).$(MINOR).$(REVISION)
6
7 DEST = $(PREFIX)/rec10
8
9 install:
10         if ! [ -d $(PREFIX)/rec10 ]; then mkdir -p $(PREFIX)/rec10 ;fi
11         cp ./*.py $(DEST)/
12         echo -e "#!/bin/bash" > ./rec10
13         echo -e "if type -P python2.6 > /dev/null\nthen\nexport LANG=\"ja_JP.UTF-8\" && python2.6 ${DEST}/rec10d.py" >> ./rec10
14         echo -e "elif type -P python26 > /dev/null\nthen\nexport LANG=\"ja_JP.UTF-8\" && python26 ${DEST}/rec10d.py\n" >> ./rec10
15         echo -e "elif type -P python2.5 > /dev/null\nthen\nexport LANG=\"ja_JP.UTF-8\" && python2.5 ${DEST}/rec10d.py\n" >> ./rec10
16         echo -e "elif type -P python25 > /dev/null\nthen\nexport LANG=\"ja_JP.UTF-8\" && python25 ${DEST}/rec10d.py" >> ./rec10
17         echo -e "elif type -P python2.7 > /dev/null\nthen\nexport LANG=\"ja_JP.UTF-8\" && python2.7 ${DEST}/rec10d.py" >> ./rec10
18         echo -e "elif type -P python27 > /dev/null\nthen\nexport LANG=\"ja_JP.UTF-8\" && python27 ${DEST}/rec10d.py" >> ./rec10
19         echo -e "fi\n" >> ./rec10
20         install -m755 ./rec10 $(DEST)/
21         if ! [ -f /usr/local/bin/rec10 ]; then ln $(DEST)/rec10 /usr/local/bin;fi
22         chmod 755 /usr/local/bin/rec10
23         if [ -f /etc/rec10.conf ]; then rm /etc/rec10.conf;fi
24         cp ./rec10.conf /etc/rec10.conf
25         if ! [ -d /tmp/rec10 ]; then mkdir -p /tmp/rec10 ;fi
26         chmod 777 /tmp/rec10
27         if ! [ -d /var/log/rec10 ]; then echo "" > /var/log/rec10 ;fi
28         chmod 777 /var/log/rec10
29 uninstall:
30         rm -rf $(DEST)
31         rm -rf /tmp/rec10
32         rm -f /usr/local/bin/rec10