chiark / gitweb /
* adt-testreport-onepackage: Handling of source packages'
[autopkgtest.git] / debian / rules
index 6c6c3bb178c985bfa796b0efeb1060f97e004617..a6b18b1e0604ad8723d2c7dc5f342ebf95961326 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=autopkgtest-xenlvm
+x=xenlvm
 topdir=`pwd`
 
 build build-indep:
@@ -38,20 +40,27 @@ binary binary-indep: checkdir
        dh_installdirs usr
 
        $(MAKE) install-here prefix=debian/$p/usr
-       $(MAKE) -C xen install pkgname=$(px) \
-               prefix=$(topdir)/debian/$(px)/usr \
-               etcdir=$(topdir)/debian/$(px)/etc cfg_suffix=''
+       $(MAKE) -C xen install \
+               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
-       dh_installinit -p $(px) --onlyscripts --name=adtxenlvm -- defaults 19
+       set -e; for f in $p $p-$x; do \
+               cat CREDITS debian/copyright.suffix \
+                       >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_installchangelogs
        dh_builddeb
 
 clean: checkdir