bf81c9b8dbcbad006ee486f8632f92daa4d2b478
[mirror/userdir-ldap-cgi.git] / debian / rules
1 #! /usr/bin/make -f
2 # -*- make -*-
3 # Made with the aid of debmake, by Christoph Lameter,
4 # based on the sample debian/rules file for GNU hello by Ian Jackson.
5
6 package:=userdir-ldap-cgi
7 i:=./debian/tmp
8
9 build:
10         dh_testdir
11         $(MAKE) -C html
12         touch build
13
14 clean:
15         dh_testdir
16         -rm -f build
17         -rm -rf $(i) debian/files* core debian/substvars debian/debhelper.log html/*.html
18
19 instdirs = \
20         var/www/userdir-ldap \
21         var/www/userdir-ldap/Pics \
22         var/cache/userdir-ldap/web-cookies \
23         var/cache/userdir-ldap/hosts \
24         usr/share/doc/$(package) \
25         usr/lib/userdir-ldap-cgi
26
27 binary-indep: build
28         dh_testdir
29         dh_testroot
30         dh_clean -k
31         dh_installdirs $(instdirs)
32         dh_installdocs
33         isoquery -i 3166 -c | cut -f 1,4 > html/domains.tab
34
35         install -m 755 *.cgi $(i)/var/www/userdir-ldap/
36         install -m 644 Util.pm $(i)/var/www/userdir-ldap/
37         #install -m 644 html/index.html $(i)/var/www/
38         install -m 644 html/Pics/*.png $(i)/var/www/userdir-ldap/Pics/
39         install -m 644 html/*.css $(i)/var/www/userdir-ldap/
40         install -m 644 html/doc-direct.html $(i)/var/www/userdir-ldap/
41         install -m 644 html/doc-general.html $(i)/var/www/userdir-ldap/
42         install -m 644 html/doc-hosts.html $(i)/var/www/userdir-ldap/
43         install -m 644 html/doc-mail.html $(i)/var/www/userdir-ldap/
44         install -m 644 html/doc-mail-handling.html $(i)/var/www/userdir-ldap/
45         install -m 644 html/forward.html $(i)/var/www/userdir-ldap/
46         install -m 644 html/hostinfo.html $(i)/var/www/userdir-ldap/
47         install -m 644 html/login.html $(i)/var/www/userdir-ldap/
48         install -m 644 html/password.html $(i)/var/www/userdir-ldap/
49         install -m 644 html/searchform.html $(i)/var/www/userdir-ldap/
50         install -m 644 html/searchhelp.html $(i)/var/www/userdir-ldap/
51         install -m 644 html/searchresults.html $(i)/var/www/userdir-ldap/
52         install -m 644 html/update.html $(i)/var/www/userdir-ldap/
53         chown www-data:www-data $(i)/var/cache/userdir-ldap/web-cookies/
54         chmod u=rwx,g=,o= $(i)/var/cache/userdir-ldap/web-cookies/
55
56         install -m 755 password-qualify-check $(i)/usr/lib/userdir-ldap-cgi
57
58         install -m 644 apache-config.txt $(i)/usr/share/doc/$(package)
59
60         dh_link
61
62         dh_installchangelogs
63         dh_installcron
64         dh_fixperms --exclude=web-cookies
65         dh_compress
66         dh_installdeb
67         dh_gencontrol
68         dh_md5sums
69         dh_builddeb
70
71 binary-arch: build
72
73 # Below here is fairly generic really
74
75 binary: binary-indep binary-arch
76
77 .PHONY: binary binary-arch binary-indep clean