3 package=${1:-$ZPMPACKAGE}
4 pkgver=${ZPMPACKAGEVER:-1.0}
5 pkgrel=${ZPMPACKAGEREL:-1}
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"
23 if [ ! -f $pkgfile ]; then
24 echo $pkgfile missing 1>&2
29 hash=$(./zpm-addfile $pkgfile $path)
31 sqlite3 $pkgfile <<EOS
32 create table if not exists packagefiles (
34 subpackage text, -- libs, dev, client, server, whatever
37 filetype text -- e.g. config, etc?
39 insert into packagefiles
40 values ('$package', nullif('$subpackage', ''), '$hash', '$path', NULL)