1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
include /usr/share/quilt/quilt.make
# If set to a true value then MakeMaker's prompt function will
# always return the default without waiting for user input.
export PERL_MM_USE_DEFAULT=1
ifndef PERL
PERL = /usr/bin/perl
endif
TMP =$(CURDIR)/debian/tmp
LA2MP2 =$(CURDIR)/debian/libapache2-mod-perl2
# Allow disabling build optimation by setting noopt in
# $DEB_BUILD_OPTIONS
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
.PHONY: build
build: build-stamp
build-stamp: $(QUILT_STAMPFN)
dh_testdir
# Add commands to compile the package here
$(PERL) Makefile.PL \
INSTALLDIRS=vendor \
MP_USE_GTOP=1 \
MP_TRACE=0 \
MP_USE_DSO=1 \
MP_USE_STATIC=0 \
MP_CCOPTS="-g -Wall" \
MP_INCLUDE_DIR=/usr/include/apache2 \
MP_APXS=/usr/bin/apxs2 \
MP_INCLUDE_DIR=/usr/include/apr-1.0
$(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH=""
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
APACHE_TEST_EXTRA_ARGS="-httpd_conf /etc/apache2/apache2.conf" LANG=C $(MAKE) test
endif
touch $@
.PHONY: clean
clean: unpatch
dh_testdir
dh_testroot
dh_clean build-stamp install-stamp
# Add commands to clean up after the build process here
# unpatch modifies Makefile.PL, rendering Makefile out of date
if [ -f Makefile ] ; then touch Makefile && $(MAKE) realclean ; fi
dh_clean .mypacklist Apache-Test/Makefile.old Apache-Test/t/REPORT \
Apache-Test/t/cgi-bin/cookies.pl \
Apache-Test/t/cgi-bin/next_available_port.pl\
ModPerl-Registry/Makefile.old t/conf/perlsection.conf \
t/htdocs/perlio/test
[ ! -d t/htdocs/hooks ] || rm -r t/htdocs/hooks
[ ! -d lib/Apache ] || rm -r lib/Apache
[ ! -d WrapXS ] || rm -r WrapXS
.PHONY: install
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
# As this is a architecture dependent package, we are not
# supposed to install stuff to /usr/share. MakeMaker creates
# the dirs, we delete them from the deb:
[ ! -d $(TMP)/usr/share/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(TMP)/usr/share/perl5
touch $@
.PHONY: binary-indep
# Build architecture-independent files here.
binary-indep: build install
dh_testdir
dh_testroot
dh_installexamples -i
dh_installdocs -i
dh_installchangelogs -i Changes
dh_install -i
dh_perl -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
.PHONY: binary-arch
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installdirs -a
dh_installexamples -a
dh_installdocs -a
dh_installchangelogs -a Changes
dh_install -a
mv $(LA2MP2)/usr/bin/mp2bug $(LA2MP2)/usr/share/libapache2-mod-perl2/
rmdir --ignore-fail-on-non-empty --parents $(LA2MP2)/usr/bin/
install -m755 debian/libapache2-mod-perl2.bug $(LA2MP2)/usr/share/bug/libapache2-mod-perl2
dh_shlibdeps -a
dh_strip -a
dh_perl -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
.PHONY: binary
binary: binary-indep binary-arch
|