Code

rules: Rename mlmmj-make-ml.sh.1 to mlmmj-make-ml.1.
[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         # Install translated list texts
71         install -d \
72                 $(TEXTDIR)/da/ \
73                 $(TEXTDIR)/cz/ \
74                 $(TEXTDIR)/it/ \
75                 $(TEXTDIR)/de/ \
76                 $(TEXTDIR)/es/
77         install -m 644 listtexts/da/* $(TEXTDIR)/da/
78         install -m 644 listtexts/cz/* $(TEXTDIR)/cz/
79         install -m 644 listtexts/it/* $(TEXTDIR)/it/
80         install -m 644 listtexts/de/* $(TEXTDIR)/de/
81         install -m 644 listtexts/es/* $(TEXTDIR)/es/
83         # Don't advertise that mlmmj-make-ml is a shell script
84         # And install our own version of mlmmj-make-ml, until upstream 
85         # has stabilised somewhat
86         rm -f $(CURDIR)/debian/mlmmj/usr/bin/mlmmj-make-ml.sh
87         install -m 755 -D $(CURDIR)/debian/mlmmj-make-ml.sh \
88                 $(CURDIR)/debian/mlmmj/usr/bin/mlmmj-make-ml
89         mv debian/mlmmj/usr/share/man/man1/mlmmj-make-ml.sh.1 \
90                 debian/mlmmj/usr/share/man/man1/mlmmj-make-ml.1
91         dh_install -s
93 install-indep: build-indep
94         # mlmmj-php-web
95         install -m 644 -D $(CURDIR)/contrib/web/php-user/mlmmj.php \
96                 $(CURDIR)/debian/mlmmj-php-web/var/www/mlmmj-php-web/mlmmj.php
97         install -m 644 -D $(CURDIR)/contrib/web/php-user/README \
98                 $(CURDIR)/debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/README
99         install -m 644 -D $(CURDIR)/contrib/web/php-user/example.html \
100                 $(CURDIR)/debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/examples/examples.html
101         # mlmmj-php-web-admin
102         install -d $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin
103         install -m 644 $(CURDIR)/contrib/web/php-admin/htdocs/*.php \
104                 $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin/
105         install -m 644 $(CURDIR)/contrib/web/php-admin/htdocs/dot.htaccess \
106                 $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin/.htaccess
107         install -m 644 -D $(CURDIR)/contrib/web/php-admin/README \
108                 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/doc/mlmmj-php-web-admin/README
109         install -d $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/conf
110         install -d $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/templates
111         install -m 644 $(CURDIR)/contrib/web/php-admin/conf/* \
112                 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/conf/
113         install -m 644 $(CURDIR)/contrib/web/php-admin/templates/* \
114                 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/templates/
115         install -m 644 -D $(CURDIR)/debian/htpasswd \
116                 $(CURDIR)/debian/mlmmj-php-web-admin/etc/mlmmj-php-web-admin/htpasswd
118 binary-common:
119         dh_testdir
120         dh_testroot
121         dh_installchangelogs ChangeLog
122         dh_installdocs -A FAQ TUNABLES TODO UPGRADE AUTHORS README README.access VERSION README.exim4 README.sendmail
123         dh_installdebconf
124         dh_installexamples
125 #       dh_install
126 #       dh_installmenu
127         dh_installdebconf
128 #       dh_installlogrotate
129 #       dh_installemacsen
130 #       dh_installpam
131 #       dh_installmime
132 #       dh_installinit
133         dh_installcron
134 #       dh_installinfo
135         dh_link
136         dh_strip
137         dh_compress
138         dh_fixperms
139 #       dh_perl
140 #       dh_python
141 #       dh_makeshlibs
142         dh_installdeb
143         dh_shlibdeps
144         dh_gencontrol
145         dh_md5sums
146         dh_builddeb
148 binary-arch: build-arch install-arch
149         $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
151 binary-indep: build-indep install-indep
152         $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
154 binary: binary-arch binary-indep
156 build: build-arch build-indep
158 .PHONY: build-arch build-indep clean binary-indep binary-arch binary-common install-indep install-arch build configure