* Fixed a multiselect bug in the mailbox view. Ctrl-click was selecting a message...
[citadel.git] / citadel / debian / rules
blobb3c036451b0ae6ebfcd10e7bb4dc99016da83a1d
1 #!/usr/bin/make -f
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
6 # This has to be exported to make some magic below work.
7 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
8 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
10 export DH_OPTIONS
12 DEB_DESTDIR = $(CURDIR)/debian/tmp
14 CFLAGS = -Wall -g
17 EXTRA_ARGS=
18 PROFILE_ARGS=
19 #to enable debugging: export DEB_BUILD_OPTIONS="debug profiling threadoff"
20 ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
21 PROFILE_ARGS= --with-gprof
22 endif
23 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
24 CFLAGS += -O0 -ggdb -rdynamic -D_GNU_SOURCE -MD -MP -D TECH_PREVIEW
25 LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed
26 EXTRA_ARGS = --with-backtrace
27 else
28 LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed
29 CFLAGS += -O2
30 endif
32 ifneq (,$(findstring threadoff,$(DEB_BUILD_OPTIONS)))
33 THREAD_ARGS=--without-threaded-client
34 else
35 THREAD_ARGS=
36 endif
38 configure: configure-stamp
39 configure-stamp:
40 dh_testdir
42 LDFLAGS="$(LDFLAGS)"; CFLAGS="$(CFLAGS)" ./configure \
43 --prefix=/var/lib/citadel/ \
44 --with-datadir=/var/lib/citadel/ \
45 --with-helpdir=/usr/share/citadel-server/ \
46 --with-staticdatadir=/etc/citadel/ \
47 --with-spooldir=/var/spool/citadel/ \
48 --with-sysconfdir=/etc/citadel/ \
49 --with-rundir=/var/run/citadel/ \
50 --with-docdir=/usr/share/doc/citadel-doc/ \
51 --with-ssldir=/etc/ssl/citadel/ \
52 --with-utility-bindir=/usr/lib/citadel-server/ \
53 --with-autosysconfdir=/var/lib/citadel/data/ \
54 --with-pam \
55 --with-db \
56 --with-zlib \
57 --with-ldap \
58 --with-libical \
59 --with-libsieve \
60 --enable-debug $(EXTRA_ARGS) $(PROFILE_ARGS) $(THREAD_ARGS)
62 touch configure-stamp
64 #Architecture
65 build: build-arch build-indep
67 build-arch: build-arch-stamp
68 build-arch-stamp: configure-stamp
70 $(MAKE)
71 touch $@
73 build-indep: build-indep-stamp
74 build-indep-stamp: configure-stamp
76 touch $@
78 clean:
79 dh_testdir
80 dh_testroot
81 rm -f build-arch-stamp build-indep-stamp configure-stamp
83 [ ! -f Makefile ] || $(MAKE) distclean
85 dh_clean
86 rm -f config.status config.log
88 install: install-indep install-arch
89 install-indep: build-indep
90 dh_testdir
91 dh_testroot
92 dh_clean -k -i
93 dh_installdirs -i
95 $(MAKE) DESTDIR=$(DEB_DESTDIR) install-doc-new
97 dh_install -i --sourcedir=debian/tmp
99 install-arch: build-arch
100 dh_testdir
101 dh_testroot
102 dh_clean -k -s
103 dh_installdirs -s
105 $(MAKE) DESTDIR=$(DEB_DESTDIR) install-exec-new install-data-new
107 install -D -p -m0755 database_cleanup.sh \
108 $(DEB_DESTDIR)/usr/share/doc/citadel-server/examples/database_cleanup.sh
110 install -D -p -m0644 docs/welcomemail.html \
111 $(DEB_DESTDIR)/usr/share/doc/citadel-server/welcomemail.html
113 install -D -p -m0644 docs/welcomemail.txt \
114 $(DEB_DESTDIR)/usr/share/doc/citadel-server/welcomemail.txt
116 dh_install -s --sourcedir=debian/tmp
118 binary-common:
119 dh_testdir
120 dh_testroot
121 dh_installchangelogs
122 dh_installdocs
123 dh_installdebconf
124 dh_installinit --name=citadel
125 dh_installman
126 dh_strip --dbg-package=citadel-dbg
127 dh_link
128 dh_compress
129 dh_fixperms
130 dh_makeshlibs
131 dh_installdeb
132 dh_shlibdeps
133 dh_gencontrol
134 dh_md5sums
135 dh_builddeb
137 # Build architecture independant packages using the common target.
138 binary-indep: build-indep install-indep
139 $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
141 # Build architecture dependant packages using the common target.
142 binary-arch: build-arch install-arch
143 $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
145 binary: binary-arch binary-indep
146 .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure