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.
12 include /usr
/share
/quilt
/quilt.make
14 upstreamversion
:= $(shell dpkg-parsechangelog | sed
-n
's/^Version: *\([^-]\+\)-.\+/\1/p')
16 DESTDIR
=$(CURDIR
)/debian
/citadel-webcit
20 #to enable debugging: export DEB_BUILD_OPTIONS="debug profiling compression urldebug"
22 ifneq (,$(findstring profiling
,$(DEB_BUILD_OPTIONS
)))
23 PROFILE_ARGS
= --with-gprof
25 ifneq (,$(findstring debug
,$(DEB_BUILD_OPTIONS
)))
26 CFLAGS
+= -O0
-ggdb
-rdynamic
-MD
-MP
-D TECH_PREVIEW
-pedantic
28 EXTRA_ARGS
= --with-backtrace
32 ifneq (,$(findstring urldebug
,$(DEB_BUILD_OPTIONS
)))
33 CFLAGS
+= -D DEBUG_URLSTRINGS
36 configure
: patch configure-stamp
39 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
40 cp
-f
/usr
/share
/misc
/config.sub config.sub
42 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
43 cp
-f
/usr
/share
/misc
/config.guess config.guess
45 CFLAGS
="$(CFLAGS)" .
/configure \
46 --host
=$(DEB_HOST_GNU_TYPE
) \
47 --build
=$(DEB_BUILD_GNU_TYPE
) \
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
)
65 build-stamp
: configure-stamp
68 # Add here commands to compile the package.
73 clean: configure-stamp
76 rm -f build-stamp configure-stamp
78 # Add here commands to clean up after the build process.
79 [ ! -f Makefile
] ||
$(MAKE
) clean
89 $(MAKE
) install-bin install-locale install-wwwdata DESTDIR
=$(DESTDIR
)
90 chmod a-x
-R
$(DESTDIR
)/usr
/share
/citadel-webcit
/static
/*
91 find
$(DESTDIR
)/usr
/share
/locale
/ -name webcit.mo
-exec chmod a-x
{} \
;
92 rm $(DESTDIR
)/usr
/share
/citadel-webcit
/static
/prototype.js
93 # mkdir -p $(DESTDIR)/etc/citadel; cp webcit.conf $(DESTDIR)/etc/citadel/
97 # Build architecture-independent files here.
98 binary-indep
: build
install
99 # We have nothing to do by default.
101 # Build architecture-dependent files here.
102 binary-arch
: build
install
110 dh_installinit
--name
=webcit
122 binary
: binary-indep binary-arch
123 .PHONY
: build
clean binary-indep binary-arch binary
install configure