The tools dpkg-scanpackages ([http://manpages.debian.net/man/1/dpkg-scanpackages man]) and dpkg-scansources ([http://manpages.debian.net/man/1/dpkg-scansources man]) (from package dpkg-dev) are used to create the index files:

cd /debian
dpkg-scansources dists/local/custom/source | gzip > dists/local/custom/source/Sources.gz
dpkg-scanpackages dists/local/custom/binary-i586 /dev/null | gzip > dists/local/custom/binary-i586/Packages.gz

Override File

An override file must be specified. If no override file exists, /dev/null must be provided.