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 dh_install -s
91 install-indep: build-indep
92 # mlmmj-php-web
93 install -m 644 -D $(CURDIR)/contrib/web/php-user/mlmmj.php \
94 $(CURDIR)/debian/mlmmj-php-web/var/www/mlmmj-php-web/mlmmj.php
95 install -m 644 -D $(CURDIR)/contrib/web/php-user/README \
96 $(CURDIR)/debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/README
97 install -m 644 -D $(CURDIR)/contrib/web/php-user/example.html \
98 $(CURDIR)/debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/examples/examples.html
99 # mlmmj-php-web-admin
100 install -d $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin
101 install -m 644 $(CURDIR)/contrib/web/php-admin/htdocs/*.php \
102 $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin/
103 install -m 644 $(CURDIR)/contrib/web/php-admin/htdocs/dot.htaccess \
104 $(CURDIR)/debian/mlmmj-php-web-admin/var/www/mlmmj-php-web-admin/.htaccess
105 install -m 644 -D $(CURDIR)/contrib/web/php-admin/README \
106 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/doc/mlmmj-php-web-admin/README
107 install -d $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/conf
108 install -d $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/templates
109 install -m 644 $(CURDIR)/contrib/web/php-admin/conf/* \
110 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/conf/
111 install -m 644 $(CURDIR)/contrib/web/php-admin/templates/* \
112 $(CURDIR)/debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/templates/
113 install -m 644 -D $(CURDIR)/debian/htpasswd \
114 $(CURDIR)/debian/mlmmj-php-web-admin/etc/mlmmj-php-web-admin/htpasswd
116 binary-common:
117 dh_testdir
118 dh_testroot
119 dh_installchangelogs ChangeLog
120 dh_installdocs -A FAQ TUNABLES TODO UPGRADE AUTHORS README README.access VERSION README.exim4 README.sendmail
121 dh_installdebconf
122 dh_installexamples
123 # dh_install
124 # dh_installmenu
125 dh_installdebconf
126 # dh_installlogrotate
127 # dh_installemacsen
128 # dh_installpam
129 # dh_installmime
130 # dh_installinit
131 dh_installcron
132 # dh_installinfo
133 dh_link
134 dh_strip
135 dh_compress
136 dh_fixperms
137 # dh_perl
138 # dh_python
139 # dh_makeshlibs
140 dh_installdeb
141 dh_shlibdeps
142 dh_gencontrol
143 dh_md5sums
144 dh_builddeb
146 binary-arch: build-arch install-arch
147 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
149 binary-indep: build-indep install-indep
150 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
152 binary: binary-arch binary-indep
154 build: build-arch build-indep
156 .PHONY: build-arch build-indep clean binary-indep binary-arch binary-common install-indep install-arch build configure