Code

rules: Removed unnecessary comments.
[pkg-mlmmj.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
6 # Uncomment this to turn on verbose mode.
7 #export DH_VERBOSE=1
9 export PACKAGE=mlmmj
10 export DH_OPTIONS
11 export TEXTDIR = $(CURDIR)/debian/mlmmj/usr/share/mlmmj/text.skel
12 CONFIGURERUN=no
14 include /usr/share/dpatch/dpatch.make
16 # These are used for cross-compiling and for saving the configure script
17 # from having to guess our platform (since we know it already)
18 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
19 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
21 confflags := --prefix=/usr --mandir=/usr/share/man
22 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
23         confflags += --build=$(DEB_BUILD_GNU_TYPE)
24 else
25         confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
26 endif
29 export CFLAGS = -Wall -g
30 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
31         CFLAGS += -O0
32 else
33         CFLAGS += -O2
34 endif
37 config.status: patch-stamp configure
38         ./configure $(confflags)
40 build-arch: build-arch-stamp config.status
41         dh_testdir
43         $(MAKE)
45 build-arch-stamp:
46         touch build-arch-stamp
47 build-indep-stamp: 
48         touch build-indep-stamp
50 build-indep: build-indep-stamp config.status
52 clean: unpatch
53         [ ! -f Makefile ] || $(MAKE) distclean
54         rm -f build-stamp build-indep-stamp build-arch-stamp config.log configure-stamp
55         rm -rf $(CURDIR)/debian/DEBIAN
56         dh_clean 
58 install-arch: build-arch
59         dh_testdir
60         dh_testroot
61         dh_clean -k 
62         dh_installdirs
64         $(MAKE) install DESTDIR=$(CURDIR)/debian/mlmmj
66         # Don't advertise that mlmmj-make-ml is a shell script
67         # And install our own version of mlmmj-make-ml, until upstream 
68         # has stabilised somewhat
69         rm -f $(CURDIR)/debian/mlmmj/usr/bin/mlmmj-make-ml.sh
70         install -m 755 -D $(CURDIR)/debian/mlmmj-make-ml \
71                 $(CURDIR)/debian/mlmmj/usr/bin/mlmmj-make-ml
72         mv debian/mlmmj/usr/share/man/man1/mlmmj-make-ml.sh.1 \
73                 debian/mlmmj/usr/share/man/man1/mlmmj-make-ml.1
74         dh_install -s
76 install-indep: build-indep
77         # mlmmj-php-web
78         install -m 644 -D $(CURDIR)/contrib/web/php-user/mlmmj.php \
79                 $(CURDIR)/debian/mlmmj-php-web/var/www/mlmmj-php-web/mlmmj.php
80         install -m 644 -D $(CURDIR)/contrib/web/php-user/README \
81                 $(CURDIR)/debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/README
82         install -m 644 -D $(CURDIR)/contrib/web/php-user/example.html \
83                 $(CURDIR)/debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/examples/examples.html
84         # mlmmj-php-web-admin
85         install -d $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin
86         install -m 644 $(CURDIR)/contrib/web/php-admin/htdocs/*.php \
87                 $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin/
88         install -m 644 $(CURDIR)/contrib/web/php-admin/htdocs/dot.htaccess \
89                 $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin/.htaccess
90         install -m 644 -D $(CURDIR)/contrib/web/php-admin/README \
91                 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/doc/mlmmj-php-web-admin/README
92         install -d $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/conf
93         install -d $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/templates
94         install -m 644 $(CURDIR)/contrib/web/php-admin/conf/* \
95                 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/conf/
96         install -m 644 $(CURDIR)/contrib/web/php-admin/templates/* \
97                 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/templates/
98         install -m 644 -D $(CURDIR)/debian/htpasswd \
99                 $(CURDIR)/debian/mlmmj-php-web-admin/etc/mlmmj-php-web-admin/htpasswd
101 binary-common:
102         dh_testdir
103         dh_testroot
104         dh_installchangelogs ChangeLog
105         dh_installdocs -A FAQ TUNABLES TODO UPGRADE AUTHORS README README.access VERSION README.exim4 README.sendmail
106         dh_installdebconf
107         dh_installexamples
108         dh_installdebconf
109         dh_installcron
110         dh_link
111         dh_strip
112         dh_compress
113         dh_fixperms
114         dh_installdeb
115         dh_shlibdeps
116         dh_gencontrol
117         dh_md5sums
118         dh_builddeb
120 binary-arch: build-arch install-arch
121         $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
123 binary-indep: build-indep install-indep
124         $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
126 binary: binary-arch binary-indep
128 build: build-arch build-indep
130 .PHONY: build-arch build-indep clean binary-indep binary-arch binary-common install-indep install-arch build configure