wok view childsplay-plugins/stuff/install.sh.patch @ rev 3590
tazbb: Add tazbbmail (Python mailer for unbuilt pkgs)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sun Jun 28 01:50:53 2009 +0200 (2009-06-28) |
parents | |
children |
line source
1 --- childsplay_plugins-0.90/install.sh.orig Sat Aug 25 07:53:40 2007
2 +++ childsplay_plugins-0.90/install.sh Thu Jun 11 18:19:32 2009
3 @@ -8,8 +8,18 @@
4 # However, you can change the "prefix" to "/usr" and childsplay will still
5 # work. Set it to anything else and your on your own.
7 -PREFIX=/usr/local
9 +PKG_PREFIX=$PWD/_pkg/usr
10 +PREFIX=/usr
11 +
12 +# Create directories to install the package
13 +mkdir -p $PKG_PREFIX/bin
14 +mkdir -p $PKG_PREFIX/lib/games/childsplay/lib
15 +mkdir -p $PKG_PREFIX/share/assetml
16 +mkdir -p $PKG_PREFIX/share/childsplay/Data/icons
17 +mkdir -p $PKG_PREFIX/share/childsplay/lib
18 +
19 +
20 #################################################################
21 # DON'T EDIT BEHIND THIS POINT
22 #################################################################
23 @@ -20,7 +30,7 @@
25 LOCALEDIR=$PREFIX/share/locale
26 MTDIR=$PREFIX/bin
27 -ASSETMLDIR=/usr/share/assetml
28 +ASSETMLDIR=$PREFIX/share/assetml
29 PYTHON=`which python`
30 SCOREDIR=/var/games
31 DOCDIR=$PREFIX/share/doc/childsplay
32 @@ -31,10 +41,22 @@
33 SHARELIBDATADIR=$SHAREDIR/lib
34 SHAREDATADIR=$SHAREDIR/Data
36 +# package directories
37 +PKG_MTDIR=$PKG_PREFIX/bin
38 +PKG_LOCALEDIR=$PKG_PREFIX/share/locale
39 +PKG_ASSETMLDIR=$PKG_PREFIX/share/assetml
40 +PKG_CPDIR=$PKG_PREFIX/lib/games/childsplay
41 +PKG_SHAREDIR=$PKG_PREFIX/share/childsplay
42 +PKG_SHARELIBDATADIR=$PKG_SHAREDIR/lib
43 +PKG_SHAREDATADIR=$PKG_SHAREDIR/Data
44 +
45 +# copy the score file to the PKG_SHAREDATADIR
46 +cp $SHAREDATADIR/childsplay.score $PKG_SHAREDATADIR
47 +
48 ##################################################
49 # Package text to be displayed as last step
50 # 0 = no readmes to display, 1 = there are readmes
51 -README=1
52 +README=0
53 # if README=1 then READMES=names of readmes in CWD
54 # like this READMES="README README2 README3"
55 READMES="README README-PACKID README.MT_users2csv"
56 @@ -55,8 +77,8 @@
57 echo -e "\n>>>>>>>>>>> Install childsplay plugins >>>>>>>>>>>>>>>>>>>>"
58 echo -e "\n This release depends on childsplay version >= $DEPEN"
59 echo -n " Checking, version = "
60 -#CP=`which childsplay`
61 -CP=$BINDIR/childsplay
62 +CP=`which childsplay`
63 +#CP=$BINDIR/childsplay
64 VERSION=$($CP --version)
65 echo $VERSION
67 @@ -76,22 +98,22 @@
69 set -e
71 -echo -e "\n The path to install the plugins in is $CPDIR."
72 -echo " If you have installed childsplay in a other place, you can"
73 -echo " give the full path to childsplay, otherwise just hit enter"
74 -echo " Hit enter to install in $CPDIR, or give the full path"
75 -read path
76 -if [ $path ];then
77 - if [ -e $path/install.py ];then
78 - CPDIR=path
79 - else
80 - echo "*********** WARNING *************"
81 - echo " $path does not exists or is not the childsplay directory"
82 - echo " exit"
83 - exit 1
84 - fi
85 -fi
86 -echo " Installing in $CPDIR"
87 +# echo -e "\n The path to install the plugins in is $CPDIR."
88 +# echo " If you have installed childsplay in a other place, you can"
89 +# echo " give the full path to childsplay, otherwise just hit enter"
90 +# echo " Hit enter to install in $CPDIR, or give the full path"
91 +# read path
92 +# if [ $path ];then
93 +# if [ -e $path/install.py ];then
94 +# CPDIR=path
95 +# else
96 +# echo "*********** WARNING *************"
97 +# echo " $path does not exists or is not the childsplay directory"
98 +# echo " exit"
99 +# exit 1
100 +# fi
101 +# fi
102 +# echo " Installing in $CPDIR"
104 echo "Compiling modules to bytecode..."
105 $PYTHON $CPDIR/install.py --compile $CWD/lib
106 @@ -100,33 +122,33 @@
107 for DIR in `ls $CWD/lib`
108 do
109 if [ -d $CWD/lib/$DIR ]
110 - then cp -rf $CWD/lib/$DIR $SHARELIBDATADIR
111 - else cp -f $CWD/lib/$DIR $CPDIR/lib
112 + then cp -rf $CWD/lib/$DIR $PKG_SHARELIBDATADIR
113 + else cp -f $CWD/lib/$DIR $PKG_CPDIR/lib
114 fi
115 done
117 echo " Copy misc. data files"
118 -cp -rf $CWD/Data/*.icon.png $SHAREDATADIR/icons/
119 -cp -rf $CWD/Data/AlphabetSounds $SHAREDATADIR/
120 +cp -rf $CWD/Data/*.icon.png $PKG_SHAREDATADIR/icons/
121 +cp -rf $CWD/Data/AlphabetSounds $PKG_SHAREDATADIR/
123 echo " Copy assetml files"
124 -cp -rf $CWD/assetml/* $ASSETMLDIR
125 +cp -rf $CWD/assetml/* $PKG_ASSETMLDIR
127 -echo " Copy README's to the childsplay doc directory"
128 -for name in $READMES;do
129 - cp -f $CWD/$name $DOCDIR/$name
130 -done
131 +# echo " Copy README's to the childsplay doc directory"
132 +# for name in $READMES;do
133 +# cp -f $CWD/$name $DOCDIR/$name
134 +# done
136 echo -e "\n Trying to add $SCORE to the childsplay score sheet"
137 echo " Start add-score.py"
138 -$PYTHON $CWD/add-score.py $SHAREDATADIR $SCORE
139 +$PYTHON $CWD/add-score.py $PKG_SHAREDATADIR $SCORE
141 echo -e "\n Installing MT_users2cvs.py"
142 echo " Look at the file called README.MT_users2csv for info on how"
143 echo " to use it. It usage is intended for teachers who want to an"
144 echo " users resume of the multiplication tables users."
145 -cp -f $CWD/MT_users2csv.py $MTDIR/MT_users2csv.py
146 -chmod a+x $MTDIR/MT_users2csv.py
147 +cp -f $CWD/MT_users2csv.py $PKG_MTDIR/MT_users2csv.py
148 +chmod a+x $PKG_MTDIR/MT_users2csv.py
150 echo -e "\n Everything installed, enjoy\n"
151 echo -e "\n***************** IMPORTANT *************************"
152 @@ -135,20 +157,20 @@
153 echo "BUG REPORTS ARE THE MOST IMPORTANT THINGS YOU CAN DO"
154 echo ""
156 -if [ $README == 1 ];then
157 - echo " Read the README's (if any) that came with these packages,"
158 - echo " they contains directions on how to translate some"
159 - echo " text files used by the games in your own language"
160 - echo -e "\nHit any key to read the readme(s), enter to quit"
161 - read key
162 - if [ $key ];then
163 - for name in $READMES;do
164 - cat $name >> chplREADMEScat
165 - done
166 - `which more` chplREADMEScat
167 - rm chplREADMEScat
168 - fi
169 -fi
170 +# if [ $README == 1 ];then
171 +# echo " Read the README's (if any) that came with these packages,"
172 +# echo " they contains directions on how to translate some"
173 +# echo " text files used by the games in your own language"
174 +# echo -e "\nHit any key to read the readme(s), enter to quit"
175 +# read key
176 +# if [ $key ];then
177 +# for name in $READMES;do
178 +# cat $name >> chplREADMEScat
179 +# done
180 +# `which more` chplREADMEScat
181 +# rm chplREADMEScat
182 +# fi
183 +# fi
185 echo ""
186 echo "***********************************************************************"