Removed apache 1.x module build
[manu/suphp.git] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 #export DH_VERBOSE=1
7
8 # This is the debhelper compatibility version to use.
9 export DH_COMPAT=4
10
11 # These are used for cross-compiling and for saving the configure script
12 # from having to guess our platform (since we know it already)
13 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
15
16
17 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
18         CFLAGS += -g
19 endif
20 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
21         INSTALL_PROGRAM += -s
22 endif
23
24 patch:
25         dpatch apply-all
26
27 configure-apache2: patch
28         dh_testdir
29         CPPFLAGS="`pkg-config --cflags apr-1`" ./configure --prefix=/usr \
30         --sysconfdir=/etc/suphp \
31         --with-apxs=/usr/bin/apxs2 \
32         --with-apache-user=www-data \
33         --with-php=/usr/bin/php-cgi \
34         --sbindir=/usr/lib/suphp \
35         --with-setid-mode=owner \
36         --with-logfile=/var/log/suphp/suphp.log
37
38
39 build-apache2: configure-apache2
40         dh_testdir
41         $(MAKE)
42
43 build:
44
45 clean:
46         dh_testdir
47         dh_testroot
48         -$(MAKE) clean
49         rm -f config.log config.status src/config.h
50         rm -f libtool src/stamp-h
51         find . -name .libs | xargs rm -rf
52         find . -name .deps | xargs rm -rf
53         rm -f src/apache/mod_suphp.o src/apache/mod_suphp.lo src/apache/mod_suphp.la src/stamp-h1
54         find . -name Makefile | xargs rm -f
55         dh_clean
56         dpatch deapply-all
57         rm -rf debian/patched
58
59 install: build-apache2
60         dh_testdir
61         dh_testroot
62         dh_clean -k
63         find -name ".svn" -type d | xargs rm -rf
64         dh_installdirs
65         dh_install
66         docbook-to-man debian/suphp-common.manpage.sgml > debian/suphp-common/usr/share/man/man8/suphp.8
67         install -m 644 debian/suphp-common.lintian-override debian/suphp-common/usr/share/lintian/overrides/suphp-common
68         mv debian/suphp-common/etc/suphp/suphp.conf-example debian/suphp-common/etc/suphp/suphp.conf
69         mv debian/libapache2-mod-suphp/usr/lib/apache2/modules/mod_suphp.so.0.0.0 debian/libapache2-mod-suphp/usr/lib/apache2/modules/mod_suphp.so
70
71
72 # Build architecture-independent files here.
73 binary-indep: 
74 # We have nothing to do by default.
75
76 # Build architecture-dependent files here.
77 binary-arch: install
78         dh_testdir
79         dh_testroot
80 #       dh_installdebconf       
81         dh_installdocs
82         mv debian/libapache2-mod-suphp/usr/share/doc/libapache2-mod-suphp/INSTALL debian/libapache2-mod-suphp/usr/share/doc/libapache2-mod-suphp/README
83 #       dh_installexamples
84 #       dh_installmenu
85         dh_installlogrotate
86 #       dh_installemacsen
87 #       dh_installpam
88 #       dh_installmime
89 #       dh_installinit
90 #       dh_installcron
91 #       dh_installman
92 #       dh_installinfo
93         dh_installchangelogs ChangeLog
94         dh_link
95         dh_strip
96         dh_compress
97         dh_fixperms
98         chmod u+s debian/suphp-common/usr/lib/suphp/suphp
99 #       dh_makeshlibs
100         dh_installdeb
101 #       dh_perl
102         dh_shlibdeps
103         dh_gencontrol
104         dh_md5sums
105         dh_builddeb
106
107 binary: binary-indep binary-arch
108 .PHONY: configure build build-apache2 clean binary-indep binary-arch binary install patch unpatch