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 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
#!/usr/bin/make -f
SHELL=/bin/bash
package=userv
t=debian/tmp
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTOPTS= LDFLAGS=-s INSTALL_PROGRAM='install -c -s'
else
INSTOPTS= INSTALL_PROGRAM='install -c'
endif
build:
$(checkdir)
./configure --prefix=/usr
$(MAKE) all docs
touch build
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
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 $t
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/
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 \
mandir=$t/usr/share/man \
install install-doc
cp debian/copyright $t/usr/share/doc/$(package)/.
cp debian/changelog $t/usr/share/doc/$(package)/changelog
cp README $t/usr/share/doc/$(package)/README.upstream
cp system.default system.override $t/usr/share/doc/$(package)/examples
ln -s changelog.gz $t/usr/share/doc/$(package)/changelog.Debian.gz
gzip -9v $t/usr/share/doc/$(package)/changelog \
$t/usr/share/man/man1/*.1 $t/usr/share/man/man8/*.8 \
$t/usr/share/doc/userv/*.ps
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
dpkg --build $t ..
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
|