rev |
line source |
pankso@1
|
1 #!/bin/sh
|
pankso@1
|
2 #
|
pankso@1
|
3 # Cook - A tool to cook and generate SliTaz packages. Read the README
|
pankso@1
|
4 # before adding or modifing any code in cook!
|
pankso@1
|
5 #
|
pankso@1
|
6 # Copyright (C) SliTaz GNU/Linux - GNU gpl v3
|
pankso@1
|
7 # Author: Christophe Lincoln <pankso@slitaz.org>
|
pankso@1
|
8 #
|
pankso@1
|
9
|
pankso@1
|
10 [ -f "/etc/slitaz/cook.conf" ] && . /etc/slitaz/cook.conf
|
pankso@1
|
11 [ -f "cook.conf" ] && . ./cook.conf
|
pankso@1
|
12
|
pankso@16
|
13 # Share DB and status with the Cooker.
|
pankso@9
|
14 activity="$CACHE/activity"
|
pankso@16
|
15 command="$CACHE/command"
|
pankso@11
|
16 broken="$CACHE/broken"
|
pankso@47
|
17 blocked="$CACHE/blocked"
|
pankso@9
|
18
|
pankso@1
|
19 #
|
pankso@1
|
20 # Functions
|
pankso@1
|
21 #
|
pankso@1
|
22
|
pankso@1
|
23 usage() {
|
pankso@1
|
24 cat << EOT
|
pankso@1
|
25
|
pankso@1
|
26 $(echo -e "\033[1m$(gettext "Usage:")\033[0m") cook [package|command|list] [--option]
|
pankso@1
|
27
|
pankso@1
|
28 $(echo -e "\033[1m$(gettext "Commands:")\033[0m")
|
pankso@1
|
29 usage|help $(gettext "Display this short usage.")
|
pankso@1
|
30 list-wok $(gettext "List packages in the wok.")
|
pankso@1
|
31 setup $(gettext "Setup your build environment.")
|
pankso@9
|
32 test $(gettext "Test environment and cook a package.")
|
paul@62
|
33 new $(gettext "Create a new package with a receipt".)
|
pankso@1
|
34 list $(gettext "Cook a list of packages.")
|
pankso@1
|
35 clean-wok $(gettext "Clean-up all packages files.")
|
paul@62
|
36 clean-src $(gettext "Clean-up all packages sources.")
|
pankso@1
|
37 pkglist $(gettext "Create all packages.* lists.")
|
pankso@1
|
38
|
pankso@1
|
39 $(echo -e "\033[1m$(gettext "Options:")\033[0m")
|
pankso@10
|
40 --clean|-c Cook : $(gettext "clean the package in the wok.")
|
pankso@39
|
41 --install|-i Cook : $(gettext "cook and install the package.")
|
pankso@39
|
42 --getsrc|-gs Cook : $(gettext "get the package source tarball.")
|
pankso@49
|
43 --block|-b Cook : $(gettext "Block a package so cook will skip it.")
|
pankso@49
|
44 --unblock|-ub Cook : $(gettext "Unblock a blocked package.")
|
pankso@10
|
45 --wok|-w Setup: $(gettext "create also a wok from Hg repo.")
|
pankso@1
|
46
|
pankso@1
|
47 EOT
|
pankso@1
|
48 exit 0
|
pankso@1
|
49 }
|
pankso@1
|
50
|
paul@62
|
51 # Be sure we're root.
|
pankso@1
|
52 check_root() {
|
pankso@1
|
53 [ $(id -u) != 0 ] && gettext -e "\nYou must be root to cook.\n\n" && exit 0
|
pankso@1
|
54 }
|
pankso@1
|
55
|
pankso@1
|
56 separator() {
|
pankso@1
|
57 echo "================================================================================"
|
pankso@1
|
58 }
|
pankso@1
|
59
|
pankso@1
|
60 status() {
|
pankso@1
|
61 echo -en "\\033[70G[ "
|
pankso@1
|
62 if [ $? = 0 ]; then
|
pankso@1
|
63 echo -en "\\033[1;32mOK"
|
pankso@1
|
64 else
|
pankso@1
|
65 echo -en "\\033[1;31mFailed"
|
pankso@1
|
66 fi
|
pankso@1
|
67 echo -e "\\033[0;39m ]"
|
pankso@1
|
68 }
|
pankso@1
|
69
|
pankso@13
|
70 # Log activities, we want first letter capitalized.
|
pankso@9
|
71 log() {
|
pankso@27
|
72 grep ^[A-Z] | \
|
pankso@9
|
73 sed s"#^[A-Z]\([^']*\)#$(date '+%Y-%m-%d %H:%M') : \0#" >> $activity
|
pankso@9
|
74 }
|
pankso@9
|
75
|
paul@62
|
76 # We don't want these escapes in web interface.
|
pankso@1
|
77 clean_log() {
|
pankso@1
|
78 sed -i -e s'|\[70G\[ \[1;32m| |' \
|
pankso@1
|
79 -e s'|\[0;39m \]||' $LOGS/$pkg.log
|
pankso@1
|
80 }
|
pankso@1
|
81
|
pankso@23
|
82 # Log broken packages.
|
pankso@23
|
83 broken() {
|
pankso@23
|
84 echo "$pkg" >> $broken
|
pankso@23
|
85 }
|
pankso@23
|
86
|
paul@62
|
87 # Be sure package exists in wok.
|
pankso@1
|
88 check_pkg_in_wok() {
|
pankso@1
|
89 if [ ! -d "$WOK/$pkg" ]; then
|
pankso@1
|
90 gettext -e "\nUnable to find package in the wok:"
|
pankso@1
|
91 echo -e " $pkg\n" && exit 1
|
pankso@1
|
92 fi
|
pankso@1
|
93 }
|
pankso@1
|
94
|
pankso@9
|
95 if_empty_value() {
|
pankso@9
|
96 if [ -z "$value" ]; then
|
pankso@9
|
97 gettext "QA: empty variable:"; echo -e " ${var}=\"\"\n"
|
pankso@9
|
98 exit 1
|
pankso@9
|
99 fi
|
pankso@9
|
100 }
|
pankso@9
|
101
|
paul@62
|
102 # Initialize files used in $CACHE
|
pankso@52
|
103 init_db_files() {
|
pankso@52
|
104 gettext "Creating directories structure in:"; echo " $SLITAZ"
|
pankso@52
|
105 mkdir -p $WOK $PKGS $SRC $CACHE $LOGS
|
pankso@52
|
106 gettext "Creating DB files in:"; echo " $CACHE"
|
pankso@52
|
107 for f in $activity $command $broken $blocked
|
pankso@52
|
108 do
|
pankso@52
|
109 touch $f
|
pankso@52
|
110 done
|
pankso@52
|
111 }
|
pankso@52
|
112
|
paul@62
|
113 # QA: check a receipt consistency before building.
|
pankso@9
|
114 receipt_quality() {
|
pankso@9
|
115 gettext -e "QA: checking package receipt...\n"
|
pankso@9
|
116 unset online
|
pankso@9
|
117 if ifconfig | grep -q -A 1 "^[a-z]*[0-9]" | fgrep 'addr:'; then
|
pankso@9
|
118 online="online"
|
pankso@9
|
119 fi
|
pankso@9
|
120 for var in PACKAGE VERSION CATEGORY SHORT_DESC MAINTAINER WEB_SITE
|
pankso@9
|
121 do
|
pankso@9
|
122 unset value
|
pankso@44
|
123 value=$(grep ^$var= $receipt | cut -d \" -f 2)
|
pankso@9
|
124 case "$var" in
|
pankso@9
|
125 PACKAGE|VERSION|SHORT_DESC)
|
pankso@9
|
126 if_empty_value ;;
|
pankso@9
|
127 CATEGORY)
|
pankso@9
|
128 [ -z "$value" ] && value="empty"
|
pankso@9
|
129 valid="base-system x-window utilities network graphics \
|
pankso@9
|
130 multimedia office development system-tools security games \
|
pankso@9
|
131 misc meta non-free"
|
pankso@9
|
132 if ! echo "$valid" | grep -q -w "$value"; then
|
paul@62
|
133 gettext "QA: unknown category:"; echo -e " $value\n"
|
pankso@9
|
134 exit 1
|
pankso@9
|
135 fi ;;
|
pankso@9
|
136 WEB_SITE)
|
paul@62
|
137 # We don't check WGET_URL since if dl is needed it will fail.
|
paul@62
|
138 # Break also if we're not online. Here error is not fatal.
|
pankso@9
|
139 if_empty_value
|
pankso@9
|
140 [ -z "$online" ] || break
|
pankso@9
|
141 if ! busybox wget -s $value 2>/dev/null; then
|
pankso@61
|
142 gettext "QA: Unable to reach:"; echo -e " $value"
|
pankso@9
|
143 fi ;;
|
pankso@9
|
144 esac
|
pankso@9
|
145 done
|
pankso@9
|
146 }
|
pankso@9
|
147
|
pankso@9
|
148 # Executed before sourcing a receipt.
|
pankso@9
|
149 unset_receipt() {
|
pankso@9
|
150 unset DEPENDS BUILD_DEPENDS WANTED EXTRAVERSION WGET_URL PROVIDE TARBALL
|
pankso@9
|
151 }
|
pankso@9
|
152
|
paul@62
|
153 # Paths used in receipt and by cook itself.
|
pankso@1
|
154 set_paths() {
|
pankso@1
|
155 pkgdir=$WOK/$PACKAGE
|
pankso@1
|
156 src=$pkgdir/source/$PACKAGE-$VERSION
|
pankso@44
|
157 taz=$pkgdir/taz
|
pankso@44
|
158 pack=$taz/$PACKAGE-${VERSION}${EXTRAVERSION}
|
pankso@1
|
159 fs=$pack/fs
|
pankso@1
|
160 stuff=$pkgdir/stuff
|
pankso@1
|
161 install=$pkgdir/install
|
pankso@1
|
162 if [ "$WANTED" ]; then
|
pankso@1
|
163 src=$WOK/$WANTED/source/$WANTED-$VERSION
|
pankso@1
|
164 install=$WOK/$WANTED/install
|
pankso@1
|
165 fi
|
pankso@9
|
166 # Old way compatibility.
|
pankso@1
|
167 _pkg=$install
|
pankso@1
|
168 }
|
pankso@1
|
169
|
pankso@9
|
170 # Get package source.
|
pankso@1
|
171 get_source() {
|
pankso@9
|
172 case "$WGET_URL" in
|
pankso@9
|
173 http://*|ftp://*)
|
pankso@9
|
174 # Busybox Wget is better!
|
pankso@15
|
175 busybox wget -c -P $SRC $WGET_URL || \
|
pankso@15
|
176 (echo -e "ERROR: wget $WGET_URL" && exit 1) ;;
|
pankso@9
|
177 hg*|mercurial*)
|
pankso@9
|
178 # We are in cache so clone here and create a tarball
|
pankso@29
|
179 if $(echo "$WGET_URL" | fgrep -q "hg|"); then
|
pankso@9
|
180 url=${WGET_URL#hg|}
|
pankso@9
|
181 else
|
pankso@9
|
182 url=${WGET_URL#mercurial|}
|
pankso@9
|
183 fi
|
pankso@10
|
184 pkgsrc=${SOURCE:-$PACKAGE}-$VERSION
|
pankso@9
|
185 tarball=$pkgsrc.tar.bz2
|
pankso@61
|
186 gettext -e "Getting source from Hg...\n"
|
pankso@61
|
187 echo "URL: $url"
|
pankso@9
|
188 gettext "Cloning to: "; echo "$pwd/$pkgsrc"
|
pankso@15
|
189 hg clone $url $pkgsrc || (echo "ERROR: hg clone $url" && exit 1)
|
pankso@9
|
190 gettext "Creating tarball: "; echo "$tarball"
|
pankso@9
|
191 tar cjf $tarball $pkgsrc || exit 1
|
pankso@9
|
192 mv $tarball $SRC && rm -rf $pkgsrc ;;
|
pankso@9
|
193 git*)
|
pankso@61
|
194 url=${WGET_URL#git|}
|
pankso@61
|
195 pkgsrc=${SOURCE:-$PACKAGE}-$VERSION
|
pankso@61
|
196 tarball=$pkgsrc.tar.bz2
|
pankso@61
|
197 gettext -e "Getting source from Git...\n"
|
pankso@61
|
198 echo "URL: $url"
|
pankso@64
|
199 git clone $url $pkgsrc || (echo "ERROR: git clone $url" && exit 1)
|
pankso@63
|
200 if [ "$BRANCH" ]; then
|
pankso@64
|
201 cd $pkgsrc && git checkout $BRANCH && cd ..
|
pankso@63
|
202 fi
|
pankso@61
|
203 gettext "Creating tarball: "; echo "$tarball"
|
pankso@61
|
204 tar cjf $tarball $pkgsrc || exit 1
|
pankso@61
|
205 mv $tarball $SRC && rm -rf $pkgsrc ;;
|
pankso@9
|
206 svn*)
|
pankso@9
|
207 echo "TODO: svn implementation in cook" && exit 1 ;;
|
pankso@9
|
208 *)
|
pankso@9
|
209 gettext -e "\nERROR: Unable to handle:"; echo -e " $WGET_URL \n" | \
|
pankso@9
|
210 tee -a $LOGS/$PACKAGE.log
|
pankso@9
|
211 exit 1 ;;
|
pankso@9
|
212 esac
|
pankso@1
|
213 }
|
pankso@1
|
214
|
pankso@9
|
215 # Extract source package.
|
pankso@1
|
216 extract_source() {
|
pankso@1
|
217 gettext "Extracting:"; echo " $TARBALL"
|
pankso@1
|
218 case "$TARBALL" in
|
pankso@1
|
219 *.tar.gz|*.tgz) tar xzf $SRC/$TARBALL ;;
|
pankso@42
|
220 *.tar.bz2|*.tbz) tar xjf $SRC/$TARBALL ;;
|
pankso@1
|
221 *.tar.lzma) tar xaf $SRC/$TARBALL ;;
|
pankso@42
|
222 *.tar) tar xf $SRC/$TARBALL ;;
|
pankso@42
|
223 *.zip|*.xpi) unzip -o $SRC/$TARBALL ;;
|
pankso@42
|
224 *.xz) unxz -c $SRC/$TARBALL | tar xf - ;;
|
pankso@42
|
225 *.Z) uncompress -c $SRC/$TARBALL | tar xf - ;;
|
pankso@42
|
226 *.rpm) rpm2cpio $SRC/$TARBALL | cpio -idm --quiet ;;
|
pankso@1
|
227 esac
|
pankso@1
|
228 }
|
pankso@1
|
229
|
pankso@9
|
230 # Display cooked package summary.
|
pankso@1
|
231 summary() {
|
pankso@1
|
232 cd $WOK/$pkg
|
pankso@1
|
233 [ -d install ] && prod=$(du -sh install | awk '{print $1}' 2>/dev/null)
|
pankso@1
|
234 fs=$(du -sh taz/* | awk '{print $1}')
|
pankso@44
|
235 size=$(du -sh $PKGS/$pkg-${VERSION}*.tazpkg | awk '{print $1}')
|
pankso@44
|
236 files=$(cat taz/$pkg-*/files.list | wc -l)
|
pankso@18
|
237 cookdate=$(date "+%Y-%m-%d %H:%M")
|
pankso@1
|
238 gettext "Summary for:"; echo " $PACKAGE $VERSION"
|
pankso@1
|
239 separator
|
pankso@67
|
240 [ "$prod" ] && echo "Produced : $prod"
|
pankso@1
|
241 cat << EOT
|
pankso@1
|
242 Packed : $fs
|
pankso@1
|
243 Compressed : $size
|
pankso@18
|
244 Files : $files
|
pankso@9
|
245 Cook time : ${time}s
|
pankso@18
|
246 Cook date : $cookdate
|
pankso@1
|
247 $(separator)
|
pankso@1
|
248 EOT
|
pankso@1
|
249 }
|
pankso@1
|
250
|
paul@62
|
251 # Display debugging error info.
|
pankso@15
|
252 debug_info() {
|
pankso@17
|
253 echo -e "\nDebug information"
|
pankso@15
|
254 separator
|
pankso@48
|
255 echo "Cook date: $(date '+%Y-%m-%d %H:%M')"
|
pankso@56
|
256 for error in ERROR "No package" "cp: can't" "can't open" "can't cd"
|
pankso@34
|
257 do
|
pankso@34
|
258 fgrep "$error" $LOGS/$pkg.log
|
pankso@34
|
259 done
|
pankso@15
|
260 separator && echo ""
|
pankso@15
|
261 }
|
pankso@15
|
262
|
pankso@1
|
263 # Copy all generic files (locale, pixmaps, .desktop). We use standard paths,
|
pankso@1
|
264 # so some packages need to copy these files with the receipt and genpkg_rules.
|
pankso@1
|
265 copy_generic_files()
|
pankso@1
|
266 {
|
pankso@1
|
267 # $LOCALE is set in cook.conf
|
pankso@1
|
268 if [ "$LOCALE" ]; then
|
pankso@1
|
269 if [ -d "$_pkg/usr/share/locale" ]; then
|
pankso@1
|
270 mkdir -p $fs/usr/share/locale
|
pankso@1
|
271 for i in $LOCALE
|
pankso@1
|
272 do
|
pankso@1
|
273 if [ -d "$_pkg/usr/share/locale/$i" ]; then
|
pankso@1
|
274 cp -a $_pkg/usr/share/locale/$i $fs/usr/share/locale
|
pankso@1
|
275 fi
|
pankso@1
|
276 done
|
pankso@1
|
277 fi
|
pankso@1
|
278 fi
|
pankso@1
|
279
|
pankso@1
|
280 # Generic pixmaps copy can be disabled with GENERIC_PIXMAPS="no"
|
pankso@1
|
281 if [ "$GENERIC_PIXMAPS" != "no" ]; then
|
pankso@1
|
282 if [ -d "$_pkg/usr/share/pixmaps" ]; then
|
pankso@1
|
283 mkdir -p $fs/usr/share/pixmaps
|
pankso@1
|
284 cp -a $_pkg/usr/share/pixmaps/$PACKAGE.png \
|
pankso@1
|
285 $fs/usr/share/pixmaps 2>/dev/null
|
pankso@1
|
286 cp -a $_pkg/usr/share/pixmaps/$PACKAGE.xpm \
|
pankso@1
|
287 $fs/usr/share/pixmaps 2>/dev/null
|
pankso@1
|
288 fi
|
pankso@1
|
289
|
pankso@1
|
290 # Custom or homemade PNG pixmap can be in stuff.
|
pankso@1
|
291 if [ -f "$stuff/$PACKAGE.png" ]; then
|
pankso@1
|
292 mkdir -p $fs/usr/share/pixmaps
|
pankso@1
|
293 cp -a $stuff/$PACKAGE.png $fs/usr/share/pixmaps
|
pankso@1
|
294 fi
|
pankso@1
|
295 fi
|
pankso@1
|
296
|
pankso@1
|
297 # Desktop entry (.desktop).
|
pankso@1
|
298 if [ -d "$_pkg/usr/share/applications" ]; then
|
pankso@1
|
299 cp -a $_pkg/usr/share/applications $fs/usr/share
|
pankso@1
|
300 fi
|
pankso@1
|
301
|
pankso@1
|
302 # Homemade desktop file(s) can be in stuff.
|
pankso@1
|
303 if [ -d "$stuff/applications" ]; then
|
pankso@1
|
304 mkdir -p $fs/usr/share
|
pankso@1
|
305 cp -a $stuff/applications $fs/usr/share
|
pankso@1
|
306 fi
|
pankso@1
|
307 if [ -f "$stuff/$PACKAGE.desktop" ]; then
|
pankso@1
|
308 mkdir -p $fs/usr/share/applications
|
pankso@1
|
309 cp -a $stuff/$PACKAGE.desktop $fs/usr/share/applications
|
pankso@1
|
310 fi
|
pankso@1
|
311 }
|
pankso@1
|
312
|
pankso@67
|
313 # Find and strip : --strip-all (-s) or --strip-debug on static libs as well
|
pankso@67
|
314 # as removing unusuff files lik in Python packages.
|
pankso@1
|
315 strip_package()
|
pankso@1
|
316 {
|
pankso@67
|
317 gettext "Executing strip on all files..."
|
pankso@1
|
318 for dir in $fs/bin $fs/sbin $fs/usr/bin $fs/usr/sbin $fs/usr/games
|
pankso@1
|
319 do
|
pankso@1
|
320 if [ -d "$dir" ]; then
|
pankso@1
|
321 find $dir -type f -exec strip -s '{}' 2>/dev/null \;
|
pankso@1
|
322 fi
|
pankso@1
|
323 done
|
pankso@1
|
324 find $fs -name "*.so*" -exec strip -s '{}' 2>/dev/null \;
|
pankso@1
|
325 find $fs -name "*.a" -exec strip --strip-debug '{}' 2>/dev/null \;
|
pankso@1
|
326 status
|
pankso@67
|
327
|
pankso@67
|
328 # Remove .pyc, .pyo, perllocal.pod and .packlist files from packages.
|
pankso@67
|
329 if echo "$DEPENDS" | fgrep "python"; then
|
pankso@67
|
330 gettext "Removing Python compiled files..."
|
pankso@67
|
331 find $fs -type f -name "*.pyc" -delete 2>/dev/null
|
pankso@67
|
332 find $fs -type f -name "*.pyo" -delete 2>/dev/null
|
pankso@67
|
333 find $fs -type f -name "perllocal.pod" -delete 2>/dev/null
|
pankso@67
|
334 find $fs -type f -name ".packlist" -delete 2>/dev/null
|
pankso@67
|
335 status
|
pankso@67
|
336 fi
|
pankso@1
|
337 }
|
pankso@1
|
338
|
pankso@8
|
339 # Remove installed deps.
|
pankso@8
|
340 remove_deps() {
|
pankso@8
|
341 # Now remove installed build deps.
|
pankso@9
|
342 diff="$CACHE/installed.diff"
|
pankso@9
|
343 deps=$(cat $diff | grep ^+[a-zA-Z0-9] | sed s/^+//)
|
pankso@9
|
344 nb=$(cat $diff | grep ^+[a-zA-Z0-9] | wc -l)
|
pankso@8
|
345 if [ -s "$CACHE/installed.diff" ]; then
|
pankso@8
|
346 gettext "Build dependencies to remove:"; echo " $nb"
|
pankso@8
|
347 gettext "Removing:"
|
pankso@8
|
348 for dep in $deps
|
pankso@8
|
349 do
|
pankso@8
|
350 echo -n " $dep"
|
pankso@8
|
351 yes | tazpkg remove $dep >/dev/null
|
pankso@8
|
352 done
|
pankso@16
|
353 echo -e "\n"
|
pankso@8
|
354 mv -f $CACHE/installed.diff $CACHE/installed.last.diff
|
pankso@1
|
355 fi
|
pankso@1
|
356 }
|
pankso@1
|
357
|
pankso@1
|
358 # The main cook function.
|
pankso@1
|
359 cookit() {
|
pankso@11
|
360 echo "Cook: $PACKAGE $VERSION"
|
pankso@9
|
361 separator
|
pankso@1
|
362 set_paths
|
pankso@9
|
363 [ "$QA" ] && receipt_quality
|
pankso@44
|
364 cd $pkgdir
|
pankso@33
|
365 rm -rf install taz source
|
pankso@1
|
366
|
pankso@1
|
367 # Disable -pipe if less than 512Mb free RAM.
|
pankso@1
|
368 free=$(free | fgrep '/+ buffers' | tr -s ' ' | cut -f 4 -d ' ')
|
pankso@1
|
369 if [ "$free" -lt 524288 ] && [ "$CFLAGS" != "${CFLAGS/-pipe}" ]; then
|
pankso@1
|
370 gettext -e "Disabling -pipe compile flag: $free RAM\n"
|
pankso@1
|
371 CFLAGS="${CFLAGS/-pipe}" && CFLAGS=$(echo "$CFLAGS" | tr -s ' ')
|
pankso@47
|
372 CXXFLAGS="${CXXFLAGS/-pipe}" && \
|
pankso@47
|
373 CXXFLAGS=$(echo "$CXXFLAGS" | tr -s ' ')
|
pankso@1
|
374 fi
|
pankso@1
|
375 unset free
|
pankso@1
|
376
|
pankso@1
|
377 # Export flags and path to be used by make
|
pankso@44
|
378 DESTDIR=$pkgdir/install
|
pankso@1
|
379 export DESTDIR MAKEFLAGS CFLAGS CXXFLAGS BUILD_HOST CONFIG_SITE
|
pankso@1
|
380 local LC_ALL=POSIX LANG=POSIX
|
pankso@1
|
381
|
paul@62
|
382 # Check for build deps.
|
pankso@1
|
383 cd $INSTALLED && ls -1 > $CACHE/installed.list
|
pankso@1
|
384 [ "$DEPENDS" ] && gettext -e "Checking build dependencies...\n"
|
pankso@1
|
385 for dep in $BUILD_DEPENDS
|
pankso@1
|
386 do
|
pankso@52
|
387 if [ ! -f "$INSTALLED/$dep/receipt" ]; then
|
pankso@1
|
388 # Try local package first
|
pankso@1
|
389 if [ -f "$PKGS/$dep-*.tazpkg" ]; then
|
paul@62
|
390 gettext "Installing deps (local):"; echo " $dep"
|
pankso@1
|
391 cd $PKGS && tazpkg install $dep-*.tazpkg >/dev/null
|
pankso@1
|
392 else
|
paul@62
|
393 gettext "Installing deps (web/cache):"; echo " $dep"
|
pankso@1
|
394 tazpkg get-install $dep >/dev/null
|
pankso@1
|
395 fi
|
pankso@1
|
396 fi
|
pankso@1
|
397 done
|
pankso@1
|
398 ls -1 > $CACHE/installed.cook && cd $CACHE
|
pankso@8
|
399
|
paul@62
|
400 # If a cook failed deps are not removed since we exit 1.
|
pankso@8
|
401 [ ! -s "installed.diff" ] && \
|
pankso@8
|
402 diff installed.list installed.cook > installed.diff
|
pankso@8
|
403 deps=$(cat installed.diff | grep ^+[a-zA-Z0-9] | wc -l)
|
pankso@1
|
404
|
pankso@1
|
405 # Get source tarball and make sure we have source dir named:
|
paul@62
|
406 # $PACKAGE-$VERSION to be standard in receipts. Here we use tar.lzma
|
paul@62
|
407 # tarball if it exists.
|
pankso@1
|
408 if [ "$WGET_URL" ] && [ ! -f "$SRC/$TARBALL" ]; then
|
pankso@1
|
409 if [ -f "$SRC/${SOURCE:-$PACKAGE}-$VERSION.tar.lzma" ]; then
|
pankso@10
|
410 TARBALL=${SOURCE:-$PACKAGE}-$VERSION.tar.lzma
|
pankso@1
|
411 else
|
pankso@1
|
412 get_source || exit 1
|
pankso@1
|
413 fi
|
pankso@1
|
414 fi
|
pankso@9
|
415 if [ ! "$WANTED" ] && [ "$TARBALL" ] && [ ! -d "$src" ]; then
|
pankso@1
|
416 mkdir -p $pkgdir/source/tmp && cd $pkgdir/source/tmp
|
pankso@1
|
417 extract_source || exit 1
|
paul@62
|
418 # Some archives are not well done and don't extract to one dir (ex lzma).
|
pankso@57
|
419 files=$(ls | wc -l)
|
pankso@57
|
420 [ "$files" == 1 ] && mv * ../$PACKAGE-$VERSION
|
pankso@57
|
421 [ "$files" -gt 1 ] && mkdir -p ../$PACKAGE-$VERSION && \
|
pankso@57
|
422 mv * ../$PACKAGE-$VERSION
|
pankso@1
|
423 cd .. && rm -rf tmp
|
pankso@1
|
424 fi
|
pankso@1
|
425
|
pankso@9
|
426 # Execute receipt rules.
|
pankso@44
|
427 if grep -q ^compile_rules $receipt; then
|
pankso@1
|
428 gettext -e "Executing: compile_rules\n"
|
pankso@55
|
429 [ -d "$src" ] && cd $src
|
pankso@56
|
430 compile_rules || exit 1
|
pankso@10
|
431 # Stay compatible with _pkg
|
pankso@55
|
432 [ -d "$src/_pkg" ] && mv $src/_pkg $install
|
pankso@9
|
433 # QA: compile_rules success so valid.
|
pankso@9
|
434 mkdir -p $install
|
pankso@9
|
435 else
|
pankso@9
|
436 # QA: No compile_rules so no error, valid.
|
pankso@9
|
437 mkdir -p $install
|
pankso@1
|
438 fi
|
pankso@1
|
439 separator && echo ""
|
pankso@1
|
440 }
|
pankso@1
|
441
|
pankso@1
|
442 # Cook quality assurance.
|
pankso@1
|
443 cookit_quality() {
|
pankso@9
|
444 if [ ! -d "$WOK/$pkg/install" ] && [ ! "$WANTED" ]; then
|
pankso@15
|
445 echo -e "ERROR: cook failed" | tee -a $LOGS/$pkg.log
|
pankso@9
|
446 fi
|
pankso@9
|
447 # ERROR can be echoed any time in cookit()
|
pankso@33
|
448 if fgrep -q ERROR: $LOGS/$pkg.log; then
|
pankso@17
|
449 debug_info | tee -a $LOGS/$pkg.log
|
pankso@33
|
450 rm -f $command && exit 1
|
pankso@1
|
451 fi
|
pankso@1
|
452 }
|
pankso@1
|
453
|
pankso@16
|
454 # Create the package. Wanted to use Tazpkg to create a tazpkg package at first,
|
paul@62
|
455 # but it doesn't handle EXTRAVERSION.
|
pankso@1
|
456 packit() {
|
pankso@1
|
457 set_paths
|
pankso@55
|
458 echo "Pack: $PACKAGE $VERSION"
|
pankso@1
|
459 separator
|
pankso@44
|
460 if grep -q ^genpkg_rules $receipt; then
|
pankso@16
|
461 gettext -e "Executing: genpkg_rules\n"
|
pankso@16
|
462 cd $pkgdir
|
pankso@33
|
463 mkdir -p $fs && genpkg_rules || (echo -e \
|
pankso@33
|
464 "\nERROR: genpkg_rules failed\n" >> $LOGS/$pkg.log && exit 1)
|
pankso@16
|
465 fi
|
pankso@44
|
466 cd $taz
|
pankso@1
|
467 for file in receipt description.txt
|
pankso@1
|
468 do
|
pankso@1
|
469 [ ! -f "../$file" ] && continue
|
pankso@1
|
470 gettext "Copying"; echo -n " $file..."
|
pankso@1
|
471 cp -f ../$file $pack && chown 0.0 $pack/$file && status
|
pankso@1
|
472 done
|
pankso@16
|
473
|
paul@62
|
474 # Create files.list with redirecting find output.
|
pankso@16
|
475 gettext "Creating the list of files..." && cd $fs
|
pankso@16
|
476 find . -type f -print > ../files.list
|
pankso@16
|
477 find . -type l -print >> ../files.list
|
pankso@16
|
478 cd .. && sed -i s/'^.'/''/ files.list
|
pankso@16
|
479 status
|
pankso@43
|
480
|
pankso@43
|
481 # QA, strip and stuff files.
|
pankso@43
|
482
|
pankso@43
|
483 strip_package
|
pankso@43
|
484 copy_generic_files
|
pankso@43
|
485
|
pankso@43
|
486 # Md5sum of files.
|
pankso@16
|
487 gettext "Creating md5sum of files..."
|
pankso@16
|
488 while read file; do
|
pankso@16
|
489 [ -L "fs$file" ] && continue
|
pankso@16
|
490 [ -f "fs$file" ] || continue
|
pankso@16
|
491 case "$file" in
|
pankso@16
|
492 /lib/modules/*/modules.*|*.pyc) continue;;
|
pankso@16
|
493 esac
|
pankso@16
|
494 md5sum "fs$file" | sed 's/ fs/ /'
|
pankso@16
|
495 done < files.list > md5sum
|
pankso@16
|
496 status
|
pankso@16
|
497 UNPACKED_SIZE=$(du -chs fs receipt files.list md5sum \
|
pankso@16
|
498 description.txt 2> /dev/null | awk \
|
pankso@16
|
499 '{ sz=$1 } END { print sz }')
|
pankso@16
|
500
|
pankso@16
|
501 # Build cpio archives.
|
pankso@16
|
502 gettext "Compressing the fs... "
|
pankso@16
|
503 find fs | cpio -o -H newc --quiet | lzma e fs.cpio.lzma -si
|
pankso@16
|
504 rm -rf fs
|
pankso@16
|
505 status
|
pankso@16
|
506 PACKED_SIZE=$(du -chs fs.cpio.lzma receipt files.list \
|
pankso@16
|
507 md5sum description.txt 2> /dev/null | awk \
|
pankso@16
|
508 '{ sz=$1 } END { print sz }')
|
pankso@16
|
509 gettext "Updating receipt sizes..."
|
pankso@16
|
510 sed -i s/^PACKED_SIZE.*$// receipt
|
pankso@16
|
511 sed -i s/^UNPACKED_SIZE.*$// receipt
|
pankso@16
|
512 sed -i "s/^PACKAGE=/PACKED_SIZE=\"$PACKED_SIZE\"\nUNPACKED_SIZE=\"$UNPACKED_SIZE\"\nPACKAGE=/" receipt
|
pankso@16
|
513 status
|
pankso@16
|
514
|
pankso@16
|
515 # Set extra version.
|
pankso@16
|
516 if [ "$EXTRAVERSION" ]; then
|
pankso@16
|
517 gettext "Updating receipt EXTRAVERSION: "; echo -n "$EXTRAVERSION"
|
pankso@16
|
518 sed -i s/^EXTRAVERSION.*$// receipt
|
pankso@16
|
519 sed -i "s/^VERSION=/EXTRAVERSION=\"$EXTRAVERSION\"\nVERSION=/" receipt
|
pankso@16
|
520 status
|
pankso@16
|
521 fi
|
pankso@16
|
522
|
pankso@16
|
523 # Compress.
|
pankso@16
|
524 gettext "Creating full cpio archive... "
|
pankso@16
|
525 find . -print | cpio -o -H newc --quiet > \
|
pankso@16
|
526 ../$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg
|
pankso@16
|
527 status
|
pankso@16
|
528 gettext "Restoring original package tree... "
|
pankso@16
|
529 unlzma -c fs.cpio.lzma | cpio -idm --quiet
|
pankso@16
|
530 status
|
pankso@16
|
531 rm fs.cpio.lzma && cd ..
|
pankso@43
|
532
|
pankso@43
|
533 # QA and give info.
|
pankso@43
|
534 tazpkg=$(ls *.tazpkg)
|
pankso@43
|
535 packit_quality
|
pankso@43
|
536 separator && gettext "Package:"; echo -e " $tazpkg\n"
|
pankso@1
|
537 }
|
pankso@1
|
538
|
paul@62
|
539 # Verify package quality and consistency.
|
pankso@8
|
540 packit_quality() {
|
pankso@33
|
541 if fgrep -q ERROR: $LOGS/$pkg.log; then
|
pankso@32
|
542 rm -f $command && exit 1
|
pankso@8
|
543 fi
|
pankso@44
|
544 gettext "QA: Checking for empty package..."
|
pankso@45
|
545 files=$(cat $WOK/$pkg/taz/$pkg-*/files.list | wc -l)
|
pankso@45
|
546 if [ "$files" -lt 0 ] && [ "$CATEGORY" != "meta" ]; then
|
pankso@44
|
547 echo -e "\nERROR: empty package"
|
pankso@32
|
548 rm -f $command && exit 1
|
pankso@8
|
549 else
|
pankso@44
|
550 status && mv -f $pkgdir/taz/$pkg-*.tazpkg $PKGS
|
pankso@11
|
551 sed -i /^${pkg}$/d $broken
|
pankso@8
|
552 fi
|
pankso@8
|
553 }
|
pankso@8
|
554
|
pankso@1
|
555 #
|
pankso@1
|
556 # Commands
|
pankso@1
|
557 #
|
pankso@1
|
558
|
pankso@1
|
559 case "$1" in
|
pankso@32
|
560 usage|help|-u|-h)
|
pankso@1
|
561 usage ;;
|
pankso@1
|
562 list-wok)
|
pankso@52
|
563 gettext -e "\nList of packages in:"; echo " $WOK"
|
pankso@1
|
564 separator
|
pankso@1
|
565 cd $WOK && ls -1
|
pankso@1
|
566 separator
|
pankso@1
|
567 echo -n "Packages: " && ls | wc -l
|
pankso@1
|
568 echo "" ;;
|
pankso@1
|
569 setup)
|
pankso@1
|
570 # Setup a build environment
|
pankso@1
|
571 check_root
|
pankso@11
|
572 echo "Cook: setting up the environment" | log
|
pankso@1
|
573 gettext -e "\nSetting up your environment\n"
|
pankso@1
|
574 separator && cd $SLITAZ
|
pankso@52
|
575 init_db_files
|
pankso@1
|
576 gettext -e "Checking for packages to install...\n"
|
pankso@29
|
577 for pkg in $SETUP_PKGS
|
pankso@1
|
578 do
|
pankso@52
|
579 [ ! -f "$INSTALLED/$pkg/receipt" ] && tazpkg get-install $pkg
|
pankso@1
|
580 done
|
pankso@1
|
581
|
pankso@1
|
582 # Handle --options
|
pankso@1
|
583 case "$2" in
|
pankso@49
|
584 --wok|-w)
|
pankso@52
|
585 [ ! -f "$INSTALLED/mercurial/receipt" ] && \
|
pankso@52
|
586 tazpkg get-install mercurial
|
paul@62
|
587 [ -d "$WOK" ] && echo -e "A wok already exists.\n" && exit 1
|
pankso@1
|
588 hg clone $HG_URL ;;
|
pankso@1
|
589 esac
|
pankso@1
|
590
|
pankso@1
|
591 # SliTaz group and permissions
|
pankso@1
|
592 if ! grep -q ^slitaz /etc/group; then
|
pankso@1
|
593 gettext -e "Adding group: slitaz\n"
|
pankso@1
|
594 addgroup slitaz
|
pankso@1
|
595 fi
|
pankso@1
|
596 gettext -e "Setting permissions for slitaz group...\n"
|
pankso@1
|
597 chown -R root.slitaz $SLITAZ
|
pankso@1
|
598 chmod -R g+w $SLITAZ
|
pankso@1
|
599 separator
|
pankso@1
|
600 gettext -e "All done, ready to cook packages :-)\n\n" ;;
|
pankso@9
|
601 test)
|
pankso@9
|
602 # Test a cook environment.
|
pankso@13
|
603 echo "Cook test: testing the cook environment" | log
|
pankso@9
|
604 [ ! -d "$WOK" ] && exit 1
|
pankso@9
|
605 [ ! -d "$WOK/cooktest" ] && cp -r $DATA/cooktest $WOK
|
pankso@9
|
606 cook cooktest ;;
|
pankso@1
|
607 new)
|
pankso@1
|
608 # Create the package folder and an empty receipt.
|
pankso@1
|
609 pkg="$2"
|
pankso@1
|
610 [ "$pkg" ] || usage
|
pankso@60
|
611 [ -d "${WOK}-hg" ] && WOK=${WOK}-hg
|
pankso@1
|
612 echo ""
|
pankso@1
|
613 if [ -d "$WOK/$pkg" ]; then
|
paul@62
|
614 echo -n "$pkg " && gettext "package already exists."
|
pankso@1
|
615 echo -e "\n" && exit 1
|
pankso@1
|
616 fi
|
pankso@1
|
617 gettext "Creating"; echo -n " $WOK/$pkg"
|
pankso@1
|
618 mkdir $WOK/$pkg && cd $WOK/$pkg && status
|
pankso@1
|
619 gettext "Preparing the package receipt..."
|
pankso@1
|
620 cp $DATA/receipt .
|
pankso@1
|
621 sed -i s"/^PACKAGE=.*/PACKAGE=\"$pkg\"/" receipt
|
pankso@1
|
622 status && echo "" ;;
|
pankso@1
|
623 list)
|
pankso@1
|
624 # Cook a list of packages (better use the Cooker since it will order
|
pankso@1
|
625 # packages before executing cook).
|
pankso@1
|
626 check_root
|
pankso@1
|
627 [ -z "$2" ] && gettext -e "\nNo list in argument.\n\n" && exit 1
|
pankso@1
|
628 [ ! -f "$2" ] && gettext -e "\nNo list found:" && \
|
pankso@1
|
629 echo -e " $2\n" && exit 1
|
pankso@13
|
630 echo "Cook list starting: $2" | log
|
pankso@1
|
631 for pkg in $(cat $2)
|
pankso@1
|
632 do
|
pankso@1
|
633 cook $pkg || broken
|
pankso@1
|
634 done ;;
|
pankso@1
|
635 clean-wok)
|
pankso@1
|
636 check_root
|
pankso@1
|
637 gettext -e "\nCleaning all packages files..."
|
pankso@1
|
638 rm -rf $WOK/*/taz $WOK/*/install $WOK/*/source
|
pankso@1
|
639 status && echo "" ;;
|
pankso@1
|
640 clean-src)
|
pankso@1
|
641 check_root
|
paul@62
|
642 gettext -e "\nCleaning all packages sources..."
|
pankso@1
|
643 rm -rf $WOK/*/source
|
pankso@1
|
644 status && echo "" ;;
|
pankso@1
|
645 pkglist)
|
paul@62
|
646 # Create suitable packages list for TazPKG and only for built packages.
|
pankso@1
|
647 [ "$2" ] && PKGS="$2"
|
pankso@1
|
648 [ ! -d "$PKGS" ] && \
|
paul@62
|
649 gettext -e "\nPackages directory doesn't exist\n\n" && exit 1
|
pankso@1
|
650 cd $PKGS
|
paul@62
|
651 echo "Cook pkglist: Creating all packages lists" | log
|
pankso@1
|
652 gettext -e "\nCreating lists for:"; echo " $PKGS"
|
pankso@1
|
653 separator
|
pankso@1
|
654 rm -f packages.* files.list*
|
pankso@1
|
655 gettext -e "Creating: packages.list\n"
|
pankso@1
|
656 ls -1 | sed s'/.tazpkg//' > $PKGS/packages.list
|
pankso@1
|
657 gettext -e "Creating: packages.md5\n"
|
pankso@1
|
658 md5sum *.tazpkg > $PKGS/packages.md5
|
pankso@1
|
659 gettext -e "Creating: packages.desc\n"
|
pankso@1
|
660 gettext -e "Creating: packages.equiv\n"
|
pankso@1
|
661 cd $WOK
|
pankso@1
|
662 for pkg in *
|
pankso@1
|
663 do
|
pankso@1
|
664 unset_receipt
|
pankso@1
|
665 . $pkg/receipt
|
pankso@1
|
666 # packages.desc let us search easily in DB
|
pankso@1
|
667 if [ -f "$PKGS/$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg" ]; then
|
pankso@1
|
668 cat >> $PKGS/packages.desc << EOT
|
pankso@1
|
669 $PACKAGE | $VERSION$EXTRAVERSION | $SHORT_DESC | $CATEGORY | $WEB_SITE
|
pankso@1
|
670 EOT
|
pankso@1
|
671 # Packages.equiv is used by tazpkg install to check depends.
|
pankso@1
|
672 for i in $PROVIDE; do
|
pankso@1
|
673 DEST=""
|
pankso@1
|
674 echo $i | fgrep -q : && DEST="${i#*:}:"
|
pankso@1
|
675 if grep -qs ^${i%:*}= $PKGS/packages.equiv; then
|
pankso@1
|
676 sed -i "s/^${i%:*}=/${i%:*}=$DEST$PACKAGE /" \
|
pankso@1
|
677 $PKGS/packages.equiv
|
pankso@1
|
678 else
|
pankso@1
|
679 echo "${i%:*}=$DEST$PACKAGE" >> $PKGS/packages.equiv
|
pankso@1
|
680 fi
|
pankso@1
|
681 done
|
pankso@1
|
682 fi
|
pankso@1
|
683 done
|
pankso@1
|
684 # files.list.lzma
|
pankso@1
|
685 #lzma e files.list files.list.lzma
|
pankso@1
|
686 separator
|
pankso@1
|
687 nb=$(ls $PKGS/*.tazpkg | wc -l)
|
pankso@1
|
688 echo -e "Packages: $nb\n" ;;
|
pankso@1
|
689 *)
|
pankso@1
|
690 # Just cook and generate a package.
|
pankso@1
|
691 check_root
|
pankso@1
|
692 time=$(date +%s)
|
pankso@1
|
693 pkg="$1"
|
pankso@1
|
694 [ -z "$pkg" ] && usage
|
pankso@44
|
695 receipt="$WOK/$pkg/receipt"
|
pankso@1
|
696 check_pkg_in_wok && echo ""
|
pankso@47
|
697
|
pankso@47
|
698 # Skip blocked, 3 lines also for the Cooker.
|
pankso@51
|
699 if grep -q "^$pkg$" $blocked && [ "$2" != "--*" ]; then
|
pankso@47
|
700 gettext -e "Blocked package:"; echo -e " $pkg\n" && exit 0
|
pankso@47
|
701 fi
|
pankso@47
|
702
|
pankso@47
|
703 # Log and source receipt.
|
pankso@56
|
704 echo "Cook started for: <a href='cooker.cgi?pkg=$pkg'>$pkg</a>" | log
|
pankso@16
|
705 echo "cook:$pkg" > $command
|
pankso@1
|
706 unset inst
|
pankso@1
|
707 unset_receipt
|
pankso@44
|
708 . $receipt
|
pankso@1
|
709
|
pankso@1
|
710 # Handle --options
|
pankso@1
|
711 case "$2" in
|
pankso@1
|
712 --clean|-c)
|
pankso@49
|
713 gettext -e "Cleaning:"; echo -n " $pkg"
|
pankso@1
|
714 cd $WOK/$pkg && rm -rf install taz source
|
pankso@1
|
715 status && echo "" && exit 0 ;;
|
pankso@1
|
716 --install|-i)
|
pankso@1
|
717 inst='yes' ;;
|
pankso@49
|
718 --getsrc|-gs)
|
pankso@49
|
719 gettext "Getting source for:"; echo " $pkg"
|
pankso@45
|
720 separator && get_source
|
pankso@39
|
721 echo -e "Tarball: $SRC/$TARBALL\n" && exit 0 ;;
|
pankso@49
|
722 --block|-b)
|
pankso@49
|
723 gettext "Blocking:"; echo -n " $pkg"
|
pankso@49
|
724 [ $(grep "^$pkg$" $blocked) ] || echo "$pkg" >> $blocked
|
pankso@49
|
725 status && echo "" && exit 0 ;;
|
pankso@49
|
726 --unblock|-ub)
|
pankso@49
|
727 gettext "Unblocking:"; echo -n " $pkg"
|
pankso@49
|
728 sed -i "/^${pkg}$/"d $blocked
|
pankso@49
|
729 status && echo "" && exit 0 ;;
|
pankso@1
|
730 esac
|
pankso@1
|
731
|
paul@62
|
732 # Check if wanted is built now so we have separate log files.
|
pankso@1
|
733 if [ "$WANTED" ] && [ ! -d "$WOK/$WANTED/install" ]; then
|
pankso@1
|
734 cook "$WANTED"
|
pankso@1
|
735 fi
|
pankso@1
|
736
|
pankso@1
|
737 # Cook and pack or exit on error and log everything.
|
pankso@26
|
738 cookit 2>&1 | tee $LOGS/$pkg.log
|
pankso@15
|
739 remove_deps | tee -a $LOGS/$pkg.log
|
pankso@1
|
740 cookit_quality
|
pankso@26
|
741 packit 2>&1 | tee -a $LOGS/$pkg.log
|
pankso@1
|
742 clean_log
|
pankso@33
|
743
|
pankso@33
|
744 # Exit if any error in packing.
|
pankso@33
|
745 if grep -q ^ERROR $LOGS/$pkg.log; then
|
pankso@33
|
746 debug_info | tee -a $LOGS/$pkg.log
|
pankso@33
|
747 rm -f $command && exit 1
|
pankso@33
|
748 fi
|
pankso@16
|
749
|
pankso@1
|
750 # Time and summary
|
pankso@1
|
751 time=$(($(date +%s) - $time))
|
pankso@1
|
752 summary | tee -a $LOGS/$pkg.log
|
pankso@50
|
753 echo ""
|
pankso@1
|
754
|
pankso@1
|
755 # Install package if requested
|
pankso@1
|
756 if [ "$inst" ]; then
|
pankso@1
|
757 if [ -f "$PKGS/$PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg" ]; then
|
pankso@1
|
758 cd $PKGS && tazpkg install \
|
pankso@1
|
759 $PACKAGE-${VERSION}${EXTRAVERSION}.tazpkg --forced
|
pankso@1
|
760 else
|
paul@62
|
761 gettext -e "Unable to install package, build has failed.\n\n"
|
pankso@1
|
762 exit 1
|
pankso@1
|
763 fi
|
pankso@1
|
764 fi
|
pankso@9
|
765 # Finally we DONT WANT to build the *-dev or packages with WANTED="$pkg"
|
pankso@17
|
766 # You want automation: use the Cooker Build Bot.
|
pankso@1
|
767 #[ -d "$WOK/$pkg-dev" ] && cook $pkg-dev
|
pankso@18
|
768 rm -f $command ;;
|
pankso@1
|
769 esac
|
pankso@1
|
770
|
pankso@1
|
771 exit 0
|