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