Debian : fixed postinst
[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         find $(CURDIR)/debian/ldapsaisie/etc/ldapsaisie/local -type f -exec rm -f \{\} \;
32         dh_link /etc/ldapsaisie/local /usr/share/ldapsaisie/local
33         mv $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie/conf/config.inc.php $(CURDIR)/debian/ldapsaisie/etc/ldapsaisie/local/conf/
34         sed -i 's/tmp\/LS.log/\/var\/log\/ldapsaisie\/ldapsaisie.log/' $(CURDIR)/debian/ldapsaisie/etc/ldapsaisie/local/conf/config.inc.php
35
36         rm -fr $(CURDIR)/debian/ldapsaisie/usr/share/ldapsaisie/tmp
37         dh_link /var/tmp/ldapsaisie /usr/share/ldapsaisie/tmp
38
39         cp -f $(CURDIR)/lsexample/schema/lsexample.schema  $(CURDIR)/debian/ldapsaisie/etc/ldap/schema/
40         cp -f $(CURDIR)/lsexample/schema/lsexample.ldif  $(CURDIR)/debian/ldapsaisie/etc/ldap/schema/
41         
42
43 # Build architecture-independent files here.
44 binary-indep: build install
45         dh_installdocs
46         dh_installlogrotate
47
48 # Build architecture-dependent files here.
49 binary-arch: build install
50         dh_testdir
51         dh_testroot
52 #       dh_installchangelogs ChangeLog
53 #       dh_installexamples
54 #       dh_install
55 #       dh_installmenu
56 #       dh_installdebconf
57 #       dh_installemacsen
58 #       dh_installpam
59 #       dh_installmime
60 #       dh_python
61 #       dh_installinit
62 #       dh_installcron
63 #       dh_installinfo
64 #       dh_installman
65         dh_link
66         dh_strip
67         dh_compress
68         dh_fixperms
69 #       dh_perl
70 #       dh_makeshlibs
71         dh_installdeb
72         dh_shlibdeps
73         dh_gencontrol
74         dh_md5sums
75         dh_builddeb
76
77 binary: binary-indep binary-arch
78 .PHONY: build clean binary-indep binary-arch binary install configure