+apt-ftparchive -qq --db apt_ftparchive.db --contents packages . > Packages;
+apt-ftparchive -qq --db apt_ftparchive.db sources . > Sources;
+apt-ftparchive -qq --db apt_ftparchive.db contents . > Contents;
+apt-ftparchive -qq --db apt_ftparchive.db \
+ -o APT::FTPArchive::Release::Origin="$ORIGIN" \
+ -o APT::FTPArchive::Release::Label="$LABEL" \
+ -o APT::FTPArchive::Release::Architectures="$ARCHITECTURES" \
+ release . > Release;
+
+for file in Sources Packages Contents; do
+ gzip -c $file > ${file}.gz
+ bzip2 -c $file > ${file}.bz2
+done;
+
+if [ -n "$SIGNING_KEY" ]; then
+ rm -f Release.gpg
+ gpg ${GPG_OPTIONS} --default-key "${SIGNING_KEY}" --armor --output Release.gpg --detach-sign Release
+fi;