chiark / gitweb /
provide build-arch, build-indep
[userv.git] / debian / rules
index c29fc874b717c78b4edacc17d418db4789dbeac6..05edd5f77fbae685c591fd46de5fa60a5ccd6e5a 100755 (executable)
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f
 
+SHELL=/bin/bash
 package=userv
 
 t=debian/tmp
@@ -10,24 +11,23 @@ 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 debian/*~ debian/files* debian/substvars*
+       rm -rf spec.html
 
-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)
@@ -35,12 +35,10 @@ binary-arch:        checkroot build
        install -d $t/{DEBIAN,etc/init.d} $t/usr/{sbin,bin}
        install -d $t/etc/userv/{override,default}.d
        install -d $t/usr/share/doc/$(package)/examples/
-       install -d $t/var/run/$(package)/
        install -d $t/usr/share/lintian/overrides/
-       cp debian/{postinst,prerm,postrm,conffiles} $t/DEBIAN/.
-       cp debian/initd $t/etc/init.d/userv
-       chmod 755 $t/DEBIAN/{postinst,prerm,postrm}
-       chmod 755 $t/etc/init.d/userv
+       install -m 755 debian/{postinst,prerm,postrm} $t/DEBIAN/.
+       install -m 644 debian/conffiles $t/DEBIAN/.
+       install -m 755 debian/initd $t/etc/init.d/userv
        $(MAKE) $(INSTOPTS) \
                prefix=$t/usr etcdir=$t/etc \
                docdir=$t/usr/share/doc/userv \
@@ -59,7 +57,6 @@ binary-arch:  checkroot build
        dpkg-gencontrol -isp
        chown -R root.root $t
        chmod -R og=rX $t
-       chmod 700 $t/var/run/userv
        dpkg --build $t ..
 
 define checkdir