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