| 1 | #!/usr/bin/make -f |
| 2 | # -*- makefile -*- |
| 3 | |
| 4 | CFLAGS = -Wall -g |
| 5 | ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
| 6 | CFLAGS += -O0 |
| 7 | else |
| 8 | CFLAGS += -O2 |
| 9 | endif |
| 10 | |
| 11 | build-apache13: |
| 12 | dh_testdir |
| 13 | chmod +x regen.sh |
| 14 | ./regen.sh |
| 15 | make clean |
| 16 | ./configure \ |
| 17 | --with-afs-libs=/usr/lib/afs \ |
| 18 | --with-afs-headers=/usr/include/afs \ |
| 19 | --with-apxs=/usr/bin/apxs |
| 20 | $(MAKE) |
| 21 | |
| 22 | build-apache20: |
| 23 | dh_testdir |
| 24 | chmod +x regen.sh |
| 25 | ./regen.sh |
| 26 | make clean |
| 27 | ./configure \ |
| 28 | --with-afs-libs=/usr/lib/afs \ |
| 29 | --with-afs-headers=/usr/include/afs \ |
| 30 | --with-apache-headers=/usr/include/apache2 \ |
| 31 | --with-apxs=/usr/bin/apxs2 |
| 32 | $(MAKE) |
| 33 | mv .libs/mod_waklog.so .; true |
| 34 | |
| 35 | apache13: build-apache13 |
| 36 | dh_testdir |
| 37 | dh_testroot |
| 38 | dh_clean -k --exclude ./_darcs/current/Makefile.orig --exclude ./Makefile.orig |
| 39 | dh_installdirs |
| 40 | mkdir -p debian/libapache-mod-waklog/usr/lib/apache/1.3/ |
| 41 | mkdir -p debian/libapache-mod-waklog/etc/apache/conf.d/ |
| 42 | cp mod_waklog.so debian/libapache-mod-waklog/usr/lib/apache/1.3/ |
| 43 | cp debian/waklog.load debian/libapache-mod-waklog/etc/apache/conf.d/waklog.conf |
| 44 | |
| 45 | apache20: build-apache20 |
| 46 | dh_testdir |
| 47 | dh_testroot |
| 48 | dh_clean -k --exclude ./_darcs/current/Makefile.orig --exclude ./Makefile.orig |
| 49 | dh_installdirs |
| 50 | mkdir -p debian/libapache2-mod-waklog/usr/lib/apache2/modules/ |
| 51 | mkdir -p debian/libapache2-mod-waklog/etc/apache2/mods-available |
| 52 | cp mod_waklog.so debian/libapache2-mod-waklog/usr/lib/apache2/modules/ |
| 53 | cp debian/waklog.load debian/libapache2-mod-waklog/etc/apache2/mods-available |
| 54 | |
| 55 | clean: |
| 56 | dh_testdir |
| 57 | dh_testroot |
| 58 | rm -rf build-stamp .libs |
| 59 | -$(MAKE) clean |
| 60 | dh_clean --exclude ./_darcs/current/Makefile.orig --exclude ./Makefile.orig |
| 61 | |
| 62 | binary-indep: |
| 63 | |
| 64 | binary-arch: apache13 apache20 |
| 65 | dh_testdir |
| 66 | dh_testroot |
| 67 | dh_installchangelogs |
| 68 | dh_installdocs |
| 69 | dh_installexamples |
| 70 | dh_installman |
| 71 | dh_link |
| 72 | #dh_strip |
| 73 | dh_compress |
| 74 | dh_fixperms |
| 75 | dh_installdeb |
| 76 | dh_shlibdeps |
| 77 | dh_gencontrol |
| 78 | dh_md5sums |
| 79 | dh_builddeb |
| 80 | |
| 81 | binary: binary-indep binary-arch |
| 82 | .PHONY: build clean binary-indep binary-arch binary install configure |