Add DataTables to d/copyright
[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/$(package)
8
9 build: build-indep
10
11 build-indep:
12         dh_testdir
13         $(MAKE) -C html
14
15 clean:
16         dh_testdir
17         dh_clean
18         -rm -rf debian/files* core debian/substvars debian/debhelper.log html/*.html html/domains.tab
19
20 instdirs = \
21         var/www/userdir-ldap \
22         var/www/userdir-ldap/js \
23         var/www/userdir-ldap/js/DataTables-1.10.20 \
24         var/www/userdir-ldap/js/DataTables-1.10.20/images \
25         var/www/userdir-ldap/Pics \
26         var/cache/userdir-ldap/web-cookies \
27         var/cache/userdir-ldap/hosts \
28         var/cache/userdir-ldap/totp \
29         usr/share/doc/$(package) \
30         usr/lib/userdir-ldap-cgi
31
32 binary-indep: build
33         dh_testdir
34         dh_testroot
35         dh_prep
36         dh_installdirs $(instdirs)
37         dh_installdocs
38
39         install -m 755 *.cgi $(i)/var/www/userdir-ldap/
40         install -m 644 Util.pm $(i)/var/www/userdir-ldap/
41         #install -m 644 html/index.html $(i)/var/www/
42         install -m 644 html/Pics/*.png $(i)/var/www/userdir-ldap/Pics/
43         install -m 644 html/*.css $(i)/var/www/userdir-ldap/
44         install -m 644 html/*.js $(i)/var/www/userdir-ldap/js
45         install -m 644 html/js/DataTables-1.10.20/*.css $(i)/var/www/userdir-ldap/js/
46         install -m 644 html/js/DataTables-1.10.20/*.js $(i)/var/www/userdir-ldap/js/
47         install -m 644 html/js/DataTables-1.10.20/images/* $(i)/var/www/userdir-ldap/js/DataTables-1.10.20/images/
48         install -m 644 html/doc-direct.html $(i)/var/www/userdir-ldap/
49         install -m 644 html/doc-general.html $(i)/var/www/userdir-ldap/
50         install -m 644 html/doc-hosts.html $(i)/var/www/userdir-ldap/
51         install -m 644 html/doc-mail.html $(i)/var/www/userdir-ldap/
52         install -m 644 html/doc-mail-handling.html $(i)/var/www/userdir-ldap/
53         install -m 644 html/forward.html $(i)/var/www/userdir-ldap/
54         install -m 644 html/hostinfo.html $(i)/var/www/userdir-ldap/
55         install -m 644 html/login.html $(i)/var/www/userdir-ldap/
56         install -m 644 html/password.html $(i)/var/www/userdir-ldap/
57         install -m 644 html/searchform.html $(i)/var/www/userdir-ldap/
58         install -m 644 html/searchhelp.html $(i)/var/www/userdir-ldap/
59         install -m 644 html/searchresults.html $(i)/var/www/userdir-ldap/
60         install -m 644 html/fetch-totp-seed.html $(i)/var/www/userdir-ldap/
61         install -m 644 html/update.html $(i)/var/www/userdir-ldap/
62         chown www-data:www-data $(i)/var/cache/userdir-ldap/web-cookies/
63         chmod u=rwx,g=,o= $(i)/var/cache/userdir-ldap/web-cookies/
64         chown www-data:www-data $(i)/var/cache/userdir-ldap/totp/
65         chmod u=rwx,g=,o= $(i)/var/cache/userdir-ldap/totp/
66
67         install -m 755 password-qualify-check $(i)/usr/lib/userdir-ldap-cgi
68
69         install -m 644 apache-config.txt $(i)/usr/share/doc/$(package)
70
71         dh_link
72
73         dh_installchangelogs
74         dh_installcron
75         dh_fixperms --exclude=web-cookies --exclude=totp
76         dh_compress
77         dh_installdeb
78         dh_gencontrol
79         dh_md5sums
80         dh_builddeb
81
82 binary-arch: build
83
84 # Below here is fairly generic really
85
86 binary: binary-indep binary-arch
87
88 .PHONY: build build-indep binary binary-arch binary-indep clean