-// $Id: apt-ftparchive.conf.in,v 1.1.1.1 2006-06-15 11:53:00 adam Exp $
+// $Id: apt-ftparchive.conf.in,v 1.2 2008-10-20 10:24:15 adam Exp $
// This config is for us with the pool-structure for the packages, thus we
// don't use a Tree Section in here
// The debian archive should be in the current working dir
Dir {
ArchiveDir ".";
- CacheDir ".";
+ CacheDir "tmp";
};
// Create Packages, Packages.gz and Packages.bz2, remove what you don't need
// ./pool/main any way you like, apt-ftparchive will take any deb (and
// source package) it can find. This creates a Packages a Sources and a
// Contents file for these in the main section of the sid release
-BinDirectory "pool/@dist@" {
- Packages "dists/@dist@/main/binary-i386/Packages";
- Sources "dists/@dist@/main/source/Sources";
- Contents "dists/@dist@/Contents-i386";
-}
+// BinDirectory "pool/@dist@" {
+// Packages "dists/@dist@/main/binary-i386/Packages";
+// Sources "dists/@dist@/main/source/Sources";
+// Contents "dists/@dist@/Contents-i386";
+// };
-// By default all Packages should have the extension ".deb"
-Default {
- Packages {
- Extensions ".deb";
- };
+TreeDefault {
+ Directory "pool/$(DIST)/$(ARCH)";
+ SrcDirectory "pool/$(DIST)/source";
+ Packages "$(DIST)/$(SECTION)/binary-$(ARCH)/Packages";
+ Sources "$(DIST)/$(SECTION)/source/Sources";
+ Contents "$(DIST)/Contents-$(ARCH)";
};
+Tree "dists/@dist@" {
+ Sections "main";
+ Architectures "source @architectures@";
+ SrcOverride "/dev/null";
+};
+// By default all Packages should have the extension ".deb"
+//Default {
+// Packages {
+// Extensions ".deb";
+// };
+//};
+
#!/bin/sh
-# $Id: update-archive.sh,v 1.12 2007-11-11 19:47:15 adam Exp $
+# $Id: update-archive.sh,v 1.13 2008-10-20 10:24:15 adam Exp $
if test ! -f apt-ftparchive.conf.in; then
echo "$0: apt-ftparchive.conf.in must be located in current directory"
exit 1
confdir=`pwd`
cd $debiandir
+# Uncomment to clean the .db (cache)
+# rm ${debiandir}/tmp/*
+
+architectures="i386 amd64"
+
for dist in lenny etch sarge woody; do
# Make symlinks from the regular FTP archive
- d=pool/$dist
+ d=pool/dists/$dist
if test ! -d $d; then mkdir -p $d; fi
for l in $d/*; do
if test -L $l; then
fi
fi
done
- ln -sf /home/ftp/pub/*/debian/$dist/* $d
+ # ln -sf /home/ftp/pub/*/debian/$dist/* $d
+ mkdir -p $d/source
+ ln -sf /home/ftp/pub/*/debian/$dist/* $d/source
+ rm $d/source/*.deb
+ for arch in $architectures; do
+ mkdir -p $d/${arch}
+ ln -sf /home/ftp/pub/*/debian/$dist/*_${arch}.* $d/${arch}
+ ln -sf /home/ftp/pub/*/debian/$dist/*_all.* $d/${arch}
+ done
# ${confdir}/symclean.sh $d
- d=dists/$dist/main/binary-i386
- if test ! -d $d; then mkdir -p $d; fi
- echo "Archive: $dist" >$d/Release
- echo 'Component: main' >>$d/Release
- echo 'Origin: Indexdata' >>$d/Release
- echo 'Architecture: i386' >>$d/Release
+ for arch in $architectures; do
+ d=dists/$dist/main/binary-$arch
+ if test ! -d $d; then mkdir -p $d; fi
+ echo "Archive: $dist" >$d/Release
+ echo 'Component: main' >>$d/Release
+ echo 'Origin: Indexdata' >>$d/Release
+ echo "Architecture: $arch" >>$d/Release
+ done
d=dists/$dist/main/source
if test ! -d $d; then mkdir -p $d; fi
echo 'Architecture: source' >>$d/Release
# generate
+ echo "Begin Generate $dist"
F=apt-ftparchive.conf
- sed "s/@dist@/$dist/g" <${confdir}/${F}.in >$F
+ sed "s/@dist@/$dist/g" <${confdir}/${F}.in |sed "s/@architectures@/${architectures}/g" > $F
# Don't know if clean is needed!
# apt-ftparchive clean apt-ftparchive.conf
apt-ftparchive generate apt-ftparchive.conf
+ echo "Done generate $dist"
# release
r=dists/$dist/Release
F=apt-release.conf
- sed "s/@dist@/$dist/g" <${confdir}/${F}.in >$F
+ sed "s/@dist@/$dist/g" <${confdir}/${F}.in | sed "s/@architectures@/${architectures}/g" >$F
# Move Release file away while calling using release
rm $r
apt-ftparchive -c $F release dists/$dist >tmp_Release
mv tmp_Release $r
# sign
- r=dists/$dist/Release
- rm -f ${r}.gpg
- gpg --sign -u "Index Data" -ba -o ${r}.gpg dists/$dist/Release
-
- # Make symlinks to make old sources list work (makedeb.sh compat)
- F=dists/indexdata/$dist
- if test ! -d $F; then
- mkdir -p $F
- fi
- F=dists/indexdata/$dist/released
- if test ! -d $F; then
- ln -s /home/ftp/pub/debian/dists/$dist/main $F
+ if true; then
+ r=dists/$dist/Release
+ rm -f ${r}.gpg
+ gpg --sign -u "Index Data" -ba -o ${r}.gpg dists/$dist/Release
fi
done
# Local Variables: