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 156 157 158 159 160 161 162 163 164 165 166 167
|
#! /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, 25 Jun 2006 15:26:28 -0400
## Last Changes : $Log: rules,v $
## Last Changes : Revision 1.16 2006/06/25 19:30:25 bob
## Last Changes : Added date and version number for 1.17
## Last Changes : Cleaned up some obsolete commented out commands
## Last Changes :
## Last Changes : Revision 1.15 2005/04/27 20:43:08 bob
## Last Changes : Added date and version number for 1.15
## Last Changes :
## Last Changes : Revision 1.14 2004/01/11 19:53:34 bob
## Last Changes : Changed version and date for 1.12
## Last Changes : added sedcommand to fix header formatting
## Last Changes :
## Status : $Id: rules,v 1.16 2006/06/25 19:30:25 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.
###############################################################################
# The name of the package (for example, `emacs').
pkg1 := vera
pkg2 := dict-vera
pkg-ver := 1.17-1
pkg-dte := June 2006
# 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) -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
sed '1,2!s/^/ /' vera. > vera
cat vera1>>vera
/usr/bin/dictfmt -f -u http://home.snafu.de/ohei \
-s "V.E.R.A. -- Virtual Entity of Relevant Acronyms ($(pkg-dte))" \
vera <vera
/usr/bin/dictzip -v vera.dict
rm -f vera1 vera.tmp vera
$(install_file) vera.dict.dz $(DICTDIR)
$(install_file) vera.index $(DICTDIR)
$(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/$(pkg2)/changelog \
debian/tmp_$(pkg2)/usr/share/doc/$(pkg2)/dict-vera.changelog-old.gz
$(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
dpkg-gencontrol -isp -p$(pkg2) -v1:$(pkg-ver) -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
|