2948e85a259dc981df67fe776521b798fd1d1540
[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
7 pyversion=1.5
8 i=./debian/tmp
9 pysite=usr/lib/python$(pyversion)/site-packages
10
11 build:
12         dh_testdir
13         touch build
14
15 clean:
16         dh_testdir
17         -rm -f build
18         -find . -name '*.py[co]' | xargs rm -f
19         -rm -rf $(i) debian/files* core debian/substvars
20
21 instdirs = \
22         usr/bin \
23         usr/share/man/man1 \
24         $(pysite)/userdir_ldap \
25         var/www/userdir-ldap \
26         var/cache/userdir-ldap/web-cookies \
27         var/cache/userdir-ldap/hosts \
28         usr/share/doc/$(package)/samples \
29         etc/userdir-ldap/templates
30
31 binary-indep: build
32         dh_testdir
33         dh_testroot
34         dh_clean -k
35         dh_installdirs $(instdirs)
36
37         echo "userdir_ldap" > $(i)/$(pysite)/userdir_ldap.pth
38         echo "userdir_gpg" >> $(i)/$(pysite)/userdir_ldap.pth
39         install -m 644 userdir_ldap.py userdir_gpg.py \
40                 $(i)/$(pysite)/userdir_ldap/
41         install -m 755 {ud-forwardlist,ud-gpgimport,ud-info,ud-ldapshow,ud-userimport,ud-mailgate,ud-generate,ud-passchk,ud-useradd,ud-replicate,ud-xearth,ud-fingerserv,ud-echelon,ud-groupadd,ud-host} $(i)/usr/bin/
42         install -m 644 web/*.tab $(i)/var/www/userdir-ldap/
43         install -m 644 web/*.html $(i)/var/www/userdir-ldap/
44         install -m 644 web/*.cfg $(i)/var/www/userdir-ldap/
45         install -m 644 web/*.pm $(i)/var/www/userdir-ldap/
46         install -m 755 web/*.cgi $(i)/var/www/userdir-ldap/
47         chown www-data.www-data $(i)/var/cache/userdir-ldap/web-cookies/
48         chmod u=rwx,g=,o= $(i)/var/cache/userdir-ldap/web-cookies/
49         
50         install -m 644 doc/{apache-config.txt,slapd-config.txt} $(i)/usr/share/doc/$(package)
51         install -m 644 doc/samples/ud-* $(i)/usr/share/doc/$(package)/samples
52         gzip -9 $(i)/usr/share/doc/$(package)/*.txt
53         install -m 644 userdir-ldap.conf $(i)/etc/userdir-ldap/
54         echo "# See /usr/share/doc/userdir-ldap" > $(i)/etc/userdir-ldap/generate.conf
55         chmod 644 $(i)/etc/userdir-ldap/generate.conf
56         install -m 644 templates/*-* $(i)/etc/userdir-ldap/templates/
57         
58         dh_installmanpages
59         dh_fixperms --exclude=web-cookies
60         dh_compress
61         dh_installdeb
62         dh_gencontrol
63 #       dh_makeshlibs
64         dh_md5sums
65         dh_builddeb
66
67 binary-arch: build
68         dh_testdir
69 # There are no architecture-dependent files to be uploaded
70 # generated by this package.  If there were any they would be
71 # made here.
72
73
74 # Below here is fairly generic really
75
76 binary: binary-indep binary-arch
77
78 .PHONY: binary binary-arch binary-indep clean