#! /usr/bin/make -f
## debian/rules to build the fake upgrade Perl debian packages

build:
	true

binary-indep:
	install -d debian/tmp/DEBIAN
	install -d debian/tmp-debug/DEBIAN
	install -d debian/tmp-suid/DEBIAN
	install -d debian/tmp/usr/doc
	install -d debian/tmp-debug/usr/doc
	install -d debian/tmp-suid/usr/doc

	ln -s perl-5.004       debian/tmp/usr/doc/perl
	ln -s perl-5.004-debug debian/tmp-debug/usr/doc/perl-debug
	ln -s perl-5.004-suid  debian/tmp-suid/usr/doc/perl-suid

	chmod -R go=rX debian/tmp debian/tmp-debug debian/tmp-suid
	chmod -R u+w   debian/tmp debian/tmp-debug debian/tmp-suid

	dpkg-gencontrol -pperl
	dpkg-gencontrol -pperl-debug -Pdebian/tmp-debug
	dpkg-gencontrol -pperl-suid  -Pdebian/tmp-suid
	chmod 644 debian/tmp/DEBIAN/control debian/tmp-debug/DEBIAN/control debian/tmp-suid/DEBIAN/control

	chown -R root:root debian/tmp debian/tmp-debug debian/tmp-suid
	dpkg --build debian/tmp       ..
	dpkg --build debian/tmp-debug ..
	dpkg --build debian/tmp-suid  ..

binary-arch:
	true
# There are no architecture-dependent files to be uploaded
# generated by this package.  If there were any, they would be
# made here.


binary: binary-indep binary-arch

clean:
	-rm -rf *~ debian/*~ debian/files*
	-[ -d debian/tmp ] && rm -rf debian/tmp debian/tmp-debug debian/tmp-suid 2>/dev/null

.PHONY: binary binary-arch binary-indep clean build
