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 93 94
|
#!/usr/bin/make -f
#
# Define the name of the package
package = ghostview
DOCS=ghostview.ps README gs.interface
# Some definitions
INSTALL=install
INSTPROG=$(INSTALL) -o root -g root -m 755 -c
INSTDATA=$(INSTALL) -o root -g root -m 644 -c
define checkdir
test -f Ghostview.c -a -f debian/rules
endef
build:
# Noninteractive parts of configuration
# If customization was needed, this should have been done before packaging.
$(checkdir)
xmkmf -a
make
touch build
clean:
# Undoes the effect of debian.rules build
# X packages will clean completely using the simple clean target.
$(checkdir)
-make clean
-rm build
# remove remaining Makefiles
-rm -f `find . -name Makefile -print`
-rm -f `find . -name Makefile.bak -print`
-rm -rf debian/tmp
-rm -f debian/*~
-rm -f debian/files
binary-indep: checkroot build
$(checkdir)
binary-arch: checkroot build
# Makes a binary package. No changes should be needed here,
# but the debian/* files must be provided.
# need to be root to do this.
$(checkdir)
-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
install -d -g root -m 755 -o root debian/tmp/etc/X11/app-defaults
install -d -g root -m 755 -o root debian/tmp/usr/share/doc/$(package)
install -d -g root -m 755 -o root debian/tmp/usr/X11R6/bin
install -d -g root -m 755 -o root debian/tmp/usr/X11R6/man/man1
install -d -g root -m 755 -o root debian/tmp/usr/X11R6/include/X11/pixmaps
install -d -g root -m 755 -o root debian/tmp/usr/lib/menu
install -d -g root -m 755 -o root debian/tmp/usr/lib/mime/packages
$(INSTPROG) debian/postinst debian/tmp/DEBIAN/
$(INSTPROG) debian/postrm debian/tmp/DEBIAN/
$(INSTDATA) debian/conffiles debian/tmp/DEBIAN/
$(INSTPROG) debian/prerm debian/tmp/DEBIAN/
make install install.man DESTDIR=$(shell pwd)/debian/tmp
strip --strip-unneeded --remove-section=.note --remove-section=.comment debian/tmp/usr/X11R6/bin/ghostview
$(INSTDATA) $(DOCS) debian/tmp/usr/share/doc/$(package)
$(INSTDATA) debian/copyright debian/tmp/usr/share/doc/$(package)/
$(INSTDATA) debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian
$(INSTDATA) HISTORY debian/tmp/usr/share/doc/$(package)/changelog
$(INSTDATA) debian/mime debian/tmp/usr/lib/mime/packages/$(package)
mkdir -p debian/tmp/usr/X11R6/include/X11/pixmaps
$(INSTDATA) debian/mini.ghostview.xpm \
debian/tmp/usr/X11R6/include/X11/pixmaps
mkdir -p debian/tmp/usr/lib/menu
$(INSTDATA) debian/menu debian/tmp/usr/lib/menu/ghostview
gzip -9 debian/tmp/usr/share/doc/$(package)/*
gzip -9 debian/tmp/usr/X11R6/man/man1/*
gunzip debian/tmp/usr/share/doc/ghostview/copyright.gz
LD_PRELOAD= dpkg-shlibdeps debian/tmp/usr/X11R6/bin/ghostview
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chmod -R g-ws debian/tmp
chmod -R u+rw debian/tmp
dpkg --build debian/tmp ..
checkroot:
$(checkdir)
test root = "`whoami`"
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
.PHONY: binary binary-arch binary-indep clean checkroot
|