* Apache config package added
[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         CFLAGS="$(CFLAGS)" ./configure \
27                 --host=$(DEB_HOST_GNU_TYPE) \
28                 --build=$(DEB_BUILD_GNU_TYPE) \
29                 --prefix=/var/lib/citadel/www/ \
30                 --with-sysconfdir=/etc/citadel \
31                 --with-spooldir=/var/spool/citadel \
32                 --with-datadir=/var/lib/citadel \
33                 --with-rundir=/var/run/citadel \
34                 --with-ical --with-db --with-ldap --with-zlib --with-ssl --with-libiconf --with-newt --with-included-gettext
35
36         touch configure-stamp
37
38
39 build: build-stamp
40
41 build-stamp: configure-stamp 
42         dh_testdir
43
44         # Add here commands to compile the package.
45         $(MAKE)
46         #docbook-to-man debian/webcit.sgml > webcit.1
47
48         touch build-stamp
49
50 clean:
51         dh_testdir
52         dh_testroot
53         rm -f build-stamp configure-stamp
54
55         # Add here commands to clean up after the build process.
56         -$(MAKE) clean
57
58         dh_clean 
59
60 install: build
61         dh_testdir
62         dh_testroot
63         dh_clean -k 
64         dh_installdirs
65
66         # Add here commands to install the package into debian/webcit.
67         root=$(CURDIR)/debian/webcit/
68         mkdir -p $(CURDIR)/debian/webcit/var/lib/citadel/www/
69         export root=$(CURDIR)/debian/webcit; $(MAKE) install DESTDIR=$(CURDIR)/debian/webcit/
70         mkdir -p $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples
71         mkdir -p $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/contrib
72         mkdir -p $(CURDIR)/debian/citadel-webcit/usr/sbin
73         mkdir -p $(CURDIR)/debian/citadel-webcit/usr/lib/citadel-webcit/
74         mv $(CURDIR)/debian/webcit/var/lib/citadel/www/static \
75                 $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/
76         mv $(CURDIR)/debian/webcit/var/lib/citadel/www/tiny_mce \
77                 $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/
78 # TODO: locale -> /usr/share/locale
79         mv $(CURDIR)/debian/webcit/var/lib/citadel/www/locale \
80                 $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/
81
82         cd $(CURDIR)/debian/citadel-webcit/usr/share/doc/citadel-webcit/examples/; \
83                                 md5sum `find -type f |grep -v md5sums `>md5sums; 
84         mv $(CURDIR)/debian/webcit/var/lib/citadel/www/setup \
85                 $(CURDIR)/debian/citadel-webcit/usr/lib/citadel-webcit/
86         mv $(CURDIR)/debian/webcit/var/lib/citadel/www/webserver \
87                 $(CURDIR)/debian/citadel-webcit/usr/sbin/
88
89
90 # Build architecture-independent files here.
91 binary-indep: build install
92 # We have nothing to do by default.
93
94 # Build architecture-dependent files here.
95 binary-arch: build install
96         dh_testdir
97         dh_testroot
98         dh_installchangelogs ChangeLog
99         dh_installdocs
100         dh_installexamples
101 #       dh_install
102 #       dh_installmenu
103         dh_installdebconf       
104 #       dh_installlogrotate
105 #       dh_installemacsen
106 #       dh_installpam
107 #       dh_installmime
108 #       dh_installinit
109 #       dh_installcron
110 #       dh_installinfo
111         dh_installman
112         dh_link
113         dh_strip
114         dh_compress
115         dh_fixperms
116 #       dh_perl
117 #       dh_python
118 #       dh_makeshlibs
119         dh_installdeb
120         dh_shlibdeps
121         dh_gencontrol
122         dh_md5sums
123         dh_builddeb
124
125 binary: binary-indep binary-arch
126 .PHONY: build clean binary-indep binary-arch binary install configure