-// $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
+APT::FTPArchive::Release {
+ Origin "Index Data";
+ Label "Index Data";
+ Suite "@dist@";
+ Codename "@dist@";
+ Architectures "@architectures@";
+ Components "@sections@";
+ Description "Index Data Debian packages";
+}
-// The debian archive should be in the current working dir
Dir {
ArchiveDir ".";
OverrideDir ".";
CacheDir "tmp";
};
-// Create Packages, Packages.gz and Packages.bz2, remove what you don't need
Default {
+ Packages::Extensions ".deb";
Packages::Compress ". gzip bzip2";
Sources::Compress ". gzip bzip2";
Contents::Compress ". gzip bzip2";
};
-// Includes the main section. You can structure the directory tree under
-// ./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";
-// };
-
TreeDefault {
Directory "pool/$(DIST)/$(SECTION)/$(ARCH)";
SrcDirectory "pool/$(DIST)/$(SECTION)/source";
Architectures "source @architectures@";
SrcOverride "override";
};
-// By default all Packages should have the extension ".deb"
-//Default {
-// Packages {
-// Extensions ".deb";
-// };
-//};
echo "$0: ${condir}/apt-ftparchive.conf.in not found"
exit 1
fi
-if test ! -f ${confdir}/apt-release.conf.in; then
- echo "$0: ${condir}/apt-release.conf.in not found"
- exit 1
-fi
-
if test ! -x /usr/bin/apt-ftparchive; then
echo "$0: /usr/bin/apt-ftparchive missing. Install apt-utils"
exit 1
fi
# gpg -a -d -o Release.gpg Release
-
+
architectures="i386 amd64"
if test "$DEBIAN_DIST"; then
exit 1
fi
cd $ftpdir
- test -d tmp || mkdir tmp
+ mkdir -p tmp
# Uncomment to clean the .db (cache)
if $clear; then
rm tmp/*
for section in main restricted; do
# Prepare pool
d=pool/dists/$fdist/$section
- if test ! -d $d; then mkdir -p $d; fi
+ mkdir -p $d
mkdir -p $d/source
# Remove invalid symlinks (source, i386, amd64,..)
for l in $d/*/*; do
fi
for arch in $architectures; do
d=dists/$fdist/$section/binary-$arch
- if test ! -d $d; then mkdir -p $d; fi
+ mkdir -p $d
echo "Archive: $fdist" >$d/Release
echo "Component: $section" >>$d/Release
- echo 'Origin: Indexdata' >>$d/Release
+ echo 'Origin: Index Data' >>$d/Release
echo "Architecture: $arch" >>$d/Release
done
d=dists/$fdist/$section/source
- if test ! -d $d; then mkdir -p $d; fi
+ mkdir -p $d
echo "Archive: $fdist" >$d/Release
echo "Component: $section" >>$d/Release
- echo 'Origin: Indexdata' >>$d/Release
+ echo 'Origin: Index Data' >>$d/Release
echo 'Architecture: source' >>$d/Release
fi
done
- # generate
- echo "Begin Generate $fdist: $sections"
- F=apt-ftparchive.conf
- sed "s/@dist@/$fdist/g" <${confdir}/${F}.in | \
- sed "s/@architectures@/${architectures}/g" | \
- sed "s/@sections@/${sections}/g" > $F
- # Don't know if clean is needed!
- # apt-ftparchive clean apt-ftparchive.conf
- apt-ftparchive generate apt-ftparchive.conf 2>&1
- echo "Done generate $fdist: $sections"
-
- # release
- r=dists/$fdist/Release
- F=apt-release.conf
- sed "s/@dist@/$fdist/g" <${confdir}/${F}.in | \
- sed "s/@architectures@/${architectures}/g" | \
- sed "s/@sections@/${sections}/g" > $F
- # Move Release file away while calling using release
- rm -f $r
- apt-ftparchive -c $F release dists/$fdist >tmp_Release
- if $noauto; then
- sed -e 's/^Suite:/NotAutomatic: yes\nButAutomaticUpgrades: yes\nSuite:/g' <tmp_Release >$r
- else
- mv tmp_Release $r
- fi
-
- # sign
- if true; then
+ if test -n "$sections"; then
+ F=apt-ftparchive.conf
+ sed "s/@dist@/$fdist/g" <${confdir}/${F}.in | \
+ sed "s/@architectures@/${architectures}/g" | \
+ sed "s/@sections@/${sections}/g" > $F
+ apt-ftparchive generate apt-ftparchive.conf 2>&1
+ r=dists/$fdist/Release
+ rm -f $r # Move Release file away while calling using release
+ apt-ftparchive -c $F release dists/$fdist >tmp_Release
+ if $noauto; then
+ sed -e 's/^Suite:/NotAutomatic: yes\nButAutomaticUpgrades: yes\nSuite:/g' <tmp_Release >$r
+ else
+ mv tmp_Release $r
+ fi
rm -f ${r}.gpg
gpg --sign -u "Index Data" -ba -o ${r}.gpg $r
fi
done
# Local Variables:
# mode:shell-script
-# sh-indentation: 2
+# sh-indentation: 8
# sh-basic-offset: 8
# End: