* add documentation
[citadel.git] / webcit / debian / rules
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.
8
9 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12
13
14
15 CFLAGS = -Wall -g -ggdb
16
17 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18         CFLAGS += -O0
19 else
20         CFLAGS += -O0 -ggdb
21 endif
22
23 configure: configure-stamp
24 configure-stamp:
25         dh_testdir
26         rm -rf $(CURDIR)/debian/webcit $(CURDIR)/debian/citadel-webcit $(CURDIR)/debian/citadel-webcit-apache
27         CFLAGS="$(CFLAGS)" ./configure \
28                 --host=$(DEB_HOST_GNU_TYPE) \
29                 --build=$(DEB_BUILD_GNU_TYPE) \
30                 --prefix=/usr \
31                 --with-staticdir=/usr/share/doc/citadel-webcit/examples \
32                 --with-staticrundir=/var/lib/citadel/www/ \
33                 --with-editor=/usr/share/tiny_mce/ \
34                 --with-rundir=/var/run/citadel \
35                 --with-ical --with-db --with-ldap --with-zlib --with-ssl --with-libiconf --with-newt --with-included-gettext
36
37         touch configure-stamp
38
39
40 build: build-stamp
41
42 build-stamp: configure-stamp 
43         dh_testdir
44
45         # Add here commands to compile the package.
46         $(MAKE)
47         #docbook-to-man debian/webcit.sgml > webcit.1
48
49         touch build-stamp
50
51 clean:
52         dh_testdir
53         dh_testroot
54         rm -f build-stamp configure-stamp
55
56         # Add here commands to clean up after the build process.
57         -$(MAKE) clean
58
59         dh_clean 
60
61 install: build
62         dh_testdir
63         dh_testroot
64         dh_clean -k 
65         dh_installdirs
66
67 # Add here commands to install the package into debian/webcit.
68         root=$(CURDIR)/debian/webcit/
69         export root=$(CURDIR)/debian/citadel-webcit; \
70                 $(MAKE) install DESTDIR=$(CURDIR)/debian/citadel-webcit
71         mkdir -p $(CURDIR)/debian/citadel-webcit/usr/lib/citadel-webcit ;\
72         mv $(CURDIR)/debian/citadel-webcit/usr/sbin/setup \
73                 $(CURDIR)/debian/citadel-webcit/usr/lib/citadel-webcit/; \
74         cd $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/ && \
75                                 md5sum `find -type f |grep -v md5sums `>md5sums; \
76
77
78 # Build architecture-independent files here.
79 binary-indep: build install
80 # We have nothing to do by default.
81
82 # Build architecture-dependent files here.
83 binary-arch: build install
84         dh_testdir
85         dh_testroot
86         dh_installchangelogs ChangeLog
87         dh_installdocs
88         dh_installexamples
89 #       dh_install
90         dh_installdebconf       
91 #       dh_installlogrotate
92 #       dh_installinit
93 #       dh_installcron
94         dh_installman
95         dh_link
96         dh_strip
97         dh_compress
98         dh_fixperms
99         dh_installdeb
100         dh_shlibdeps
101         dh_gencontrol
102         dh_md5sums
103         dh_builddeb
104
105 binary: binary-indep binary-arch
106 .PHONY: build clean binary-indep binary-arch binary install configure