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
|
#!/usr/bin/make -f
# -*-makefile-*-
# debian/rules file for jgraph
# Modified from the hello package rules file which was Copyright
# 1994,1995 by Ian Jackson.
# There used to be `source' and `diff' targets in this file, and many
# packages also had `changes' and `dist' targets. These functions
# have been taken over by dpkg-source, dpkg-genchanges and
# dpkg-buildpackage in a package-independent way, and so these targets
# are obsolete.
package=jgraph
build:
$(checkdir)
make CFLAGS="-DLCC -O2 -g -Wall"
touch build
clean:
$(checkdir)
-rm -f build
-make clean
-(cd complex-examples && make clean)
-rm -f `find . -name "*~"`
-rm -rf debian/tmp debian/files* core 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/tmp/DEBIAN
install -d debian/tmp/usr
install -d debian/tmp/usr/bin
cp jgraph debian/tmp/usr/bin
install -d debian/tmp/usr/man/man1
cp jgraph.1 debian/tmp/usr/man/man1
install -d debian/tmp/usr/doc/jgraph/examples
cp complex-examples/* debian/tmp/usr/doc/jgraph/examples
for i in *.jgr *.pts data.txt mab2.times tree.awk sin.c; \
do cp $$i debian/tmp/usr/doc/jgraph/examples; done;
cp README debian/tmp/usr/doc/jgraph
gzip -9v debian/tmp/usr/doc/jgraph/README
cp debian/copyright debian/tmp/usr/doc/jgraph
cp debian/changelog debian/tmp/usr/doc/jgraph/changelog.Debian
gzip -9v debian/tmp/usr/doc/jgraph/changelog.Debian
dpkg-shlibdeps debian/tmp/usr/bin/*
dpkg-gencontrol
find debian/tmp/usr/{man,doc/jgraph/examples} -type f | xargs gzip -9v
chown -R root.root debian/tmp
find debian/tmp -type f | xargs chmod 644
find debian/tmp -type d | xargs chmod 755
chmod 755 debian/tmp/usr/bin/*
strip debian/tmp/usr/bin/*
chmod -R g-ws debian/tmp # Just in case
dpkg --build debian/tmp ..
define checkdir
test -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
|