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
|
#!/usr/bin/make -f
# -*- mode: makefile; -*-
#
# Invoke each target with `./debian/rules <target>'. All targets should be
# invoked with the package root as the current directory.
package = transfig
build:
# Builds the binary package.
xmkmf -a
make CDEBUGFLAGS="-g -O2"
touch build
clean:
# Undoes the effect of `make -f debian.rules build'.
-make clean
rm -f Makefile fig2dev/Makefile fig2dev/dev/Makefile transfig/Makefile
rm -f build debian/files debian/substvars
rm -rf debian/tmp
binary-arch:
# Makes a binary package.
rm -rf debian/tmp
install -d -g root -m 755 -o root debian/tmp
chmod g-s debian/tmp
install -d -g root -m 755 -o root debian/tmp/DEBIAN
make install DESTDIR=`pwd`/debian/tmp
make install.man DESTDIR=`pwd`/debian/tmp
install -d -g root -m 755 -o root debian/tmp/usr/doc/$(package)
install -g root -m 644 -o root debian/changelog \
debian/tmp/usr/doc/transfig/changelog.Debian
cp -a CHANGES LATEX.AND.XFIG NOTES README doc/tpic.spec doc/manual \
debian/tmp/usr/doc/transfig/
-gzip -9 debian/tmp/usr/doc/transfig/{,manual/}*
install -g root -m 644 -o root debian/copyright \
debian/tmp/usr/doc/transfig/copyright
#
dpkg-shlibdeps transfig/transfig fig2dev/fig2dev
dpkg-gencontrol
chown -R root.root debian/tmp
chmod -R g-ws debian/tmp
chmod -R u+w debian/tmp
dpkg --build debian/tmp ..
define checkdir
test -f $(package).c
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
|