CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
ddce5e78cce83c38e1faf489729f60f10c30c45f
[pkgutils-cross.git] / src / pkgmk.in
1 #!/bin/bash
2 #
3 # pkgutils
4 #
5 # Copyright (c) 2000-2005 Per Liden
6 # Copyright (c) 2006-2010 by CRUX team (http://crux.nu)
7 # Patches for crosscompilation by Jose V Beneyto <sepen@crux.nu>
8 # (CRUX-ARM System Team <devel@crux-arm.nu>)
9 #
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2 of the License, or
13 # (at your option) any later version.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
23 # USA.
24 #
25
26 ##
27 # error codes
28 E_GENERAL=1
29 E_PKGFILE=2 # invalid Pkgfile
30 E_DIR_PERM=3 # (source/build) directory missing or missing read/write permission
31 E_DOWNLOAD=4 # error during download
32 E_UNPACK=5 # error during unpacking of source file(s)
33 E_MD5=6 # md5sum verification failed
34 E_FOOTPRINT=7 # footprint check failure
35 E_BUILD=8 # error while running 'build()'
36 E_INSTALL=9 # error while installing the package via 'pkgadd'
37
38 info() {
39 echo "=======> $1"
40 }
41
42 warning() {
43 info "WARNING: $1" >&2
44 }
45
46 error() {
47 info "ERROR: $1" >&2
48 }
49
50 get_filename() {
51 if [[ $1 =~ ^(http|https|ftp|file)://.*/(.+) ]]; then
52 echo "$PKGMK_SOURCE_DIR/${BASH_REMATCH[2]}"
53 else
54 echo $1
55 fi
56 }
57
58 get_basename() {
59 local FILE="`echo $1 | sed 's|^.*://.*/||g'`"
60 echo $FILE
61 }
62
63 check_pkgfile() {
64 if [ ! "$name" ]; then
65 error "Variable 'name' not specified in $PKGMK_PKGFILE."
66 exit $E_PKGFILE
67 elif [ ! "$version" ]; then
68 error "Variable 'version' not specified in $PKGMK_PKGFILE."
69 exit $E_PKGFILE
70 elif [ ! "$release" ]; then
71 error "Variable 'release' not specified in $PKGMK_PKGFILE."
72 exit $E_PKGFILE
73 elif [ "`type -t build`" != "function" ]; then
74 error "Function 'build' not specified in $PKGMK_PKGFILE."
75 exit $E_PKGFILE
76 fi
77 }
78
79 check_directory() {
80 if [ ! -d $1 ]; then
81 error "Directory '$1' does not exist."
82 exit $E_DIR_PERM
83 elif [ ! -w $1 ]; then
84 error "Directory '$1' not writable."
85 exit $E_DIR_PERM
86 elif [ ! -x $1 ] || [ ! -r $1 ]; then
87 error "Directory '$1' not readable."
88 exit $E_DIR_PERM
89 fi
90 }
91
92 check_file() {
93 if [ -e $1 ] && [ ! -w $1 ]; then
94 error "File '$1' is not writable."
95 exit 1
96 fi
97 }
98
99 download_file() {
100 info "Downloading '$1'."
101
102 if [ ! "`type -p wget`" ]; then
103 error "Command 'wget' not found."
104 exit $E_GENERAL
105 fi
106
107 LOCAL_FILENAME=`get_filename $1`
108 LOCAL_FILENAME_PARTIAL="$LOCAL_FILENAME.partial"
109 DOWNLOAD_OPTS="--passive-ftp --no-directories --tries=3 --waitretry=3 \
110 --directory-prefix=$PKGMK_SOURCE_DIR \
111 --output-document=$LOCAL_FILENAME_PARTIAL --no-check-certificate"
112
113 if [ -f "$LOCAL_FILENAME_PARTIAL" ]; then
114 info "Partial download found, trying to resume"
115 RESUME_CMD="-c"
116 fi
117
118 error=1
119
120 BASENAME=`get_basename $1`
121 for REPO in ${PKGMK_SOURCE_MIRRORS[@]}; do
122 REPO="`echo $REPO | sed 's|/$||'`"
123 wget $RESUME_CMD $DOWNLOAD_OPTS $PKGMK_WGET_OPTS $REPO/$BASENAME
124 error=$?
125 if [ $error == 0 ]; then
126 break
127 fi
128 done
129
130 if [ $error != 0 ]; then
131 while true; do
132 wget $RESUME_CMD $DOWNLOAD_OPTS $PKGMK_WGET_OPTS $1
133 error=$?
134 if [ $error != 0 ] && [ "$RESUME_CMD" ]; then
135 info "Partial download failed, restarting"
136 rm -f "$LOCAL_FILENAME_PARTIAL"
137 RESUME_CMD=""
138 else
139 break
140 fi
141 done
142 fi
143
144 if [ $error != 0 ]; then
145 error "Downloading '$1' failed."
146 exit $E_DOWNLOAD
147 fi
148
149 mv -f "$LOCAL_FILENAME_PARTIAL" "$LOCAL_FILENAME"
150 }
151
152 download_source() {
153 local FILE LOCAL_FILENAME
154
155 for FILE in ${source[@]}; do
156 LOCAL_FILENAME=`get_filename $FILE`
157 if [ ! -e $LOCAL_FILENAME ]; then
158 if [ "$LOCAL_FILENAME" = "$FILE" ]; then
159 error "Source file '$LOCAL_FILENAME' not found (can not be downloaded, URL not specified)."
160 exit $E_DOWNLOAD
161 else
162 if [ "$PKGMK_DOWNLOAD" = "yes" ]; then
163 download_file $FILE
164 else
165 error "Source file '$LOCAL_FILENAME' not found (use option -d to download)."
166 exit $E_DOWNLOAD
167 fi
168 fi
169 fi
170 done
171 }
172
173 unpack_source() {
174 local FILE LOCAL_FILENAME COMMAND
175
176 for FILE in ${source[@]}; do
177 LOCAL_FILENAME=`get_filename $FILE`
178 case $LOCAL_FILENAME in
179 *.tar.gz|*.tar.Z|*.tgz|*.tar.bz2|*.tbz2|*.tar.xz|*.txz|*.tar.lzma|*.zip|*.rpm)
180 COMMAND="bsdtar -p -o -C $SRC -xf $LOCAL_FILENAME" ;;
181 *)
182 COMMAND="cp $LOCAL_FILENAME $SRC" ;;
183 esac
184
185 echo "$COMMAND"
186
187 $COMMAND
188
189 if [ $? != 0 ]; then
190 if [ "$PKGMK_KEEP_WORK" = "no" ]; then
191 rm -rf $PKGMK_WORK_DIR
192 fi
193 error "Building '$TARGET' failed."
194 exit $E_UNPACK
195 fi
196 done
197 }
198
199 make_md5sum() {
200 local FILE LOCAL_FILENAMES
201
202 if [ "$source" ]; then
203 for FILE in ${source[@]}; do
204 LOCAL_FILENAMES="$LOCAL_FILENAMES `get_filename $FILE`"
205 done
206
207 md5sum $LOCAL_FILENAMES | sed -e 's| .*/| |' | sort -k 2
208 fi
209 }
210
211 make_footprint() {
212 pkginfo --footprint $TARGET | \
213 sed "s|\tlib/modules/`uname -r`/|\tlib/modules/<kernel-version>/|g" | \
214 sort -k 3
215 }
216
217 check_md5sum() {
218 local FILE="$PKGMK_WORK_DIR/.tmp"
219
220 cd $PKGMK_ROOT
221
222 if [ -f $PKGMK_MD5SUM ]; then
223 make_md5sum > $FILE.md5sum
224 sort -k 2 $PKGMK_MD5SUM > $FILE.md5sum.orig
225 diff -w -t -U 0 $FILE.md5sum.orig $FILE.md5sum | \
226 sed '/^@@/d' | \
227 sed '/^+++/d' | \
228 sed '/^---/d' | \
229 sed 's/^+/NEW /g' | \
230 sed 's/^-/MISSING /g' > $FILE.md5sum.diff
231 if [ -s $FILE.md5sum.diff ]; then
232 error "Md5sum mismatch found:"
233 cat $FILE.md5sum.diff >&2
234
235 if [ "$PKGMK_KEEP_WORK" = "no" ]; then
236 rm -rf $PKGMK_WORK_DIR
237 fi
238
239 if [ "$PKGMK_CHECK_MD5SUM" = "yes" ]; then
240 error "Md5sum not ok."
241 exit $E_MD5
242 fi
243
244 error "Building '$TARGET' failed."
245 exit $E_MD5
246 fi
247 else
248 if [ "$PKGMK_CHECK_MD5SUM" = "yes" ]; then
249 if [ "$PKGMK_KEEP_WORK" = "no" ]; then
250 rm -rf $PKGMK_WORK_DIR
251 fi
252 info "Md5sum not found."
253 exit $E_MD5
254 fi
255
256 warning "Md5sum not found, creating new."
257 make_md5sum > $PKGMK_MD5SUM
258 fi
259
260 if [ "$PKGMK_CHECK_MD5SUM" = "yes" ]; then
261 if [ "$PKGMK_KEEP_WORK" = "no" ]; then
262 rm -rf $PKGMK_WORK_DIR
263 fi
264 info "Md5sum ok."
265 exit 0
266 fi
267 }
268
269 strip_files() {
270 local FILE FILTER
271
272 cd $PKG
273
274 if [ -f $PKGMK_ROOT/$PKGMK_NOSTRIP ]; then
275 FILTER="grep -v -f $PKGMK_ROOT/$PKGMK_NOSTRIP"
276 else
277 FILTER="cat"
278 fi
279
280 find . -type f -printf "%P\n" | $FILTER | while read FILE; do
281 case $(file -b "$FILE") in
282 *ELF*executable*not\ stripped)
283 $STRIP_CMD --strip-all "$FILE"
284 ;;
285 *ELF*shared\ object*not\ stripped)
286 $STRIP_CMD --strip-unneeded "$FILE"
287 ;;
288 current\ ar\ archive)
289 $STRIP_CMD --strip-debug "$FILE"
290 esac
291 done
292 }
293
294 compress_manpages() {
295 local FILE DIR TARGET
296
297 cd $PKG
298
299 find . -type f -path "*/man/man*/*" | while read FILE; do
300 if [ "$FILE" = "${FILE%%.gz}" ]; then
301 gzip -9 "$FILE"
302 fi
303 done
304
305 find . -type l -path "*/man/man*/*" | while read FILE; do
306 TARGET=`readlink -n "$FILE"`
307 TARGET="${TARGET##*/}"
308 TARGET="${TARGET%%.gz}.gz"
309 rm -f "$FILE"
310 FILE="${FILE%%.gz}.gz"
311 DIR=`dirname "$FILE"`
312
313 if [ -e "$DIR/$TARGET" ]; then
314 ln -sf "$TARGET" "$FILE"
315 fi
316 done
317 }
318
319 fix_cross_paths() {
320 # remove the last / from CLFS path if appeared
321 CLFS=${CLFS%*/}
322
323 find $PKG -type f -name '*.la' -exec sed -e "s|$CLFS||g" -e "s|$CROSTOOLS/$CTARGET|/usr|g" -i {} \;
324 }
325
326 check_footprint() {
327 local FILE="$PKGMK_WORK_DIR/.tmp"
328
329 cd $PKGMK_ROOT
330
331 if [ -f $TARGET ]; then
332 make_footprint > $FILE.footprint
333 if [ -f $PKGMK_FOOTPRINT ]; then
334 sort -k 3 $PKGMK_FOOTPRINT > $FILE.footprint.orig
335 diff -w -t -U 0 $FILE.footprint.orig $FILE.footprint | \
336 sed '/^@@/d' | \
337 sed '/^+++/d' | \
338 sed '/^---/d' | \
339 sed 's/^+/NEW /g' | \
340 sed 's/^-/MISSING /g' > $FILE.footprint.diff
341 if [ -s $FILE.footprint.diff ]; then
342 if [ "$PKGMK_IGNORE_NEW" = "yes" ] && \
343 [ -z "$(egrep -l ^MISSING $FILE.footprint.diff)" ] ; then
344 info "New files found:"
345 else
346 error "Footprint mismatch found:"
347 BUILD_SUCCESSFUL="no"
348 fi
349 cat $FILE.footprint.diff >&2
350 fi
351 else
352 warning "Footprint not found, creating new."
353 mv $FILE.footprint $PKGMK_FOOTPRINT
354 fi
355 else
356 error "Package '$TARGET' was not found."
357 BUILD_SUCCESSFUL="no"
358 fi
359 }
360
361 make_work_dir() {
362 export PKG="$PKGMK_WORK_DIR/pkg"
363 export SRC="$PKGMK_WORK_DIR/src"
364 umask 022
365
366 cd $PKGMK_ROOT
367 remove_work_dir
368 mkdir -p $SRC $PKG
369
370 if [ "$PKGMK_IGNORE_MD5SUM" = "no" ]; then
371 check_md5sum
372 fi
373 }
374
375 remove_work_dir() {
376 rm -rf $PKGMK_WORK_DIR
377 }
378
379
380 build_package() {
381 local BUILD_SUCCESSFUL="no"
382 local COMPRESSION
383
384 check_file "$TARGET"
385 make_work_dir
386
387 if [ "$UID" != "0" ]; then
388 warning "Packages should be built as root."
389 fi
390
391 info "Building '$TARGET'."
392
393 unpack_source
394
395 cd $SRC
396 (set -e -x ; build)
397
398 if [ $? = 0 ]; then
399 if [ "$PKGMK_NO_STRIP" = "no" ]; then
400 strip_files
401 fi
402
403 compress_manpages
404 fix_cross_paths
405
406 cd $PKG
407 info "Build result:"
408
409 case $PKGMK_COMPRESSION_MODE in
410 gz) COMPRESSION="-z" ;;
411 bz2) COMPRESSION="-j" ;;
412 xz) COMPRESSION="-J" ;;
413 esac
414 bsdtar -c $COMPRESSION -f $TARGET * && bsdtar -t -v -f $TARGET
415
416 if [ $? = 0 ]; then
417 BUILD_SUCCESSFUL="yes"
418
419 if [ "$PKGMK_IGNORE_FOOTPRINT" = "yes" ]; then
420 warning "Footprint ignored."
421 else
422 check_footprint
423 fi
424 fi
425 fi
426
427 if [ "$PKGMK_KEEP_WORK" = "no" ]; then
428 remove_work_dir
429 fi
430
431 if [ "$BUILD_SUCCESSFUL" = "yes" ]; then
432 info "Building '$TARGET' succeeded."
433 else
434 if [ -f $TARGET ]; then
435 touch -r $PKGMK_ROOT/$PKGMK_PKGFILE $TARGET &> /dev/null
436 fi
437 error "Building '$TARGET' failed."
438 exit 1
439 fi
440 }
441
442 install_package() {
443 local COMMAND
444
445 info "Installing '$TARGET'."
446
447 if [ "$PKGMK_INSTALL" = "install" ]; then
448 COMMAND="pkgadd $TARGET"
449 else
450 COMMAND="pkgadd -u $TARGET"
451 fi
452
453 cd $PKGMK_ROOT
454 echo "$COMMAND"
455 $COMMAND
456
457 if [ $? = 0 ]; then
458 info "Installing '$TARGET' succeeded."
459 else
460 error "Installing '$TARGET' failed."
461 exit 1
462 fi
463 }
464
465 recursive() {
466 local ARGS FILE DIR
467
468 ARGS=`echo "$@" | sed -e "s/--recursive//g" -e "s/-r//g"`
469
470 for FILE in `find $PKGMK_ROOT -name $PKGMK_PKGFILE | sort`; do
471 DIR="`dirname $FILE`/"
472 if [ -d $DIR ]; then
473 info "Entering directory '$DIR'."
474 (cd $DIR && $PKGMK_COMMAND $ARGS)
475 info "Leaving directory '$DIR'."
476 fi
477 done
478 }
479
480 clean() {
481 local FILE LOCAL_FILENAME
482
483 if [ -f $TARGET ]; then
484 info "Removing $TARGET"
485 rm -f $TARGET
486 fi
487
488 for FILE in ${source[@]}; do
489 LOCAL_FILENAME=`get_filename $FILE`
490 if [ -e $LOCAL_FILENAME ] && [ "$LOCAL_FILENAME" != "$FILE" ]; then
491 info "Removing $LOCAL_FILENAME"
492 rm -f $LOCAL_FILENAME
493 fi
494 done
495 }
496
497 update_footprint() {
498 if [ ! -f $TARGET ]; then
499 error "Unable to update footprint. File '$TARGET' not found."
500 exit 1
501 fi
502
503 check_file "$PKGMK_FOOTPRINT"
504 make_footprint > $PKGMK_FOOTPRINT
505 touch $TARGET
506
507 info "Footprint updated."
508 }
509
510 build_needed() {
511 local FILE RESULT
512
513 RESULT="yes"
514 if [ -f $TARGET ]; then
515 RESULT="no"
516 for FILE in $PKGMK_PKGFILE ${source[@]}; do
517 FILE=`get_filename $FILE`
518 if [ ! -e $FILE ] || [ ! $TARGET -nt $FILE ]; then
519 RESULT="yes"
520 break
521 fi
522 done
523 fi
524
525 echo $RESULT
526 }
527
528 interrupted() {
529 echo ""
530 error "Interrupted."
531
532 if [ "$PKGMK_KEEP_WORK" = "no" ]; then
533 rm -rf $PKGMK_WORK_DIR
534 fi
535
536 exit 1
537 }
538
539 print_help() {
540 echo "usage: `basename $PKGMK_COMMAND` [options]"
541 echo "options:"
542 echo " -i, --install build and install package"
543 echo " -u, --upgrade build and install package (as upgrade)"
544 echo " -r, --recursive search for and build packages recursively"
545 echo " -d, --download download missing source file(s)"
546 echo " -do, --download-only do not build, only download missing source file(s)"
547 echo " -eo, --extract-only do not build, only extract source file(s)"
548 echo " -utd, --up-to-date do not build, only check if package is up to date"
549 echo " -uf, --update-footprint update footprint using result from last build"
550 echo " -if, --ignore-footprint build package without checking footprint"
551 echo " -in, --ignore-new build package, ignore new files in a footprint missmatch"
552 echo " -um, --update-md5sum update md5sum"
553 echo " -im, --ignore-md5sum build package without checking md5sum"
554 echo " -cm, --check-md5sum do not build, only check md5sum"
555 echo " -ns, --no-strip do not strip executable binaries or libraries"
556 echo " -f, --force build package even if it appears to be up to date"
557 echo " -c, --clean remove package and downloaded files"
558 echo " -kw, --keep-work keep temporary working directory"
559 echo " -cf, --config-file <file> use alternative configuration file"
560 echo " -v, --version print version and exit "
561 echo " -h, --help print help and exit"
562 }
563
564 parse_options() {
565 while [ "$1" ]; do
566 case $1 in
567 -i|--install)
568 PKGMK_INSTALL="install" ;;
569 -u|--upgrade)
570 PKGMK_INSTALL="upgrade" ;;
571 -r|--recursive)
572 PKGMK_RECURSIVE="yes" ;;
573 -d|--download)
574 PKGMK_DOWNLOAD="yes" ;;
575 -do|--download-only)
576 PKGMK_DOWNLOAD="yes"
577 PKGMK_DOWNLOAD_ONLY="yes" ;;
578 -eo|--extract-only)
579 PKGMK_EXTRACT_ONLY="yes" ;;
580 -utd|--up-to-date)
581 PKGMK_UP_TO_DATE="yes" ;;
582 -uf|--update-footprint)
583 PKGMK_UPDATE_FOOTPRINT="yes" ;;
584 -if|--ignore-footprint)
585 PKGMK_IGNORE_FOOTPRINT="yes" ;;
586 -in|--ignore-new)
587 PKGMK_IGNORE_NEW="yes" ;;
588 -um|--update-md5sum)
589 PKGMK_UPDATE_MD5SUM="yes" ;;
590 -im|--ignore-md5sum)
591 PKGMK_IGNORE_MD5SUM="yes" ;;
592 -cm|--check-md5sum)
593 PKGMK_CHECK_MD5SUM="yes" ;;
594 -ns|--no-strip)
595 PKGMK_NO_STRIP="yes" ;;
596 -f|--force)
597 PKGMK_FORCE="yes" ;;
598 -c|--clean)
599 PKGMK_CLEAN="yes" ;;
600 -kw|--keep-work)
601 PKGMK_KEEP_WORK="yes" ;;
602 -cf|--config-file)
603 if [ ! "$2" ]; then
604 echo "`basename $PKGMK_COMMAND`: option $1 requires an argument"
605 exit 1
606 fi
607 PKGMK_CONFFILE="$2"
608 shift ;;
609 -v|--version)
610 echo "`basename $PKGMK_COMMAND` (pkgutils) $PKGMK_VERSION"
611 exit 0 ;;
612 -h|--help)
613 print_help
614 exit 0 ;;
615 *)
616 echo "`basename $PKGMK_COMMAND`: invalid option $1"
617 exit 1 ;;
618 esac
619 shift
620 done
621 }
622
623 main() {
624 local FILE TARGET
625
626 parse_options "$@"
627
628 if [ "$PKGMK_RECURSIVE" = "yes" ]; then
629 recursive "$@"
630 exit 0
631 fi
632
633 for FILE in $PKGMK_PKGFILE $PKGMK_CONFFILE; do
634 if [ ! -f $FILE ]; then
635 error "File '$FILE' not found."
636 exit 1
637 fi
638 . $FILE
639 done
640
641 check_directory "$PKGMK_SOURCE_DIR"
642 check_directory "$PKGMK_PACKAGE_DIR"
643 check_directory "`dirname $PKGMK_WORK_DIR`"
644
645 check_pkgfile
646
647 case $PKGMK_COMPRESSION_MODE in
648 gz|bz2|xz)
649 TARGET="$PKGMK_PACKAGE_DIR/$name#$version-$release.pkg.tar.$PKGMK_COMPRESSION_MODE"
650 ;;
651 *)
652 error "Compression mode '$PKGMK_COMPRESSION_MODE' not supported"
653 exit 1
654 ;;
655 esac
656
657 if [ "$PKGMK_CLEAN" = "yes" ]; then
658 clean
659 exit 0
660 fi
661
662 if [ "$PKGMK_UPDATE_FOOTPRINT" = "yes" ]; then
663 update_footprint
664 exit 0
665 fi
666
667 if [ "$PKGMK_UPDATE_MD5SUM" = "yes" ]; then
668 download_source
669 check_file "$PKGMK_MD5SUM"
670 make_md5sum > $PKGMK_MD5SUM
671 info "Md5sum updated."
672 exit 0
673 fi
674
675 if [ "$PKGMK_DOWNLOAD_ONLY" = "yes" ]; then
676 download_source
677 exit 0
678 fi
679
680 if [ "$PKGMK_EXTRACT_ONLY" = "yes" ]; then
681 download_source
682 make_work_dir
683 info "Extracting sources of package '$name-$version'."
684 unpack_source
685 exit 0
686 fi
687
688 if [ "$PKGMK_UP_TO_DATE" = "yes" ]; then
689 if [ "`build_needed`" = "yes" ]; then
690 info "Package '$TARGET' is not up to date."
691 else
692 info "Package '$TARGET' is up to date."
693 fi
694 exit 0
695 fi
696
697 if [ "`build_needed`" = "no" ] && [ "$PKGMK_FORCE" = "no" ] && [ "$PKGMK_CHECK_MD5SUM" = "no" ]; then
698 info "Package '$TARGET' is up to date."
699 else
700 download_source
701 build_package
702 fi
703
704 if [ "$PKGMK_INSTALL" != "no" ]; then
705 install_package
706 fi
707
708 exit 0
709 }
710
711 trap "interrupted" SIGHUP SIGINT SIGQUIT SIGTERM
712
713 export LC_ALL=POSIX
714
715 readonly PKGMK_VERSION="#VERSION#"
716 readonly PKGMK_COMMAND="$0"
717 readonly PKGMK_ROOT="$PWD"
718
719 PKGMK_CONFFILE="/etc/pkgmk.conf"
720 PKGMK_PKGFILE="Pkgfile"
721 PKGMK_FOOTPRINT=".footprint"
722 PKGMK_MD5SUM=".md5sum"
723 PKGMK_NOSTRIP=".nostrip"
724
725 PKGMK_SOURCE_MIRRORS=()
726 PKGMK_SOURCE_DIR="$PWD"
727 PKGMK_PACKAGE_DIR="$PWD"
728 PKGMK_WORK_DIR="$PWD/work"
729
730 PKGMK_COMPRESSION_MODE="gz"
731
732 PKGMK_INSTALL="no"
733 PKGMK_RECURSIVE="no"
734 PKGMK_DOWNLOAD="no"
735 PKGMK_DOWNLOAD_ONLY="no"
736 PKGMK_EXTRACT_ONLY="no"
737 PKGMK_UP_TO_DATE="no"
738 PKGMK_UPDATE_FOOTPRINT="no"
739 PKGMK_IGNORE_FOOTPRINT="no"
740 PKGMK_IGNORE_NEW="no"
741 PKGMK_FORCE="no"
742 PKGMK_KEEP_WORK="no"
743 PKGMK_UPDATE_MD5SUM="no"
744 PKGMK_IGNORE_MD5SUM="no"
745 PKGMK_CHECK_MD5SUM="no"
746 PKGMK_NO_STRIP="no"
747 PKGMK_CLEAN="no"
748
749 main "$@"
750
751 # End of file