* Attempting to add a smart host in webcit was instead adding it as an RBL host....
[citadel.git] / webcit / debian / rules
blobd4109e17e9d39f50df0c5cca831a01d0e130cbf4
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
12 include /usr/share/quilt/quilt.make
14 upstreamversion := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p')
16 DESTDIR=$(CURDIR)/debian/citadel-webcit
18 EXTRA_ARGS=
19 PROFILE_ARGS=
20 #to enable debugging: export DEB_BUILD_OPTIONS="debug profiling compression urldebug"
22 ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
23 PROFILE_ARGS= --with-gprof
24 endif
25 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
26 CFLAGS += -O0 -ggdb -rdynamic -MD -MP -D TECH_PREVIEW -pedantic
27 LDFLAGS += -pg
28 EXTRA_ARGS = --with-backtrace
29 else
30 CFLAGS += -O2
31 endif
32 ifneq (,$(findstring urldebug,$(DEB_BUILD_OPTIONS)))
33 CFLAGS += -D DEBUG_URLSTRINGS
34 endif
36 configure: patch configure-stamp
37 configure-stamp:
38 dh_testdir
39 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
40 cp -f /usr/share/misc/config.sub config.sub
41 endif
42 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
43 cp -f /usr/share/misc/config.guess config.guess
44 endif
45 CFLAGS="$(CFLAGS)" ./configure \
46 --host=$(DEB_HOST_GNU_TYPE) \
47 --build=$(DEB_BUILD_GNU_TYPE) \
48 --prefix=/usr/sbin/ \
49 --with-wwwdir=/usr/share/citadel-webcit \
50 --with-localedir=/usr/share/ \
51 --with-editordir=/usr/share/tinymce/www \
52 --with-rundir=/var/run/citadel \
53 --with-ical --with-db --with-ldap \
54 --with-ssldir=/etc/ssl/webcit/ \
55 --with-ssl --with-libiconf \
56 --with-newt --with-included-gettext \
57 --with-datadir=/var/run/citadel \
58 --enable-debug $(EXTRA_ARGS) $(PROFILE_ARGS)
60 touch configure-stamp
63 build: build-stamp
65 build-stamp: configure
66 dh_testdir
68 # Add here commands to compile the package.
69 $(MAKE)
71 touch build-stamp
73 clean:
74 dh_testdir
75 dh_testroot
76 rm -f build-stamp configure-stamp
78 # Add here commands to clean up after the build process.
79 [ ! -f Makefile ] || $(MAKE) clean
80 debconf-updatepo
82 dh_clean
84 install: build
85 dh_testdir
86 dh_testroot
87 dh_clean -k
88 dh_installdirs
89 $(MAKE) install-bin install-locale install-wwwdata DESTDIR=$(DESTDIR)
90 rm $(DESTDIR)/usr/share/citadel-webcit/static/prototype.js
91 # mkdir -p $(DESTDIR)/etc/citadel; cp webcit.conf $(DESTDIR)/etc/citadel/
95 # Build architecture-independent files here.
96 binary-indep: build install
97 # We have nothing to do by default.
99 # Build architecture-dependent files here.
100 binary-arch: build install
101 dh_testdir
102 dh_testroot
103 dh_installchangelogs
104 dh_installdocs
105 dh_installexamples
106 dh_install
107 dh_installdebconf
108 dh_installinit --name=webcit
109 dh_installman
110 dh_link
111 dh_strip
112 dh_compress
113 dh_fixperms
114 dh_installdeb
115 dh_shlibdeps
116 dh_gencontrol
117 dh_md5sums
118 dh_builddeb
120 binary: binary-indep binary-arch
121 .PHONY: build clean binary-indep binary-arch binary install configure