3 pkgver=${ZPMPKGVER:-1.0}
6 builddate=$(date '+%s')
8 while getopts :f:v:r:d:a:u:l:p:b:I opt; do
10 f) pkgfile="$OPTARG" ;;
11 v) pkgver="$OPTARG" ;;
12 r) pkgrel="$OPTARG" ;;
13 d) description="$OPTARG" ;;
16 l) licenses="$OPTARG" ;;
17 p) packager="$OPTARG" ;;
18 b) builddate="$OPTARG" ;;
22 shift $(( OPTIND - 1))
32 if [ -z "$package" ]; then
33 die "must specify package"
36 if [ -z "$pkgfile" ]; then
37 pkgfile="$package-$pkgver-$pkgrel.zpm"
42 if [ ! -e $pkgfile ]; then
46 if [ "$idempotent" = 1 ]; then
47 idempotent='or ignore'
50 sqlite3 $pkgfile <<EOS
51 insert $idempotent into packages ("package", "version", "release", "build_time")
52 values ('$package', '$pkgver', $pkgrel, $builddate)