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 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
|
#!/usr/bin/make -f
SHELL=/bin/bash
PACKAGE = argus-client
tmp = debian/tmp
sysconfdir = etc
docdir = usr/share/doc
mandir = usr/share/man
sbindir = usr/sbin
bindir = usr/bin
define checkdir
test -f include/argus.h
endef
clean: checkroot
test -f debian/control
rm -f build-stamp
rm -rf $(tmp) $(tmp-ALT) debian/substvars debian/files *.orig */*.orig *~ */*~
-$(MAKE) -f Makefile.in realclean ALLDIRS="clients common server"
checkroot:
test root = "`whoami`" || (echo Need root privelages; exit 1)
build: config.status
test -e debian/control
$(MAKE)
config.status:
./configure \
--prefix=/usr \
--libdir=/usr/lib \
--exec-prefix=/usr \
--sbindir=/usr/sbin \
--bindir=/usr/bin \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--includedir=/usr/include
binary-indep: build
$(checkroot)
binary-arch: checkroot build
#
# Generate argus-client package.
#
install --mode=755 -d $(tmp)/$(sysconfdir)
install --mode=755 -d $(tmp)/DEBIAN
install --mode=755 -d $(tmp)/$(bindir)
install --mode=755 -d $(tmp)/{$(mandir),$(bindir)}
install --mode=755 -d $(tmp)/$(mandir)/{man1,man5}
install --mode=755 -d $(tmp)/$(docdir)/$(PACKAGE)/{examples,html}
#
# Install documentation.
#
install --mode=644 doc/{HOW-TO,FAQ} \
$(tmp)/$(docdir)/$(PACKAGE)
cp -a support/* $(tmp)/$(docdir)/$(PACKAGE)/examples
chmod 755 $(tmp)/$(docdir)/$(PACKAGE)/examples/*
chmod 644 $(tmp)/$(docdir)/$(PACKAGE)/examples/README
install --mode=644 man/man5/ra* $(tmp)/$(mandir)/man5
install --mode=644 man/man1/ra* $(tmp)/$(mandir)/man1
install --mode=644 debian/README.Debian \
$(tmp)/$(docdir)/$(PACKAGE)/README.Debian
install --mode=644 debian/copyright \
$(tmp)/$(docdir)/$(PACKAGE)/copyright
install --mode=644 doc/CHANGES "$(tmp)/$(docdir)/$(PACKAGE)"
install --mode=644 CREDITS "$(tmp)/$(docdir)/$(PACKAGE)"
install --mode=644 ChangeLog \
$(tmp)/$(docdir)/$(PACKAGE)/changelog
install --mode=644 debian/changelog \
$(tmp)/$(docdir)/$(PACKAGE)/changelog.Debian
install --mode=644 doc/html/man/ra* \
$(tmp)/$(docdir)/$(PACKAGE)/html
chown -R root:root $(tmp)/$(docdir)/$(PACKAGE)
#
# Install special files.
#
install --mode=644 debian/ra.conf $(tmp)/$(sysconfdir)
install --mode=644 debian/conffiles $(tmp)/DEBIAN/conffiles
install --mode=755 debian/prerm $(tmp)/DEBIAN/prerm
install --mode=755 debian/postinst $(tmp)/DEBIAN/postinst
install --mode=755 bin/ragraph $(tmp)/$(bindir)
rm bin/ragraph
#
# Strip binaries.
#
strip --strip-all bin/ra*
strip -R .comment bin/ra*
strip -R .note bin/ra*
#
# Install binaries.
#
install --mode=755 bin/*ra* $(tmp)/$(bindir)
#
# Compress manpages and changelog.
#
gzip -9f $(tmp)/$(mandir)/man5/*
gzip -9f $(tmp)/$(mandir)/man1/*
gzip -9f $(tmp)/$(docdir)/$(PACKAGE)/changelog*
#
# Build binary package.
#
dpkg-shlibdeps $(tmp)/$(bindir)/*
dpkg-gencontrol -ips -p$(PACKAGE) -P$(tmp)
dpkg --build $(tmp) ..
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
|