3 # Uncomment this to turn on verbose mode.
6 # This has to be exported to make some magic below work.
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
22 config.status: configure
24 CFLAGS="$(CFLAGS)" ./configure \
25 --host=$(DEB_HOST_GNU_TYPE) \
26 --build=$(DEB_BUILD_GNU_TYPE) \
28 --with-sysconfdir=/etc/citadel \
29 --with-spooldir=/var/spool/citadel \
30 --with-datadir=/var/lib/citadel \
31 --with-rundir=/var/run/citadel \
32 --with-docdir=/usr/share/doc/citadel-doc/ \
42 build: build-arch build-indep
44 build-arch: build-arch-stamp
45 build-arch-stamp: config.status
46 touch build-arch-stamp
48 build-indep: build-indep-stamp
49 build-indep-stamp: config.status
50 touch build-indep-stamp
55 rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
57 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
58 cp -f /usr/share/misc/config.sub config.sub
60 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
61 cp -f /usr/share/misc/config.guess config.guess
65 install: install-indep install-arch
71 $(MAKE) -C . install DESTDIR="$(CURDIR)/debian/tmp" install-doc-new prefix=$(CURDIR)/debian/citadel-doc/
79 mkdir -p $(CURDIR)/debian/tmp/
80 $(MAKE) -C . install DESTDIR="$(CURDIR)/debian/tmp/" install-exec-new install-data-new
82 mkdir -p $(CURDIR)/debian/tmp/usr/lib/citadel-server
84 $(CURDIR)/debian/tmp/usr/sbin/setup \
85 $(CURDIR)/debian/tmp/usr/lib/citadel-server/
87 $(CURDIR)/debian/tmp/usr/sbin/citmail \
88 $(CURDIR)/debian/tmp/usr/sbin/sendmail
98 dh_installinit --name=citadel
110 # Build architecture independant packages using the common target.
111 binary-indep: build-indep install-indep
112 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
114 # Build architecture dependant packages using the common target.
115 binary-arch: build-arch install-arch
116 $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
118 binary: binary-arch binary-indep
119 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch