File: rules

package info (click to toggle)
dict-gcide 0.44-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 59,496 kB
  • ctags: 2,052
  • sloc: asm: 53,717; fortran: 20,888; ansic: 8,030; sh: 1,441; lex: 1,342; makefile: 494; yacc: 443; perl: 235
file content (130 lines) | stat: -rwxr-xr-x 4,485 bytes parent folder | download
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
#! /usr/bin/make -f

############################ -*- Mode: Makefile -*- ###########################
## rules ---
## Author           : Robert D. Hilliard <hilliard@@debian.org>
## Created On       : Sun, 19 Apr 1998 23:33:01 -0400
## Last Modified By : Robert D. Hilliard <hilliard@@debian.org>
## Last Modified On : Tue, 12 Mar 2002 15:26:03 -0500
## Update Count     : 
## Status           : $Id: rules,v 0.13 2002/03/12 20:26:14 bob Exp bob $
## HISTORY          :
## Description      : debian/rules for dict-gcide
## Acknowledgment   : This debian/rules file is based on Manoj Srivasta's 
##                  : <srivasta@@debian.org> sample debian/rules files.
##                  : Any errors belong to me alone.
###############################################################################

# The name of the package (for example, `emacs').
pkg1   := dict-gcide
pkg2   := dict-web1913

# 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)/doc/$(pkg)

#  Package specific stuff.  The idea is to try to make the rules
#  generic (gradually).

FILES_TO_CLEAN  = debian/files debian/*~ *~ *.dict* *.index
DIRS_TO_CLEAN   = debian/$(pkg1) debian/$(pkg2) 
STAMPS_TO_CLEAN = stamp-configure stamp-build stamp-binary-indep
DICTDIR = debian/$(pkg1)/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.

configure: stamp-configure

stamp-configure:
	./configure --verbose --prefix=$(PREFIX) && touch stamp-configure


stamp-build:
# Builds the binary package.
	$(checkdir)
	-test -f stamp-configure || $(MAKE) -f debian/rules configure
	$(MAKE) CC="$(CC)" LDFLAGS="$(LDFLAGS)"
	$(MAKE) db
	touch stamp-build

clean:
# Undoes the effect of `$(MAKE) -f debian/rules build'.
	$(checkdir)
	-test -f Makefile && $(MAKE) distclean       
	-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 privileges; exit 1)
	$(checkdir)
	test -f stamp-build  || $(MAKE) -f debian/rules build
	rm -rf               debian/$(pkg1) debian/tmp.deb
	$(make_directory)    debian/$(pkg1)/DEBIAN
	$(make_directory)    debian/$(pkg1)/usr/share/dictd
	$(make_directory)    debian/$(pkg1)/usr/share/doc/$(pkg1)
	$(MAKE)              install dictdir=$(DICTDIR)
	$(install_program)   debian/postinst debian/$(pkg1)/DEBIAN/
	$(install_program)   debian/prerm debian/$(pkg1)/DEBIAN/
	$(install_program)   debian/postrm debian/$(pkg1)/DEBIAN/
	$(install_file)      ChangeLog \
			       debian/$(pkg1)/usr/share/doc/$(pkg1)/changelog
	$(install_file)      debian/changelog \
			       debian/$(pkg1)/usr/share/doc/$(pkg1)/changelog.Debian
	$(install_file)      cide/README.dic \
			       debian/$(pkg1)/usr/share/doc/$(pkg1)/README.dictionary
	gzip -9frq           debian/$(pkg1)/usr/share/doc/$(pkg1)/
# Make sure the copyright file is not compressed
	$(install_file)      debian/copyright \
	                     debian/$(pkg1)/usr/share/doc/$(pkg1)/copyright
	dpkg-gencontrol      -isp -p$(pkg1) -Pdebian/$(pkg1)
	chown -R root.root   debian/$(pkg1)
	dpkg --build         debian/$(pkg1) ..

	$(make_directory)    debian/$(pkg2)/DEBIAN
	$(install_program)   debian/postinst.web debian/$(pkg2)/DEBIAN/postinst
	$(install_program)   debian/postrm.web debian/$(pkg2)/DEBIAN/postrm
	$(install_program)   debian/config debian/$(pkg2)/DEBIAN/
	$(install_file)      debian/templates debian/$(pkg2)/DEBIAN/

	dpkg-gencontrol      -isp -p$(pkg2) -v1.4-0.47pd-5 -Pdebian/$(pkg2) 
	chown -R root.root   debian/$(pkg2)
	dpkg --build         debian/$(pkg2) ..

	touch                stamp-binary-indep


checkroot:
	@@test root = "`whoami`" || (echo need root priviledges; exit 1)

define checkdir
	test -f  webfmt.c -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