all: copy  karmic-build jaunty-build intrepid-build hardy-build

copy:
	cp -uRv /home/abe/deb/karmic .
	cp -uRv /home/abe/deb/jaunty .
#	cp -uRv /home/abe/deb/hardy .
#	cp -uRv /home/abe/deb/intrepid .

karmic-build:
	chgrp -Rf ruby karmic
	chmod -Rf 664 karmic
	chmod 775 karmic
	chmod 775 karmic/binary* karmic/source
	apt-ftparchive contents -c AptConf_for_karmic.txt karmic > Contents
	apt-ftparchive packages -c AptConf_for_karmic.txt karmic > Packages
	apt-ftparchive sources -c AptConf_for_karmic.txt karmic > Sources
	gzip -c Packages > Packages.gz
	gzip -c Sources > Sources.gz
	apt-ftparchive release -c AptConf_for_karmic.txt karmic > Release
	gpg --sign -ba -o Release.gpg Release
	mv Contents Packages Packages.gz Sources Sources.gz Release Release.gpg karmic
	chmod -Rf 664 karmic
	chmod 775 karmic
	chmod 775 karmic/binary* karmic/source

jaunty-build:
	chgrp -Rf ruby jaunty
	chmod -Rf 664 jaunty
	chmod 775 jaunty
	chmod 775 jaunty/binary* jaunty/source
	apt-ftparchive contents -c AptConf_for_jaunty.txt jaunty > Contents
	apt-ftparchive packages -c AptConf_for_jaunty.txt jaunty > Packages
	apt-ftparchive sources -c AptConf_for_jaunty.txt jaunty > Sources
	gzip -c Packages > Packages.gz
	gzip -c Sources > Sources.gz
	apt-ftparchive release -c AptConf_for_jaunty.txt jaunty > Release
	gpg --sign -ba -o Release.gpg Release
	mv Contents Packages Packages.gz Sources Sources.gz Release Release.gpg jaunty
	chmod -Rf 664 jaunty
	chmod 775 jaunty
	chmod 775 jaunty/binary* jaunty/source

intrepid-build:
	chgrp -Rf ruby intrepid
	chmod -Rf 664 intrepid
	chmod 775 intrepid
	chmod 775 intrepid/binary* intrepid/source
	apt-ftparchive contents -c AptConf_for_intrepid.txt intrepid > Contents
	apt-ftparchive packages -c AptConf_for_intrepid.txt intrepid > Packages
	apt-ftparchive sources -c AptConf_for_intrepid.txt intrepid > Sources
	gzip -c Packages > Packages.gz
	gzip -c Sources > Sources.gz
	apt-ftparchive release -c AptConf_for_intrepid.txt intrepid > Release
	gpg --sign -ba -o Release.gpg Release
	mv Contents Packages Packages.gz Sources Sources.gz Release Release.gpg intrepid
	chmod -Rf 664 intrepid
	chmod 775 intrepid
	chmod 775 intrepid/binary* intrepid/source

hardy-build:
	chgrp -Rf ruby hardy
	chmod -Rf 664 hardy
	chmod 775 hardy
	chmod 775 hardy/binary* hardy/source
	apt-ftparchive contents -c AptConf_for_hardy.txt hardy > Contents
	apt-ftparchive packages -c AptConf_for_hardy.txt hardy > Packages
	apt-ftparchive sources -c AptConf_for_hardy.txt hardy > Sources
	gzip -c Packages > Packages.gz
	gzip -c Sources > Sources.gz
	apt-ftparchive release -c AptConf_for_hardy.txt hardy > Release
	gpg --sign -ba -o Release.gpg Release
	mv Contents Packages Packages.gz Sources Sources.gz Release Release.gpg hardy
	chmod -Rf 664 hardy
	chmod 775 hardy
	chmod 775 hardy/binary* hardy/source
