#!/usr/bin/make -f # debian/rules for mlmmj # (based on the sample debian/rules by Joey Hess # and Craig Small as shipped with dh-make). # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 WEB_DIR = debian/mlmmj-php-web/usr/share/mlmmj-php-web/www WEB_ADMIN_DIR = debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/www include /usr/share/dpatch/dpatch.make # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) confflags := --prefix=/usr --mandir=/usr/share/man ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) confflags += --build=$(DEB_BUILD_GNU_TYPE) else confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) endif CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif config.status: configure patch-stamp dh_testdir ./configure $(confflags) CFLAGS="$(CFLAGS)" build: build-stamp build-stamp: config.status dh_testdir $(MAKE) touch build-stamp clean: unpatch dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean dh_clean install-arch: build dh_testdir dh_testroot dh_clean -k dh_installdirs -a $(MAKE) install DESTDIR=$(CURDIR)/debian/mlmmj # Don't advertise that mlmmj-make-ml is a shell script # And install our own version of mlmmj-make-ml, until upstream # has stabilised somewhat rm -f debian/mlmmj/usr/bin/mlmmj-make-ml.sh install -m 755 -D debian/mlmmj-make-ml \ debian/mlmmj/usr/bin/mlmmj-make-ml mv debian/mlmmj/usr/share/man/man1/mlmmj-make-ml.sh.1 \ debian/mlmmj/usr/share/man/man1/mlmmj-make-ml.1 dh_install -s install-indep: dh_testdir dh_testroot dh_clean -k dh_installdirs -i # mlmmj-php-web install -m 644 -D contrib/web/php-user/mlmmj.php \ $(WEB_DIR)/mlmmj.php install -m 644 -D contrib/web/php-user/README \ debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/README install -m 644 -D contrib/web/php-user/example.html \ debian/mlmmj-php-web/usr/share/doc/mlmmj-php-web/examples/examples.html install -m 644 -D debian/mlmmj-php-web.apache.conf \ debian/mlmmj-php-web/etc/mlmmj-php-web/apache.conf # mlmmj-php-web-admin install -m 755 -d $(WEB_ADMIN_DIR) install -m 644 contrib/web/php-admin/htdocs/*.php \ $(WEB_ADMIN_DIR)/ install -m 644 contrib/web/php-admin/htdocs/dot.htaccess \ $(WEB_ADMIN_DIR)/.htaccess install -m 644 -D contrib/web/php-admin/README \ debian/mlmmj-php-web-admin/usr/share/doc/mlmmj-php-web-admin/README install -d debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/conf install -d debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/templates install -m 644 contrib/web/php-admin/conf/* \ debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/conf/ install -m 644 contrib/web/php-admin/templates/* \ debian/mlmmj-php-web-admin/usr/share/mlmmj-php-web-admin/templates/ install -m 644 -D debian/htpasswd \ debian/mlmmj-php-web-admin/etc/mlmmj-php-web-admin/htpasswd install -m 644 -D debian/mlmmj-php-web-admin.apache.conf \ debian/mlmmj-php-web-admin/etc/mlmmj-php-web-admin/apache.conf binary-common: dh_testdir dh_testroot dh_installchangelogs ChangeLog dh_installdocs -A FAQ TUNABLES TODO UPGRADE README* dh_installdebconf dh_installexamples dh_installdebconf dh_installcron dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary-arch: build-arch install-arch $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common binary-indep: build-indep install-indep $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common binary: binary-arch binary-indep build: build-arch build-indep .PHONY: build-arch build-indep clean binary-indep binary-arch binary-common install-indep install-arch build