Code

rules: Do not manually install listtexts.
[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         # Add here commands to compile the package.
44         $(MAKE)
45         #/usr/bin/docbook-to-man debian/mlmmj.sgml > mlmmj.1
47 build-arch-stamp:
48         touch build-arch-stamp
49 build-indep-stamp: 
50         touch build-indep-stamp
52 build-indep: build-indep-stamp config.status
54 clean: unpatch
55         [ ! -f Makefile ] || $(MAKE) distclean
56         rm -f build-stamp build-indep-stamp build-arch-stamp config.log configure-stamp
57         rm -rf $(CURDIR)/debian/DEBIAN
58         dh_clean 
60 install-arch: build-arch
61         dh_testdir
62         dh_testroot
63         dh_clean -k 
64         dh_installdirs
66         # Add here commands to install the package into debian/mlmmj.
67         $(MAKE) install DESTDIR=$(CURDIR)/debian/mlmmj
69         # Don't advertise that mlmmj-make-ml is a shell script
70         # And install our own version of mlmmj-make-ml, until upstream 
71         # has stabilised somewhat
72         rm -f $(CURDIR)/debian/mlmmj/usr/bin/mlmmj-make-ml.sh
73         install -m 755 -D $(CURDIR)/debian/mlmmj-make-ml.sh \
74                 $(CURDIR)/debian/mlmmj/usr/bin/mlmmj-make-ml
75         mv debian/mlmmj/usr/share/man/man1/mlmmj-make-ml.sh.1 \
76                 debian/mlmmj/usr/share/man/man1/mlmmj-make-ml.1
77         dh_install -s
79 install-indep: build-indep
80         # mlmmj-php-web
81         install -m 644 -D $(CURDIR)/contrib/web/php-user/mlmmj.php \
82                 $(CURDIR)/debian/mlmmj-php-web/var/www/mlmmj-php-web/mlmmj.php
83         install -m 644 -D $(CURDIR)/contrib/web/php-user/README \
84                 $(CURDIR)/debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/README
85         install -m 644 -D $(CURDIR)/contrib/web/php-user/example.html \
86                 $(CURDIR)/debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/examples/examples.html
87         # mlmmj-php-web-admin
88         install -d $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin
89         install -m 644 $(CURDIR)/contrib/web/php-admin/htdocs/*.php \
90                 $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin/
91         install -m 644 $(CURDIR)/contrib/web/php-admin/htdocs/dot.htaccess \
92                 $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin/.htaccess
93         install -m 644 -D $(CURDIR)/contrib/web/php-admin/README \
94                 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/doc/mlmmj-php-web-admin/README
95         install -d $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/conf
96         install -d $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/templates
97         install -m 644 $(CURDIR)/contrib/web/php-admin/conf/* \
98                 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/conf/
99         install -m 644 $(CURDIR)/contrib/web/php-admin/templates/* \
100                 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/templates/
101         install -m 644 -D $(CURDIR)/debian/htpasswd \
102                 $(CURDIR)/debian/mlmmj-php-web-admin/etc/mlmmj-php-web-admin/htpasswd
104 binary-common:
105         dh_testdir
106         dh_testroot
107         dh_installchangelogs ChangeLog
108         dh_installdocs -A FAQ TUNABLES TODO UPGRADE AUTHORS README README.access VERSION README.exim4 README.sendmail
109         dh_installdebconf
110         dh_installexamples
111 #       dh_install
112 #       dh_installmenu
113         dh_installdebconf
114 #       dh_installlogrotate
115 #       dh_installemacsen
116 #       dh_installpam
117 #       dh_installmime
118 #       dh_installinit
119         dh_installcron
120 #       dh_installinfo
121         dh_link
122         dh_strip
123         dh_compress
124         dh_fixperms
125 #       dh_perl
126 #       dh_python
127 #       dh_makeshlibs
128         dh_installdeb
129         dh_shlibdeps
130         dh_gencontrol
131         dh_md5sums
132         dh_builddeb
134 binary-arch: build-arch install-arch
135         $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
137 binary-indep: build-indep install-indep
138         $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
140 binary: binary-arch binary-indep
142 build: build-arch build-indep
144 .PHONY: build-arch build-indep clean binary-indep binary-arch binary-common install-indep install-arch build configure