3 # Copyright 1996-2013,2016 Ian Jackson <ijackson@chiark.greenend.org.uk>
4 # Copyright 1998 David Damerell <damerell@chiark.greenend.org.uk>
6 # Chancellor Masters and Scholars of the University of Cambridge
7 # Copyright 2010 Tony Finch <fanf@dotat.at>
9 # This is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with userv-utils; if not, see http://www.gnu.org/licenses/.
22 subdirs_build= ipif www-cgi git-daemon
23 subdirs_nobuild=dyndns groupmanage misc
25 packages_indep= userv-dyndns userv-groupmanage userv-utils userv-git-daemon
26 packages_arch= userv-ipif userv-cgi
27 packages= $(packages_indep) $(packages_arch)
35 override_dh_auto_configure:
37 override_dh_auto_build:
39 set -e; for s in $(subdirs_build); do \
44 override_dh_auto_install:
47 set -e; for p in $(packages); do rm -rf $d/$$p; done
49 set -e; for s in $(subdirs_build) $(subdirs_nobuild); do \
52 $(MAKE) -C $$s install install-docs install-examples \
60 mv debian/userv-misc debian/userv-utils
62 set -e; cd debian/userv-ipif/usr/share/doc; \
63 mv userv-ipif userv-utils; \
65 mv service.c.txt ipif.txt
67 cp -al debian/userv-ipif/. debian/userv-utils/.
69 mv debian/userv-www-cgi debian/userv-cgi
70 mv debian/userv-groupmanage/usr/share/doc/groupmanage \
71 debian/userv-groupmanage/usr/share/doc/userv-groupmanage
73 rename 's/\.example$$//' $d/userv-ipif/etc/userv/vpn/*.example \
74 $d/userv-dyndns/etc/userv/dyndns-service-users.example \
75 $d/userv-groupmanage/etc/groupmanage.conf.example
76 rename 's/\.distrib$$//' $d/*/etc/userv/services.d/*.distrib
78 mv $d/userv-utils/usr/bin/mailq $d/userv-utils/usr/bin/mailq.userv
80 set -e; cd $d/userv-utils/etc/userv; \
81 mkdir services-available; \
82 mv services.d/* services-available/
86 override_dh_auto_clean:
89 set -e; for s in $(subdirs_build); do \
90 $(MAKE) -C $$s -i distclean || \
91 $(MAKE) -C $$s -f Makefile.in distclean; \
93 rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars*
96 test -f ipif/service.c
99 # Below here is fairly generic really
103 test root = "`whoami`"