chiark / gitweb /
@@ -9,6 +9,7 @@
[userv.git] / debian / rules
index 225bcfc..66c9299 100755 (executable)
@@ -1,14 +1,11 @@
 #!/usr/bin/make -f
 
 package=userv
-revision=$(shell dpkg-parsechangelog | sed -n 's/^Version:.*-//p')
-verext=-$(revision)deb
 
 build:
        $(checkdir)
        ./configure --prefix=/usr
-       $(MAKE) VEREXT=$(verext)
-       $(MAKE) spec.html VEREXT=$(verext)
+       $(MAKE) all docs
        touch build
 
 clean:
@@ -32,22 +29,27 @@ binary-arch:        checkroot build
        install -d debian/tmp/var/run/$(package)/
        cp debian/{postinst,prerm,postrm,conffiles} debian/tmp/DEBIAN/.
        cp debian/initd debian/tmp/etc/init.d/userv
-       chmod +x debian/tmp/DEBIAN/{postinst,prerm,postrm}
-       chmod +x debian/tmp/etc/init.d/userv
+       chmod 755 debian/tmp/DEBIAN/{postinst,prerm,postrm}
+       chmod 755 debian/tmp/etc/init.d/userv
        $(MAKE) LDFLAGS=-s INSTALL_PROGRAM='install -c -s' \
-               VEREXT=$(verext) \
-               prefix=debian/tmp/usr etcdir=debian/tmp/etc install
+               prefix=debian/tmp/usr etcdir=debian/tmp/etc \
+               docdir=debian/tmp/usr/doc/userv \
+               install install-doc
        cp debian/copyright debian/tmp/usr/doc/$(package)/.
-       cp debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian
+       cp debian/changelog debian/tmp/usr/doc/$(package)/changelog
        cp README debian/tmp/usr/doc/$(package)/README.upstream
-       cp Changelog debian/tmp/usr/doc/$(package)/changelog
        cp system.default system.override debian/tmp/usr/doc/$(package)/examples
-       gzip -9v debian/tmp/usr/doc/$(package)/changelog{,.Debian}
-       cp -a spec.html debian/tmp/usr/doc/$(package)/
+       ln -s changelog.gz debian/tmp/usr/doc/$(package)/changelog.Debian.gz
+       gzip -9v debian/tmp/usr/doc/$(package)/changelog debian/tmp/usr/man/man1/*.1
+       rm debian/tmp/usr/doc/userv/*.ps
+       -mkdir -p -m 0755 debian/tmp/usr/share/doc
+       mv debian/tmp/usr/doc/* debian/tmp/usr/share/doc/
+       mv debian/tmp/usr/man debian/tmp/usr/share/man
+       rm -rf debian/tmp/usr/doc
        dpkg-shlibdeps daemon client
-       dpkg-gencontrol
+       dpkg-gencontrol -isp
        chown -R root.root debian/tmp
-       chmod -R g-ws debian/tmp
+       chmod -R og=rX debian/tmp
        chmod 700 debian/tmp/var/run/userv
        dpkg --build debian/tmp ..