Debian Repository erzeugen

Aus MHC-Wiki

Wechseln zu: Navigation, Suche

/etc/build_repo.conf

BASE="/var/www"

REPO="reponame"

dists="etch lenny squeeze"

stable="squeeze"

oldstable="lenny"

Verzeichnis $BASE/pool muss existieren und die Debs enthalten (nur noarch !)

/usr/local/bin/build_repo

#!/bin/sh

. /etc/build_repo.conf

DIST_PATH=$BASE/$REPO/dists

# cleanup
rm -rf $BASE/$REPO

# Dist-Folder erzugen
for f in $dists
do
	echo "creating dist: $f"
	mkdir -p $DIST_PATH/$f/contrib/binary-i386
	mkdir -p $DIST_PATH/$f/contrib/binary-amd64
done

echo "linking stable"
ln -s $DIST_PATH/$stable $DIST_PATH/stable
echo "linking oldstable"
ln -s $DIST_PATH/$oldstable $DIST_PATH/oldstable

# Packages.gz erzugen

cd $BASE
dpkg-scanpackages pool > /tmp/Pool

cd $DIST_PATH
for i in `find . -type d | grep "-" | sed "s/^\.\///"`
do
	cat /tmp/Pool | gzip -9c > $i/Packages.gz
	cat /tmp/Pool | bzip2 > $i/Packages.bz2
done

rm -r /tmp/Pool
Persönliche Werkzeuge
Navigation