chiark / gitweb /
changelog entry for 1.0.6; bzrignore debian/changelog
[autopkgtest.git] / debian / rules
index 6b0ddd3edf71ea4d8b3163055e4601ba6cb75f42..f870a74acb7d57f63ecba18b3241ae3c537b07be 100755 (executable)
 # See the file CREDITS for a full list of credits information (often
 # installed as /usr/share/doc/autopkgtest/CREDITS).
 
+SHELL=/bin/bash
+
 p=autopkgtest
-px=autopkgtext-xenlvm
+x=xenlvm
+topdir=`pwd`
 
-build build-indep:
+build build-indep: debian/copyright
        $(MAKE)
 
 build-arch:
 binary-arch:
 
+debian/copyright: CREDITS debian/copyright.suffix
+       cat $^ >$@.new && mv -f $@.new $@
+
 binary binary-indep: checkdir
        dh_testroot
        dh_clean
@@ -38,20 +44,30 @@ binary binary-indep: checkdir
 
        $(MAKE) install-here prefix=debian/$p/usr
        $(MAKE) -C xen install \
-               prefix=debian/$(px)/usr \
-               etc=debian/$(px)/etc cfg_suffix=''
+               pkgname=$p-$x \
+               prefix=$(topdir)/debian/$p-$x/usr \
+               sharedir_lnfrom=/usr/share/$p/$x \
+               sharedir=$(topdir)/debian/$p-$x/usr/share/$p/$x \
+               etcdir=$(topdir)/debian/$p-$x/etc cfg_suffix=''
+       cd debian/$p-$x/etc/userv/services.d && \
+               mv -f adt-xenlvm-testbed:dist adt-xenlvm-testbed
 
-       cat CREDITS debian/copyright.suffix \
-               >debian/$p/usr/share/doc/$p/copyright
+       set -e; for f in $p $p-$x; do \
+               cp debian/copyright >debian/$$f/usr/share/doc/$$f/copyright; \
+               done
+       dh_installinit -p $p-$x --onlyscripts --name=adt$x -- defaults 19
+       dh_installchangelogs
        dh_compress
        dh_link
        dh_md5sums
-       dh_fixperms
        dh_gencontrol
+       dh_fixperms
+       dh_installdeb
        dh_builddeb
 
-clean: checkdir
+clean: checkdir debian/copyright
        dh_testroot
+       $(MAKE) clean
        dh_clean
 
 checkdir: