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