Code

Updated build to remove a set of lintian errors
[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=4
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 `ls | grep -v debian`; do \
28           cp -R $$i debian/gosa/usr/share/gosa ; \
29         done
30         -find debian/gosa -type d -name ".svn" -exec rm -rf {} \; &> /dev/null || /bin/true
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         -cp -R INSTALL debian/gosa/usr/share/doc/gosa/README.INSTALL
34         -gzip -c9 debian/changelog > debian/gosa/usr/share/doc/gosa/changelog.Debian.gz
35         -mkdir -p debian/gosa-schema/usr/share/doc/gosa-schema
36         -gzip -c9 debian/changelog > debian/gosa-schema/usr/share/doc/gosa-schema/changelog.Debian.gz
37         -mkdir -p debian/gosa-help-de/usr/share/doc/gosa-help-de
38         -gzip -c9 debian/changelog > debian/gosa-help-de/usr/share/doc/gosa-help-de/changelog.Debian.gz
39         -mkdir -p debian/gosa-help-en/usr/share/doc/gosa-help-en
40         -gzip -c9 debian/changelog > debian/gosa-help-en/usr/share/doc/gosa-help-en/changelog.Debian.gz
41         -mkdir -p debian/gosa-help-fr/usr/share/doc/gosa-help-fr
42         -gzip -c9 debian/changelog > debian/gosa-help-fr/usr/share/doc/gosa-help-fr/changelog.Debian.gz
43         -mkdir -p debian/gosa-help-nl/usr/share/doc/gosa-help-nl
44         -gzip -c9 debian/changelog > debian/gosa-help-nl/usr/share/doc/gosa-help-nl/changelog.Debian.gz
45         -gzip -c9 Changelog > debian/gosa/usr/share/doc/gosa/changelog.gz
46         -cp AUTHORS TODO README FAQ README.safemode DEVEL debian/gosa/usr/share/doc/gosa/
47         -rm debian/gosa/usr/share/gosa/README debian/gosa/usr/share/gosa/INSTALL
48         -rm debian/gosa/usr/share/gosa/README.safemode
49         -rm debian/gosa/usr/share/gosa/AUTHORS debian/gosa/usr/share/gosa/Changelog
50         -rm debian/gosa/usr/share/gosa/DEVEL
51         -rm debian/gosa/usr/share/gosa/COPYING debian/gosa/usr/share/gosa/TODO
52         -rm debian/gosa/usr/share/gosa/FAQ
53         -mkdir -p debian/gosa/var/spool/gosa/compile
54         -mkdir -p debian/gosa/var/spool/gosa/config
55         -mkdir -p debian/gosa/var/spool/gosa/cache
56         -rm -rf debian/gosa/usr/share/gosa/compile
57         -mkdir -p debian/gosa/etc/gosa/vacation
58         -cp -R debian/apache.conf debian/gosa/etc/gosa/apache.conf
59         -cp -R contrib/encodings debian/gosa/etc/gosa/encodings
60         -cp -R plugins/personal/mail/sieve-*.txt debian/gosa/etc/gosa
61         -cp contrib/shells debian/gosa/etc/gosa
62         -rm debian/gosa/usr/share/gosa/bin/gosa
63         -mkdir -p debian/gosa/usr/lib/gosa
64         -mv debian/gosa/usr/share/gosa/bin/* debian/gosa/usr/bin
65         -rm -rf debian/gosa/usr/share/gosa/bin
66         -rm -rf debian/gosa/usr/share/doc/gosa/marketing
67         -find debian/gosa -type f -exec chmod -x {} \; &> /dev/null
68         -chmod +x debian/gosa/usr/bin/mkntpasswd
69         -rm -rf debian/gosa/usr/share/gosa/doc/guide/user/*/lyx-source
70         -rm -rf debian/gosa/usr/share/gosa/doc/guide/admin
71         -rm -rf debian/gosa/usr/share/gosa/doc/guide/devel
72         -for lang in de fr nl; do mkdir -p debian/gosa-help-$$lang/usr/share/gosa/doc/guide/user/$$lang; done
73         -for lang in de fr nl; do mv debian/gosa/usr/share/gosa/doc/guide/user/$$lang/* debian/gosa-help-$$lang/usr/share/gosa/doc/guide/user/$$lang/; done
74         -cp -R debian/gosa/usr/share/gosa/doc/* debian/gosa/usr/share/doc/gosa
75         -rm -rf debian/gosa/usr/share/gosa/contrib
76         -rm -rf debian/gosa/usr/share/gosa/locale/en
77         -rm -rf debian/gosa/usr/share/gosa/gen_locale.sh
78         -rm -rf debian/gosa/usr/share/gosa/gen_online_help.sh
79         -rm -rf debian/gosa/usr/share/gosa/gen_function_list.php
80         -rm -rf debian/gosa/usr/share/gosa/update.sh
81         -mkdir -p debian/gosa/usr/share/php/smarty/libs/plugins
82         -cp include/smarty/plugins/block.t.php debian/gosa/usr/share/php/smarty/libs/plugins
83         -rm -rf debian/gosa/usr/share/gosa/include/smarty
84         -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
85         -mv debian/gosa/usr/share/gosa/include/functions.inc.new debian/gosa/usr/share/gosa/include/functions.inc
86         -sed 's%require("smarty/Smarty.class.php");%require("/usr/share/php/smarty/libs/Smarty.class.php");%g' debian/gosa/usr/share/gosa/include/php_setup.inc > debian/gosa/usr/share/gosa/include/php_setup.inc.new
87         -mv debian/gosa/usr/share/gosa/include/php_setup.inc.new debian/gosa/usr/share/gosa/include/php_setup.inc
88         touch install-stamp
90 binary-indep: install
91         dh_testdir
92         dh_testroot
93         dh_installdocs 
94         dh_installcron
95         dh_installexamples
96 #       dh_undocumented  
97         dh_installman
98         dh_link
99         dh_strip
100 #       dh_compress
101         dh_fixperms 
102         dh_perl
103         dh_installdeb
104         dh_shlibdeps
106         cd debian/gosa && find ./etc -type f -print | sed -e 's#^./#/#' > DEBIAN/conffiles
107         chmod 644 debian/gosa/DEBIAN/conffiles
109         dh_gencontrol
110         dh_md5sums
111         dh_builddeb
113 source diff:                                                                  
114         @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
116 binary: binary-indep 
117 .PHONY: build install clean binary-indep binary