cookutils annotate cook @ rev 194

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