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