3 package=${1:-$ZPMPACKAGE}
4 pkgver=${ZPMPKGVER:-1.0}
7 while getopts :n:v:r:d:a:u:l:p:b: opt; do
9 n) pkgfile="$OPTARG" ;;
10 v) pkgver="$OPTARG" ;;
11 r) pkgrel="$OPTARG" ;;
12 d) description="$OPTARG" ;;
15 l) licenses="$OPTARG" ;;
16 p) packager="$OPTARG" ;;
17 b) builddate="$OPTARG" ;;
21 pkgfile="$package-$pkgver-$pkgrel.zpm"
25 if [ ! -f $pkgfile ]; then
30 hash=$(./zpm-addfile $pkgfile $path)
32 sqlite3 $pkgfile <<EOS
33 insert into packagefiles
34 values ('$package', nullif('$subpackage', ''), '$hash', '$path', NULL)