]> git.donarmstrong.com Git - bin.git/blob - build_archive
switch build_archive to use databases and other features of apt-ftparchive
[bin.git] / build_archive
1 #!/bin/sh
2
3 ORIGIN=donarmstrong
4 LABEL=donarmstrong
5 ARCHITECTURES="all i386 amd64 powerpc"
6
7 if [ -e .build_archive.conf ]; then
8     .build_archive.conf
9 fi;
10
11 if [ ! -e Release ]; then
12     cat - <<EOF > Release
13 Origin: donarmstrong
14 Label: donarmstrong
15 Architectures: all i386
16 EOF
17 fi;
18 apt-ftparchive -qq --db apt_ftparchive.db --contents packages . > Packages;
19 apt-ftparchive -qq --db apt_ftparchive.db sources . > Sources;
20 apt-ftparchive -qq --db apt_ftparchive.db contents . > Contents;
21 apt-ftparchive -qq --db apt_ftparchive.db \
22     -o APT::FTPArchive::Release::Origin="$ORIGIN" \
23     -o APT::FTPArchive::Release::Label="$LABEL" \
24     -o APT::FTPArchive::Release::Architectures="$ARCHITECTURES" \
25     release . > Release;
26
27 for file in Sources Packages Contents; do
28     gzip -c $file > ${file}.gz
29     bzip2 -c $file > ${file}.bz2
30 done;