3 package=${1:-$ZPMPACKAGE}
4 pkgver=${ZPMPKGVER:-1.0}
7 builddate=$(date '+%s')
9 while getopts :f:v:r:d:a:u:l:p:b: opt; do
11 f) pkgfile="$OPTARG" ;;
12 v) pkgver="$OPTARG" ;;
13 r) pkgrel="$OPTARG" ;;
14 d) description="$OPTARG" ;;
17 l) licenses="$OPTARG" ;;
18 p) packager="$OPTARG" ;;
19 b) builddate="$OPTARG" ;;
23 if [ -z "$pkgfile" ]; then
24 pkgfile="$package-$pkgver-$pkgrel.zpm"
29 if [ ! -e $pkgfile ]; then
33 sqlite3 $pkgfile <<EOS
34 insert or ignore into packages ("package", "version", "release", "build_time")
35 values ('$package', '$pkgver', $pkgrel, $builddate)