1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
#!/usr/bin/make -f
package=userv
build:
$(checkdir)
./configure --prefix=/usr
$(MAKE)
$(MAKE) spec.html
touch build
clean:
$(checkdir)
-rm -f build
-$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
-rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars*
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.
binary-arch: checkroot build
$(checkdir)
-rm -rf debian/tmp
install -d debian/tmp/{DEBIAN,etc/init.d} debian/tmp/usr/{sbin,bin}
install -d debian/tmp/etc/userv/{override,default}.d
install -d debian/tmp/usr/doc/$(package)/examples/
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
$(MAKE) LDFLAGS=-s INSTALL_PROGRAM='install -c -s' \
prefix=debian/tmp/usr etcdir=debian/tmp/etc install
cp debian/copyright debian/tmp/usr/doc/$(package)/.
cp debian/changelog debian/tmp/usr/doc/$(package)/changelog
cp README debian/tmp/usr/doc/$(package)/README.upstream
cp system.default system.override debian/tmp/usr/doc/$(package)/examples
gzip -9v debian/tmp/usr/doc/$(package)/changelog
ln -s changelog.gz debian/tmp/usr/doc/$(package)/changelog.Debian.gz
cp -a spec.html debian/tmp/usr/doc/$(package)/
dpkg-shlibdeps daemon client
dpkg-gencontrol
chown -R root.root debian/tmp
chmod -R g-ws debian/tmp
chmod 700 debian/tmp/var/run/userv
dpkg --build debian/tmp ..
define checkdir
test -f overlord.c -a -f lexer.l.m4 -a -f debian/rules
endef
# Below here is fairly generic really
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|