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
|
#!/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
# 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.
# The name of the package (for example, `emacs').
p=dome
# The version of the package (for example, `19.28').
version=4.60
# The Debian revision of the package (for example, `2').
debian=1
CC = g++
CFLAGS = -O2 -g -Wall
LFLAGS = -lm
make_directory= install -d -o root -g root -m 755
install_binary= install -s -o root -g root -m 755
install_script= install -o root -g root -m 755
install_files= install -o root -g root -m 644
# The next section may have to be extensively modified
build:
$(checkdir)
@echo "Building the binaries ..."
$(MAKE) -f domegcc.mak CC="$(CC)" CFLAGS="$(CFLAGS)" LFLAGS="$(LFLAGS)"
touch build
clean:
$(checkdir)
@echo "Cleaning up after a build ..."
-rm -f build debian/files debian/substvars
-$(MAKE) -i -f domegcc.mak clean
-rm -rf debian/tmp debian*~
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)
@echo "Making the binary package: $(p)-$(version)-$(debian).deb ..."
rm -rf debian/tmp
$(make_directory) debian/tmp/DEBIAN
$(make_directory) debian/tmp/usr/bin
$(make_directory) debian/tmp/usr/doc/dome
$(install_binary) dome dxftopov debian/tmp/usr/bin/
$(install_files) dome.txt debian/tmp/usr/doc/$(p)/
$(install_files) debian/changelog debian/tmp/usr/doc/$(p)/changelog.Debian
gzip -9 debian/tmp/usr/doc/$(p)/*
$(install_files) debian/copyright debian/tmp/usr/doc/$(p)/
dpkg-shlibdeps dome dxftopov; dpkg-gencontrol
chown -R root.root debian/tmp
dpkg --build debian/tmp ..
# Below here is fairly generic really.
binary: binary-indep binary-arch
dist-full: checkroot
dpkg-buildpackage -uc -us -sa
@echo "You may want to run \"debian/rules clean\" to clean up after the build"
dist-update: checkroot
dpkg-buildpackage -uc -us -sd
@echo "You may want to run \"debian/rules clean\" to clean up after the build"
dist: dist-full
update: dist-update
checkroot:
test root = "`whoami`"
define checkdir
test -f dome.txt -a -f debian/rules
endef
.PHONY: binary binary-indep binary-arch dist update clean checkroot
|