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
|
#!/usr/bin/make -f
# debian/rules file - for GNU ed (0.7).
# Based on sample debian/rules file - for GNU Hello (1.3).
# Copyright 1994,1995 by Ian Jackson.
# Copyright 1997-2007 by James Troup.
# 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
DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
install_dir=install -d -m 755
install_file=install -m 644
install_script=install -m 755
install_binary=install -m 755 -s
include /usr/share/dpatch/dpatch.make
build: patch-stamp
$(checkdir)
./configure --prefix=/usr
$(MAKE) CFLAGS="-O2 -g -Wall"
touch build
test: build
$(checkdir)
ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
make check || exit 127
endif
clean: unpatch
$(checkdir)
-rm -f ed-test build debian/patched
-$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean
find . -name \*~ | xargs rm -vf
-rm -rf debian/tmp debian/files* debian/substvars*
binary-indep:
binary-arch: build test checkroot
$(checkdir)
-rm -rf debian/tmp
$(install_dir) debian/tmp/DEBIAN/
$(install_script) debian/postinst debian/tmp/DEBIAN/
$(install_script) debian/prerm debian/tmp/DEBIAN/
$(install_dir) debian/tmp/bin debian/tmp/usr/bin
$(install_binary) ed debian/tmp/bin/
ln -s /bin/ed debian/tmp/usr/bin/red
$(install_dir) debian/tmp/usr/share/info/
$(install_file) doc/ed.info debian/tmp/usr/share/info/
gzip -9v debian/tmp/usr/share/info/ed.info
$(install_dir) debian/tmp/usr/share/man/man1/
$(install_file) doc/ed.1 debian/tmp/usr/share/man/man1/
gzip -9v debian/tmp/usr/share/man/man1/ed.1
ln -s ed.1.gz debian/tmp/usr/share/man/man1/red.1.gz
$(install_dir) debian/tmp/usr/share/doc/ed/
$(install_file) README NEWS AUTHORS TODO debian/tmp/usr/share/doc/ed
$(install_file) debian/changelog debian/tmp/usr/share/doc/ed/changelog.Debian
$(install_file) ChangeLog debian/tmp/usr/share/doc/ed/changelog
gzip -9v debian/tmp/usr/share/doc/ed/*
$(install_file) debian/copyright debian/tmp/usr/share/doc/ed/
dpkg-shlibdeps ./ed
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chmod -R go=rX debian/tmp
dpkg --build debian/tmp ..
define checkdir
test -f ed.h && 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: test binary binary-arch binary-indep clean checkroot
|