aboutsummaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules100
1 files changed, 100 insertions, 0 deletions
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..d123159
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,100 @@
+#! /usr/bin/make -f
+#
+# Copyright 1994,1995 by Ian Jackson.
+# I hereby give you perpetual unlimited permission to copy,
+# modify and relicense this file, provided that you do not remove
+# my name from the file itself. (I assert my moral right of
+# paternity under the Copyright, Designs and Patents Act 1988.)
+# This file may have to be extensively modified
+# Copyright 1996 by Kevin Dalley.
+
+# To make the binary distribution package, the ``Debianized'' source package
+# and the context diff to the original package, type `./debian.rules dist'.
+# Make sure that `debian.rules' is executable before the final distribution
+# is made.
+#
+# Invoke each target with `./debian.rules <target>'. All targets should be
+# invoked with the package root as the current directory.
+#
+# The `binary' target must be run as root, as it needs to install files with
+# specific ownerships.
+
+# The name of the package (for example, `emacs').
+package = dejagnu
+
+CC = gcc
+CFLAGS = -O2 -Wall # sane warning options vary between programs
+LDFLAGS = # none
+
+
+build:
+ $(checkdir)
+ ./configure --prefix=/usr
+ $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
+ libexecdir=/usr/lib/locate localstatedir=/var/lib/locate all
+ $(MAKE) info
+ touch build
+
+clean:
+ $(checkdir)
+ -rm -f build
+ -$(MAKE) -i distclean
+ -rm -rf *~ debian/tmp debian/*~ debian/files*
+ rm -f config.cache doc/config.log testsuite/config.log \
+ testsuite/.tmp testsuite/dbg.log testsuite/runtest.log \
+ testsuite/runtest.sum testsuite/setval.tmp \
+ testsuite/testrun.log testsuite/testrun.sum \
+ example/testrun.sum
+
+binary-indep: checkroot build
+ $(checkdir)
+ -rm -rf debian/tmp
+ install -d debian/tmp debian/tmp/DEBIAN
+ install -d debian/tmp/usr/doc/$(package)
+ install -d -g root -m 755 -o root debian/tmp/etc/$(package)
+ install debian/{postinst,postrm,preinst,prerm} debian/tmp/DEBIAN/.
+ cd $(package); $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" \
+ prefix=`pwd`/../debian/tmp/usr install
+ chmod 0644 debian/tmp/usr/lib/dejagnu/runtest.exp
+ cd $(package); $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" \
+ prefix=`pwd`/../debian/tmp/usr install-info
+ gzip -9v debian/tmp/usr/info/*
+ gzip -9v debian/tmp/usr/man/man1/*
+ install -m 0644 debian/copyright debian/tmp/usr/doc/$(package)
+ install -m 0644 debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian
+ gzip -9v debian/tmp/usr/doc/$(package)/changelog.Debian
+ install -m 0644 ChangeLog debian/tmp/usr/doc/$(package)
+ gzip -9v debian/tmp/usr/doc/$(package)/ChangeLog
+ ln -s ChangeLog.gz debian/tmp/usr/doc/$(package)/changelog.gz
+ install -g root -m 644 -o root debian/site.exp \
+ debian/tmp/etc/$(package)/site.exp
+ cd debian/tmp/usr/lib/$(package); ln -fs /etc/$(package)/site.exp .
+ install -d debian/tmp/usr/doc/$(package)/examples
+ -cd example; $(MAKE) -i distclean
+ (cd example; tar cf - . ) | \
+ (cd debian/tmp/usr/doc/$(package)/examples; tar xf -)
+ install install.sh debian/tmp/usr/doc/$(package)/examples
+ dpkg-gencontrol
+# chown -R root.root debian/tmp
+# chmod -R g-ws debian/tmp
+ dpkg --build debian/tmp ..
+
+binary-arch:
+
+define checkdir
+ test -f runtest.exp -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