File: rules

package info (click to toggle)
addressbook 0.7-13
  • links: PTS
  • area: main
  • in suites: potato
  • size: 960 kB
  • ctags: 160
  • sloc: tcl: 6,002; perl: 528; ansic: 362; awk: 205; sh: 123; makefile: 95
file content (121 lines) | stat: -rwxr-xr-x 4,141 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
#!/usr/bin/make -f
#  Rules for addressbook
#
# I have shamelessly cribbed ideas from Joey Hess and Manoj Srivastava
#      GNU copyright 1997 by Joey Hess.
#
# Some bytes in this file may have been touched by Ian Jackson,
# so I can never remove his name from this file.  Oh boy.

package		:= addressbook
FILES_TO_CLEAN	:= tmp/addressbook.xxxx
FILES_TO_VERYCLEAN	= tmp/address*

# directory abstraction
PREFIX		:= debian/tmp
bindir		:= $(PREFIX)/usr/bin
confdir		:= $(PREFIX)/etc/$(package)
libdir		:= $(PREFIX)/usr/share/$(package)
docdir		:= $(PREFIX)/usr/share/doc/$(package)
docbasedir	:= $(PREFIX)/usr/share/doc-base
mandir		:= $(PREFIX)/usr/share/man

install_file	:= install -o root -g root -m 644 -p
install_program	:= install -o root -g root -m 755 -p
make_dir	:= install -d -o root -g root -m 755

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1


build: tmp/addressbook
tmp/addressbook:	install.wish bin/addressbook bin/address.perl lib/addressbook.config
	dh_testdir
	@echo
	@echo " ************* WARNING *************"
	@echo
	@echo "Unfortunately, we can't automate the process by which tmp/addressbook"
	@echo "is configured by the install.wish script.  In order to build this"
	@echo "package you have to run \`./install_addressbook'.  When prompted, say"
	@echo "\`Yes, use old values'.  Accept the values set unless you know what"
	@echo "you're doing---press \`continue' twice.  When the installer tells you"
	@echo "that \`Addressbook is now configured', press \`Cancel'.  Note that"
	@echo "configuration is driven by the file \`tmp/last_config'."
	exit 1

clean:
	dh_testdir
	dh_testroot
	rm -f $(FILES_TO_CLEAN)
	dh_clean

# I have this rule because it's a pain to recreate these files, and
# I think they should be part of the diff
veryclean:	clean
	rm -f $(FILES_TO_VERYCLEAN)

# Build architecture-independent files here.
binary-indep: build
	dh_testversion
	dh_testdir
	dh_testroot
	dh_clean
	$(make_dir) $(bindir) $(libdir)/bitmaps		\
		$(libdir)/contrib $(libdir)/sample	\
		$(docbasedir) $(confdir)

	$(install_program) tmp/addressbook tmp/address $(bindir)
	$(install_file) tmp/addressbook.config $(confdir)
	@# note I'm ignoring lib/addresses_usa.dat* since they're already
	@#   in samples/
	$(install_file) lib/addresses.dat* $(confdir)/
	$(install_file) lib/bitmaps/* $(libdir)/bitmaps/
	$(install_file) lib/countries $(libdir)/
	$(install_file) lib/*.translation lib/*.helptext $(libdir)/
	$(install_file) `find contrib/ -type f -maxdepth 1`		\
		$(libdir)/contrib/
	$(install_program) contrib/birthday contrib/conv		\
		$(libdir)/contrib/
	$(make_dir) $(libdir)/contrib/mktable-1.0
	$(install_file) `find contrib/mktable-1.0/ -type f -maxdepth 1`	\
		$(libdir)/contrib/mktable-1.0/
	$(make_dir) $(libdir)/contrib/mktable-1.0/examples
	$(install_file) `find contrib/mktable-1.0/examples -type f	\
		-maxdepth 1` $(libdir)/contrib/mktable-1.0/examples

	dh_installdocs *.html REGISTRATION \
		TODO addressbook-0.7.lsm
	# these links are needed to allow the menubar items to work
	ln -s ../doc/$(package)/manual.html $(libdir)/MANUAL
	ln -s ../doc/$(package)/REGISTRATION $(libdir)/REGISTRATION
	ln -s ../../$(package)/contrib $(docdir)/contrib
	ln -s ../../$(package)/sample $(docdir)/examples
	$(install_file) sample/*.dat sample/*.fmt $(docdir)/examples
	dh_installmenu
	dh_installmanpages
	# make links to bins and man pages
	set -e							;\
	  for file in bin/addr-fax bin/addr-letter bin/addr-tel	\
		bin/addr-birthday bin/addr-email; do		\
		ln -s address $(PREFIX)/usr/$$file		;\
		fbase=`basename $$file`				;\
		ln -s address.1.gz $(mandir)/man1/$$fbase.1.gz	;\
	  done
	dh_installchangelogs changes.html
	$(install_file) debian/doc-base  $(docbasedir)/addressbook
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build
# We have nothing to do by default.

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary