* have LOCALEDIR be customizable by configure
[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 DESTDIR=$(CURDIR)/debian/citadel-webcit/
13
14
15
16 CFLAGS = -Wall -g -ggdb
17
18 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
19         CFLAGS += -O0
20 else
21         CFLAGS += -O0 -ggdb
22 endif
23
24 configure: configure-stamp
25 configure-stamp:
26         dh_testdir
27         CFLAGS="$(CFLAGS)" ./configure \
28                 --host=$(DEB_HOST_GNU_TYPE) \
29                 --build=$(DEB_BUILD_GNU_TYPE) \
30                 --prefix=/etc/citadel/www/ \
31                 --with-localedir=/usr/share/locale \
32                 --with-sysconfdir=/etc/citadel \
33                 --with-spooldir=/var/spool/citadel \
34                 --with-datadir=/etc/citadel \
35                 --with-rundir=/var/run/citadel \
36                 --with-ical --with-db --with-ldap \
37                 --with-zlib --with-ssl --with-libiconf \
38                 --with-newt --with-included-gettext
39
40         touch configure-stamp
41
42
43 build: build-stamp
44
45 build-stamp: configure-stamp 
46         dh_testdir
47
48 # Add here commands to compile the package.
49         $(MAKE)
50 #docbook-to-man debian/webcit.sgml > webcit.1
51
52         touch build-stamp
53
54 clean:
55         dh_testdir
56         dh_testroot
57         rm -f build-stamp configure-stamp
58
59 # Add here commands to clean up after the build process.
60         -$(MAKE) clean
61
62         dh_clean 
63
64 install: build
65         dh_testdir
66         dh_testroot
67         dh_clean -k 
68         dh_installdirs
69
70 # Add here commands to install the package into debian/webcit.
71         $(MAKE) -C . install DESTDIR=$(DESTDIR)
72 # there are debian tinymce packages arround, so we don't ship it another time.
73         rm -rf $(DESTDIR)/etc/citadel/www/tiny_mce 
74 # we don't use the setup anymore, omit it.
75         rm -f $(DESTDIR)/etc/citadel/www/setup
76 # locale -> /usr/share/locale
77         mkdir -p $(DESTDIR)/usr/share/
78         mv $(DESTDIR)/etc/citadel/www/locale \
79                 $(DESTDIR)/usr/share/locale
80
81         mkdir -p $(DESTDIR)/usr/sbin
82         mv $(DESTDIR)/etc/citadel/www/webserver \
83                 $(DESTDIR)/usr/sbin/
84
85
86 # Build architecture-independent files here.
87 binary-indep: build install
88 # We have nothing to do by default.
89
90 # Build architecture-dependent files here.
91 binary-arch: build install
92         dh_testdir
93         dh_testroot
94 #       dh_installchangelogs ChangeLog
95         dh_installdocs
96         dh_installexamples
97 #       dh_install
98 #       dh_installmenu
99         dh_installdebconf       
100 #       dh_installlogrotate
101 #       dh_installemacsen
102 #       dh_installpam
103 #       dh_installmime
104         dh_installinit --name=webcit
105 #       dh_installcron
106 #       dh_installinfo
107         dh_installman
108         dh_link
109         dh_strip
110         dh_compress
111         dh_fixperms
112 #       dh_perl
113 #       dh_python
114 #       dh_makeshlibs
115         dh_installdeb
116         dh_shlibdeps
117         dh_gencontrol
118         dh_md5sums
119         dh_builddeb
120
121 binary: binary-indep binary-arch
122 .PHONY: build clean binary-indep binary-arch binary install configure