maint: renamed RPM GPG key filename from -binary-meta to -barry
[barry.git] / maintainer / make-apt.sh
blob5478a932fa8956933a08d94647ad936a87302d68
1 #!/bin/bash
3 set -e
5 if [ -z "$1" ] ; then
6 echo "Usage: make-apt.sh builddir"
7 exit 1
8 fi
10 BUILDDIR="$1"
12 if [ -z "$GPG_AGENT_INFO" ] ; then
13 echo "Press enter to continue if gpg-agent is running,"
14 echo "Otherwise, run:"
15 echo
16 echo " eval \$(gpg-agent --daemon)"
17 echo
18 echo "to preserve your sanity."
19 read
22 # Work inside the build directory, so it doesn't show up in Packages pathnames
23 cd $BUILDDIR
25 # Build Packages and Contents, for all distros, per arch
26 for arch in i386 amd64 ; do
27 for dir in $(find dists -name "binary-$arch" -type d -print) ; do
28 apt-ftparchive packages $dir | tee $dir/Packages | gzip -9c > $dir/Packages.gz
29 apt-ftparchive contents $dir | gzip -9c > $dir/../../Contents-$arch.gz
30 done
31 done
33 # Build signed Release files for all debian distros
34 # Make sure you have gpg-agent running, or this will be a pain...
35 cd dists
36 for dir in * ; do
37 if [ -f ../../apt/$dir.conf ] ; then
38 (cd $dir && apt-ftparchive -c ../../../apt/$dir.conf release . > Release)
39 gpg --use-agent --default-key B6C2250E --armor \
40 --output $dir/Release.gpg \
41 --detach-sign $dir/Release
42 else
43 echo "WARNING: conf file for $dir not found under apt/"
45 done