Added initial Debian packaging files
[ldapsaisie.git] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 build: build-doc
8
9 build-doc:
10         make -C $(CURDIR)/doc/exports/html -f Makefile debian
11
12 clean:
13         dh_testdir
14         dh_testroot
15
16         dh_clean
17         make -C $(CURDIR)/doc -f Makefile clean
18
19 install: build
20         dh_testdir
21         dh_testroot
22         dh_prep
23         dh_installdirs
24
25         dh_install debian/conf/apache.conf /etc/ldapsaisie/
26
27         cp -fr $(CURDIR)/public_html $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie
28         find $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie -name .gitignore -exec rm -f {} \;
29
30         mv $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie/local $(CURDIR)/debian/ldapsaisie/etc/ldapsaisie/
31         dh_link /etc/ldapsaisie/local /usr/share/ldapsaisie/local
32         mv $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie/conf/config.inc.php $(CURDIR)/debian/ldapsaisie/etc/ldapsaisie/local/conf/
33         sed -i 's/tmp\/LS.log/\/var\/log\/ldapsaisie\/ldapsaisie.log/' $(CURDIR)/debian/ldapsaisie/etc/ldapsaisie/local/conf/config.inc.php
34
35         rm -fr $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie/tmp
36         dh_link /var/tmp/ldapsaisie /usr/share/ldapsaisie/tmp
37         
38
39 # Build architecture-independent files here.
40 binary-indep: build install
41         dh_installdocs
42         dh_installlogrotate
43
44 # Build architecture-dependent files here.
45 binary-arch: build install
46         dh_testdir
47         dh_testroot
48 #       dh_installchangelogs ChangeLog
49 #       dh_installexamples
50 #       dh_install
51 #       dh_installmenu
52 #       dh_installdebconf
53 #       dh_installemacsen
54 #       dh_installpam
55 #       dh_installmime
56 #       dh_python
57 #       dh_installinit
58 #       dh_installcron
59 #       dh_installinfo
60 #       dh_installman
61         dh_link
62         dh_strip
63         dh_compress
64         dh_fixperms
65 #       dh_perl
66 #       dh_makeshlibs
67         dh_installdeb
68         dh_shlibdeps
69         dh_gencontrol
70         dh_md5sums
71         dh_builddeb
72
73 binary: binary-indep binary-arch
74 .PHONY: build clean binary-indep binary-arch binary install configure