3 # Sample debian/rules that uses debhelper.
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets by Bill Allombert 2001
13 # Uncomment this to turn on verbose mode.
16 # This has to be exported to make some magic below work.
19 # These are used for cross-compiling and for saving the configure script
20 # from having to guess our platform (since we know it already)
21 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
22 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
23 export VERSION=`grep 'THIS IS' $(CURDIR)/ChangeLog |head -n 1 |sed "s;.* ;;"`
27 #ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
33 config.status: configure
35 CFLAGS="$(CFLAGS)" ./configure \
36 --host=$(DEB_HOST_GNU_TYPE) \
37 --build=$(DEB_BUILD_GNU_TYPE) \
39 --with-sysconfdir=/etc/citadel \
40 --with-spooldir=/var/spool/citadel \
41 --with-datadir=/var/lib/citadel \
42 --with-rundir=/var/run/citadel \
43 --with-docdir=/usr/share/doc/citadel-doc/ \
51 build: build-arch build-indep
53 build-arch: build-arch-stamp
54 build-arch-stamp: config.status
56 # # Add here commands to compile the arch part of the package.
58 touch build-arch-stamp
60 build-indep: build-indep-stamp
61 build-indep-stamp: config.status
63 # # Add here commands to compile the indep part of the package.
65 touch build-indep-stamp
70 rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
72 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
73 cp -f /usr/share/misc/config.sub config.sub
75 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
76 cp -f /usr/share/misc/config.guess config.guess
82 install: install-indep install-arch
88 export root=$(CURDIR)/debian/tmp; $(MAKE) install-doc-new prefix=$(CURDIR)/debian/citadel-doc/
96 mkdir -p $(CURDIR)/debian/tmp/
97 export root=$(CURDIR)/debian/tmp/;$(MAKE) install-exec-new install-data-new
99 mkdir -p $(CURDIR)/debian/tmp/usr/lib/citadel-server
101 $(CURDIR)/debian/tmp/usr/sbin/setup \
102 $(CURDIR)/debian/tmp/usr/lib/citadel-server/
104 $(CURDIR)/debian/tmp/usr/sbin/ctdlsvc \
105 $(CURDIR)/debian/tmp/usr/lib/citadel-server/
106 # cd $(CURDIR)/debian/tmp/usr/share/doc/citadel-server/examples/help; md5sum * >../help.md5sums
107 # cd $(CURDIR)/debian/tmp/usr/share/doc/citadel-server/examples/messages; md5sum * >../messages.md5sums
109 $(CURDIR)/debian/tmp/usr/sbin/citmail \
110 $(CURDIR)/debian/tmp/usr/sbin/sendmail
113 # Must not depend on anything. This is to be called by
114 # binary-arch/binary-indep
115 # in another 'make' thread.
119 dh_installchangelogs ChangeLog
124 # dh_installlogrotate
128 dh_installinit --name=citadel
132 #doesn't work like that. will be done by postinst.
133 # mkdir -p $(CURDIR)/debian/citadel-mta/usr/sbin
134 # dh_link --package=citadel-mta /usr/sbin/citmail /usr/sbin/sendmail
146 # Build architecture independant packages using the common target.
147 binary-indep: build-indep install-indep
148 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
150 # Build architecture dependant packages using the common target.
151 binary-arch: build-arch install-arch
152 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
154 binary: binary-arch binary-indep
155 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch