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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
|
#! /usr/bin/make -f
#
# Last modification: Mon, 17 Nov 1997 12:13:15 +0200
# rules to debianize groff
CC = gcc
CFLAGS = -O2
LDFLAGS = -s
package = groff
DEBVER=`dpkg-parsechangelog | awk '/Version:/{ print $$2 }'`
DOCUMENTS= BUG-REPORT ChangeLog NEWS PROBLEMS PROJECTS README TODO \
doc/meintro.me doc/meref.me doc/pic.ms
.PHONY: debian/changelog
debian/changelog:
if [ -r debian/changelog.src ]; then \
if [ "`cat /etc/debian_version`" = "1.3" ]; \
then echo "groff (1.11a-0bo2) bo-unstable; urgency=low" > $@ ; \
elif [ "`cat /etc/debian_version`" = "2.0" \
-o "`cat /etc/debian_version`" = "2.0 (unstable)" ]; \
then echo "groff (1.11a-2) unstable; urgency=low" > $@ ; \
fi && cat debian/changelog.src >> $@ ; fi
Makefile:
$(checkdir)
-rm -f config.log
./configure --prefix=/usr
xditview/Makefile:
$(checkdir)
cd xditview; xmkmf
build: Makefile xditview/Makefile
$(checkdir)
-if [ "`uname -n`" = "pongo.icenet.fi" ]; then ctags */*.[ch] */*.cc; fi
# libgroff/Makefile.sub use DEBIAN-VERSION instead of VERSION
dpkg-parsechangelog | awk '/Version:/{ print $$2 " (debian)" }' > DEBIAN-VERSION
$(MAKE) CC="$(CC)" CCFLAGS="$(CFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS) -lc"
cd xditview; $(MAKE) depend; \
$(MAKE) CC="$(CC)" CCFLAGS="$(CFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS) -lc"
touch build
clean: Makefile xditview/Makefile
$(checkdir)
-rm -rf debian/tmp debian/files*
-rm -f build man/index.* `find . -name '*~'` tags
-$(MAKE) -i distclean
-cd xditview;$(MAKE) extraclean; rm -f Makefile
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)
#
install -d -g root -m 755 -o root debian/tmp/DEBIAN
install -d -g root -m 755 -o root debian/tmp/usr/doc/$(package)
$(MAKE) install prefix=`pwd`/debian/tmp/usr
#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/lib/X11/app-defaults
cd xditview; $(MAKE) install install.man DESTDIR="../debian/tmp"
ln -fs eqn debian/tmp/usr/bin/geqn
ln -fs tbl debian/tmp/usr/bin/gtbl
ln -fs pic debian/tmp/usr/bin/gpic
#
install -g root -m 644 -o root \
debian/changelog debian/tmp/usr/doc/$(package)/changelog.Debian
cp -p $(DOCUMENTS) debian/tmp/usr/doc/$(package)
chmod 644 `find debian/tmp/usr/doc/$(package) -type f -print`
chmod 755 `find debian/tmp/usr/doc/$(package) -type d -print`
-gzip -r9f debian/tmp/usr/doc/$(package)
# this not gzipped!
install -g root -m 644 -o root \
debian/copyright debian/tmp/usr/doc/$(package)
#
chmod 644 debian/tmp/usr/X11R6/lib/X11/app-defaults/*
chmod 644 debian/tmp/usr/X11*/man/man?/*
-gzip -r9f debian/tmp/usr/man debian/tmp/usr/X11*/man
ln -sf eqn.1.gz debian/tmp/usr/man/man1/neqn.1.gz
mv debian/tmp/usr/man/man7/me.7.gz debian/tmp/usr/man/man7/groff_me.7.gz
mv debian/tmp/usr/man/man7/msafer.7.gz debian/tmp/usr/man/man7/groff_msafer.7.gz
#
install -g root -m 644 -o root debian/control debian/tmp/DEBIAN
install -g root -m 755 -o root debian/postinst debian/tmp/DEBIAN
#
# don't go in the diff
rm -f config.cache config.log
#
dpkg-shlibdeps $(package)/$(package) -dSuggests xditview/gxditview
dpkg-gencontrol
chown -R root.root debian/tmp
chmod -R g-ws debian/tmp
dpkg --build debian/tmp ..
define checkdir
test -f $(package)/$(package).cc -a -f debian/rules
endef
binary: binary-indep binary-arch
checkroot:
$(checkdir)
test root = "`whoami`"
.PHONY: binary binary-arch binary-indep clean checkroot
|