| 1 | #!/bin/sh |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | tempdir="$(mktemp -d /tmp/dc-apkg-XXXXXX)" |
| 6 | cd "$tempdir" |
| 7 | git clone git://git.dolda2000.com/doldaconnect |
| 8 | cd doldaconnect |
| 9 | if [ -n "$1" ]; then |
| 10 | git checkout "$1" |
| 11 | fi |
| 12 | ./bootstrap |
| 13 | ./configure |
| 14 | |
| 15 | packages="`cat autopackage/build`" |
| 16 | version="`sed -n 's/^.* VERSION "\([^"]*\)".*$/\1/p' config.h`" |
| 17 | |
| 18 | for pkg in $packages; do |
| 19 | sfile="autopackage/$pkg.apspec" |
| 20 | pname="$(sed -n 's/^ShortName: *\([^ ]\+\)$/\1/p' "$sfile")" |
| 21 | if [ -z "$pname" ]; then |
| 22 | echo "makeall: could not find apkg shortname for $sfile" >&2 |
| 23 | exit 1 |
| 24 | fi |
| 25 | make clean |
| 26 | PACKAGEFILENAME="$pname.package" makepackage "$sfile" |
| 27 | mv "$pname-$version.package" "$pname-$version.package.meta" "$pname.xml" "$tempdir" |
| 28 | done |
| 29 | |
| 30 | rm -rf "$tempdir/doldaconnect" |
| 31 | |
| 32 | echo "packages are in $tempdir" |