chiark / gitweb /
* Move README.userv to autopkgtest-xenlvm package (and hence to
[autopkgtest.git] / debian / rules
1 #!/usr/bin/make -f
2 #
3 # This file is part of autopkgtest
4 # autopkgtest is a tool for testing Debian binary packages
5 #
6 # autopkgtest is Copyright (C) 2006 Canonical Ltd.
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #
22 # See the file CREDITS for a full list of credits information (often
23 # installed as /usr/share/doc/autopkgtest/CREDITS).
24
25 SHELL=/bin/bash
26
27 p=autopkgtest
28 x=xenlvm
29 topdir=`pwd`
30
31 build build-indep:
32         $(MAKE)
33
34 build-arch:
35 binary-arch:
36
37 binary binary-indep: checkdir
38         dh_testroot
39         dh_clean
40         dh_installdirs usr
41
42         $(MAKE) install-here prefix=debian/$p/usr
43         $(MAKE) -C xen install \
44                 pkgname=$p-$x \
45                 prefix=$(topdir)/debian/$p-$x/usr \
46                 sharedir_lnfrom=/usr/share/$p/$x \
47                 sharedir=$(topdir)/debian/$p-$x/usr/share/$p/$x \
48                 etcdir=$(topdir)/debian/$p-$x/etc cfg_suffix=''
49         cd debian/$p-$x/etc/userv/services.d && \
50                 mv -f adt-xenlvm-testbed:dist adt-xenlvm-testbed
51
52         set -e; for f in $p $p-$x; do \
53                 cat CREDITS debian/copyright.suffix \
54                         >debian/$$f/usr/share/doc/$$f/copyright; \
55                 done
56         dh_installinit -p $p-$x --onlyscripts --name=adt$x -- defaults 19
57         dh_installchangelogs
58         dh_compress
59         dh_link
60         dh_md5sums
61         dh_gencontrol
62         dh_fixperms
63         dh_installdeb
64         dh_builddeb
65
66 clean: checkdir
67         dh_testroot
68         $(MAKE) clean
69         dh_clean
70
71 checkdir:
72         dh_testdir runner/adt-run
73