| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
%: |
| 4 |
dh $@ |
| 5 |
|
| 6 |
override_dh_auto_configure: |
| 7 |
mkdir -pv $(CURDIR)/ConfigReader |
| 8 |
mv -v $(CURDIR)/*.pm $(CURDIR)/ConfigReader |
| 9 |
dh_auto_configure |
| 10 |
|
| 11 |
override_dh_auto_clean: |
| 12 |
# This fallback is only needed by the package maintainer to |
| 13 |
# clean up the git repository if the build stops between |
| 14 |
# dh_auto_configure and dh_auto_install. |
| 15 |
if [ -d $(CURDIR)/ConfigReader ]; then \ |
| 16 |
mv -v $(CURDIR)/ConfigReader/*.pm $(CURDIR)/; \ |
| 17 |
rmdir -v $(CURDIR)/ConfigReader; \ |
| 18 |
patch -p1 -R < debian/patches/fix-pod.patch || true; \ |
| 19 |
fi |
| 20 |
|
| 21 |
# "make distclean" as well as "dh_auto_clean" need a |
| 22 |
# Makefile.PL. Since upstream didn't include, we add a minimal |
| 23 |
# one with a patch and that patch needs to be applied even |
| 24 |
# during the clean target. |
| 25 |
# |
| 26 |
# So we check if no patch is applied (manual call of the clean |
| 27 |
# target) and then apply that one patch and unapply it |
| 28 |
# again. The other case is the initial calling of the clean |
| 29 |
# target during the build run, where all patches are already |
| 30 |
# applied and we don't need to apply any patch and we must not |
| 31 |
# unapply any patch either. |
| 32 |
if [ -z "`env QUILT_PATCHES=debian/patches quilt applied`" ]; then \ |
| 33 |
env QUILT_PATCHES=debian/patches quilt push Makefile.PL.patch; \ |
| 34 |
fi |
| 35 |
dh_auto_clean |
| 36 |
if [ "`env QUILT_PATCHES=debian/patches quilt top`" = Makefile.PL.patch ]; then \ |
| 37 |
env QUILT_PATCHES=debian/patches quilt pop; \ |
| 38 |
fi |
| 39 |
|
| 40 |
rm -rvf $(CURDIR)/ConfigReader |
| 41 |
|
| 42 |
override_dh_auto_install: |
| 43 |
dh_auto_install |
| 44 |
mv -v $(CURDIR)/ConfigReader/*.pm $(CURDIR)/ |
| 45 |
rmdir -v $(CURDIR)/ConfigReader |