#!/usr/bin/make -f %: dh $@ override_dh_auto_configure: mkdir -pv $(CURDIR)/ConfigReader mv -v $(CURDIR)/*.pm $(CURDIR)/ConfigReader dh_auto_configure override_dh_auto_clean: # This fallback is only needed by the package maintainer to # clean up the git repository if the build stops between # dh_auto_configure and dh_auto_install. if [ -d $(CURDIR)/ConfigReader ]; then \ mv -v $(CURDIR)/ConfigReader/*.pm $(CURDIR)/; \ rmdir -v $(CURDIR)/ConfigReader; \ patch -p1 -R < debian/patches/fix-pod.patch || true; \ fi # "make distclean" as well as "dh_auto_clean" need a # Makefile.PL. Since upstream didn't include, we add a minimal # one with a patch and that patch needs to be applied even # during the clean target. # # So we check if no patch is applied (manual call of the clean # target) and then apply that one patch and unapply it # again. The other case is the initial calling of the clean # target during the build run, where all patches are already # applied and we don't need to apply any patch and we must not # unapply any patch either. if [ -z "`env QUILT_PATCHES=debian/patches quilt applied`" ]; then \ env QUILT_PATCHES=debian/patches quilt push Makefile.PL.patch; \ fi dh_auto_clean if [ "`env QUILT_PATCHES=debian/patches quilt top`" = Makefile.PL.patch ]; then \ env QUILT_PATCHES=debian/patches quilt pop; \ fi rm -rvf $(CURDIR)/ConfigReader override_dh_auto_install: dh_auto_install mv -v $(CURDIR)/ConfigReader/*.pm $(CURDIR)/ rmdir -v $(CURDIR)/ConfigReader