chiark / gitweb /
use dh_clean
[userv.git] / debian / rules
index 011a462..97bced1 100755 (executable)
@@ -11,24 +11,24 @@ else
        INSTOPTS= INSTALL_PROGRAM='install -c'
 endif
 
-build:
+build: build-arch build-indep
+
+build-arch:
        $(checkdir)
        ./configure --prefix=/usr
        $(MAKE) all docs
-       touch build
+       touch build-arch
 
 clean:
        $(checkdir)
-       -rm -f build
-       -$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
-       -rm -rf *~ $t debian/*~ debian/files* debian/substvars*
-       -rm -rf spec.html
+       rm -f build build-arch
+       $(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
+       rm -rf *~ $t
+       rm -rf spec.html spec.ps debian/substvars*
+       dh_clean
 
-binary-indep:  checkroot build
-       $(checkdir)
-# There are no architecture-independent files to be uploaded
-# generated by this package.  If there were any they would be
-# made here.
+build-indep:
+binary-indep:
 
 binary-arch:   checkroot build
        $(checkdir)
@@ -56,9 +56,9 @@ binary-arch:  checkroot build
        cp debian/lintian $t/usr/share/lintian/overrides/userv
        dpkg-shlibdeps daemon client
        dpkg-gencontrol -isp
-       chown -R root.root $t
-       chmod -R og=rX $t
-       chmod 700 $t/var/run/userv
+       dh_fixperms -Pdebian/tmp
+       chown root.root debian/tmp/usr/bin/userv
+       chmod 4755 debian/tmp/usr/bin/userv
        dpkg --build $t ..
 
 define checkdir