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 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
#! /usr/bin/make -f
############################ -*- Mode: Makefile -*- ###########################
## rules ---
## Author : Robert D. Hilliard <hilliard@debian.org>
## Created On : Tue, 9 Jan 2001 17:16:57 -0500
## Last Modified By : Robert D. Hilliard <hilliard@debian.org>
## Last Modified On : Sun, 9 Dec 2001 17:23:39 -0500
## Update Count :
## Status : $Id: rules,v 1.8 2001/12/09 22:24:05 bob Exp bob $
## HISTORY :
## Description : debian/rules for vera, including dict-vera
## Acknowledgment : This debian/rules file is based on the rules file for
## : dict-foldoc, which is based on Manoj Srivasta's
## : <srivasta@debian.org> debian/rules file for make.
###############################################################################
# FIX VERSION NUMBER IN dpkg-gencontrol and DATE IN dict-vera BUILD
# The name of the package (for example, `emacs').
pkg1 := vera
pkg2 := dict-vera
# Configuration variables (these should be pretty generic)
CC = cc
CFLAGS= -O2
LDFLAGS = -s
PREFIX = /usr
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/man
MAN1DIR = $(MANDIR)/man1
DOCDIR = $(PREFIX)/share/doc/$(pkg)
# Package specific stuff. The idea is to try to make the rules
# generic (gradually).
FILES_TO_CLEAN = debian/files vera.info vera *dict.dz *.index *~ debian/*~
DIRS_TO_CLEAN = debian/tmp*
STAMPS_TO_CLEAN = stamp-build stamp-binary-indep
DICTDIR = debian/tmp_$(pkg2)/usr/share/dictd
install_file= install -p -o root -g root -m 644
install_program= install -p -o root -g root -m 755
make_directory= install -d -o root -g root -m 755
all build: stamp-build
# Builds the binary package.
stamp-build:
# Builds the binary package.
$(checkdir)
makeinfo --no-split vera.texi
touch stamp-build
clean:
# Undoes the effect of `$(MAKE) -f debian/rules build'.
$(checkdir)
-rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN)
-rm -rf $(DIRS_TO_CLEAN)
-rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS
binary: binary-indep binary-arch
binary-indep: build stamp-binary-indep
binary-arch: build stamp-binary-indep
stamp-binary-indep:
# Makes a binary package.
@test root = "`whoami`" || (echo need root priviledges; exit 1)
$(checkdir)
test -f stamp-build || $(MAKE) -f debian/rules build
rm -rf debian/tmp*
$(make_directory) debian/tmp_$(pkg1)
$(make_directory) debian/tmp_$(pkg1)/DEBIAN
$(make_directory) debian/tmp_$(pkg1)/usr
$(make_directory) debian/tmp_$(pkg1)/usr/share
$(make_directory) debian/tmp_$(pkg1)/usr/share/info
$(make_directory) debian/tmp_$(pkg1)/usr/share/doc
$(make_directory) debian/tmp_$(pkg1)/usr/share/doc/$(pkg1)
$(install_file) vera.info debian/tmp_$(pkg1)/usr/share/info
$(install_file) debian/ChangeLog debian/tmp_$(pkg1)/usr/share/doc/$(pkg1)/changelog
$(install_file) debian/changelog\
debian/tmp_$(pkg1)/usr/share/doc/$(pkg1)/changelog.Debian
$(install_file) debian/README \
debian/tmp_$(pkg1)/usr/share/doc/$(pkg1)/README
# $(install_file) debian/$(pkg1)/Debian_supplement \
# debian/tmp_$(pkg1)/usr/share/doc/$(pkg1)/Debian_supplement
gzip -9frq debian/tmp_$(pkg1)/usr/share/
# Make sure the copyright file is not compressed
$(install_file) debian/copyright \
debian/tmp_$(pkg1)/usr/share/doc/$(pkg1)/copyright
$(install_file) debian/GFDL \
debian/tmp_$(pkg1)/usr/share/doc/$(pkg1)/GFDL
$(install_program) debian/$(pkg1)/postinst debian/tmp_$(pkg1)/DEBIAN/postinst
$(install_program) debian/$(pkg1)/prerm debian/tmp_$(pkg1)/DEBIAN/prerm
dpkg-gencontrol -isp -p$(pkg1) -v1.8-4 -Pdebian/tmp_$(pkg1)
chown -R root.root debian/tmp_$(pkg1)
dpkg --build debian/tmp_$(pkg1) ..
$(make_directory) debian/tmp_$(pkg2)
$(make_directory) debian/tmp_$(pkg2)/DEBIAN
$(make_directory) debian/tmp_$(pkg2)/usr
$(make_directory) debian/tmp_$(pkg2)/usr/share
$(make_directory) debian/tmp_$(pkg2)/usr/share/dictd
$(make_directory) debian/tmp_$(pkg2)/usr/share/doc
$(make_directory) debian/tmp_$(pkg2)/usr/share/doc/$(pkg2)
sed -f debian/$(pkg2)/sedfile vera.? >vera1
cat vera. vera1>vera
/usr/bin/dictfmt -f -u ftp.gnu.org/pub/gnu/vera \
-s "V.E.R.A. -- Virtual Entity of Relevant Acronyms December 2001" \
vera <vera
/usr/bin/dictzip vera.dict
$(install_file) vera.dict.dz $(DICTDIR)
$(install_file) vera.index $(DICTDIR)
umask 022; sed -e '$$d' $(DICTDIR)/vera.index >$(DICTDIR)/vera.index2
mv -f $(DICTDIR)/vera.index2 $(DICTDIR)/vera.index
$(install_file) debian/ChangeLog debian/tmp_$(pkg2)/usr/share/doc/$(pkg2)/changelog
$(install_file) debian/changelog \
debian/tmp_$(pkg2)/usr/share/doc/$(pkg2)/changelog.Debian
$(install_file) debian/README \
debian/tmp_$(pkg2)/usr/share/doc/$(pkg2)/README
gzip -9frq debian/tmp_$(pkg2)/usr/share/doc/$(pkg2)/
# Make sure the copyright file is not compressed
$(install_file) debian/copyright \
debian/tmp_$(pkg2)/usr/share/doc/$(pkg2)/copyright
$(install_file) debian/GFDL \
debian/tmp_$(pkg2)/usr/share/doc/$(pkg2)/GFDL
$(install_program) debian/$(pkg2)/postinst debian/tmp_$(pkg2)/DEBIAN/postinst
$(install_program) debian/$(pkg2)/postrm debian/tmp_$(pkg2)/DEBIAN/postrm
$(install_program) debian/$(pkg2)/prerm debian/tmp_$(pkg2)/DEBIAN/prerm
dpkg-gencontrol -isp -p$(pkg2) -v1:1.8-4 -Pdebian/tmp_$(pkg2)
chown -R root.root debian/tmp_$(pkg2)
dpkg --build debian/tmp_$(pkg2) ..
touch stamp-binary-indep
checkroot:
@test root = "`whoami`" || (echo need root priviledges; exit 1)
define checkdir
test -f vera.texi -a -f debian/rules
endef
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
.PHONY: binary binary-arch binary-indep clean
|