Code

Added automatic replacement for gosa.conf template
[gosa.git] / debian / rules
1 #!/usr/bin/make -f
2 # Made with the aid of dh_make, by Craig Small
3 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
4 # Some lines taken from debmake, by Cristoph Lameter.
6 export DH_COMPAT=3
7 # Uncomment this to turn on verbose mode.
8 #export DH_VERBOSE=1
10 build: 
11         #**** Off we go... ****
13 clean:
14         dh_testdir
15         rm -f install-stamp 
16         -rm -f debian/files
17         -rm -f debian/substvars
18         dh_clean
20 install: install-stamp
21 install-stamp: 
22         dh_testdir
23         dh_testroot
24         dh_clean -k
25         dh_installdirs
27         for i in `cd gosa; ls | grep -v debian`; do \
28           cp -R $$i debian/gosa/usr/share/gosa ; \
29         done
30         -find debian/gosa -type d -name "CVS" -exec rm -rf {} \;
31         -cp -R debian/gosa/usr/share/gosa/contrib/* debian/gosa/usr/share/doc/gosa/contrib/
32         -cp debian/gosa/usr/share/gosa/contrib/openldap/go*.schema debian/gosa-schema/etc/ldap/schema
33         -mkdir debian/gosa/usr/share/doc/gosa/manual
34         -mkdir -p debian/gosa-schema/usr/share/doc/gosa-schema
35         -cp -R debian/gosa/usr/share/gosa/doc/* debian/gosa/usr/share/doc/gosa/manual
36         -cp -R INSTALL debian/gosa/usr/share/doc/gosa/README.INSTALL
37         -gzip -c9 debian/changelog > debian/gosa/usr/share/doc/gosa/changelog.Debian.gz
38         -gzip -c9 debian/changelog > debian/gosa-schema/usr/share/doc/gosa-schema/changelog.Debian.gz
39         -gzip -c9 Changelog > debian/gosa/usr/share/doc/gosa/changelog.gz
40         -cp AUTHORS TODO README FAQ debian/gosa/usr/share/doc/gosa/
41         -rm debian/gosa/usr/share/gosa/README debian/gosa/usr/share/gosa/INSTALL
42         -rm debian/gosa/usr/share/gosa/AUTHORS debian/gosa/usr/share/gosa/Changelog
43         -rm debian/gosa/usr/share/gosa/COPYING debian/gosa/usr/share/gosa/TODO
44         -rm debian/gosa/usr/share/gosa/FAQ
45         -rm debian/gosa/usr/share/gosa/doxygen.conf
46         -mkdir -p debian/gosa/var/spool/gosa/compile
47         -mkdir -p debian/gosa/var/spool/gosa/config
48         -mkdir -p debian/gosa/var/spool/gosa/cache
49         -rm -rf debian/gosa/usr/share/gosa/compile
50         -cp -R debian/apache.conf debian/gosa/etc/gosa/apache.conf
51         -mkdir -p debian/gosa/etc/gosa/vacation
52         -mv plugins/personal/mail/sieve-*.txt debian/gosa/etc/gosa
53         -mv contrib/shells debian/gosa/etc/gosa
54         -rm -rf debian/gosa/usr/share/gosa/contrib
55         -rm -rf debian/gosa/usr/share/gosa/doc
56         -rm debian/gosa/usr/share/gosa/bin/gosa
57         -mkdir -p debian/gosa/usr/lib/gosa
58         -mv bin/* debian/gosa/usr/lib/gosa
59         -chmod +x debian/gosa/user/lib/gosa/*
60         -rm -rf debian/gosa/usr/share/gosa/gen_locale.sh
61         -rm -rf debian/gosa/usr/share/gosa/update.sh
62         -find debian/gosa -type f -exec chmod -x {} \;
63         -sed 's/"CONFIG_TEMPLATE_DIR", "../contrib/"/"CONFIG_TEMPLATE_DIR", "/usr/share/doc/gosa/contrib/"/g' debian/gosa/usr/share/gosa/include/functions.inc > debian/  gosa/usr/share/gosa/include/functions.inc.new
64         -mv debian/gosa/usr/share/gosa/include/functions.inc.new gosa/usr/share/gosa/include/functions.inc
66         touch install-stamp
68 binary-indep: install
69         dh_testdir
70         dh_testroot
71         dh_installdocs 
72         dh_installcron
73         dh_installexamples
74 #       dh_undocumented  
75         dh_installman
76         dh_link
77         dh_strip
78 #       dh_compress
79         dh_fixperms 
80         dh_perl
81         dh_installdeb
82         dh_shlibdeps
84         cd debian/gosa && find ./etc -type f -print | sed -e 's#^./#/#' > DEBIAN/conffiles
85         chmod 644 debian/gosa/DEBIAN/conffiles
87         dh_gencontrol
88         dh_md5sums
89         dh_builddeb
91 source diff:                                                                  
92         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
94 binary: binary-indep 
95 .PHONY: build install clean binary-indep binary