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
|
#!/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 := usr/bin
absbindir := $(PREFIX)/$(bindir)
confdir := etc/$(package)
absconfdir := $(PREFIX)/$(confdir)
libdir := usr/lib/$(package)
abslibdir := $(PREFIX)/$(libdir)
docdir := usr/doc/$(package)
absdocdir := $(PREFIX)/$(docdir)
docbasedir := usr/share/doc-base
absdocbasedir := $(PREFIX)/$(docbasedir)
install_file = install -o root -g root -m 644 --preserve-timestamps
install_program = install -o root -g root -m 755 --preserve-timestamps
# 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
dh_installdirs $(bindir) $(libdir)/bitmaps \
$(libdir)/contrib \
$(libdir)/sample \
$(docbasedir) \
$(confdir)
$(install_program) tmp/addressbook tmp/address $(absbindir)
$(install_file) tmp/addressbook.config $(absconfdir)
@# note I'm ignoring lib/addresses_usa.dat* since their already
@# in samples/
$(install_file) lib/addresses.dat* $(absconfdir)/
$(install_file) lib/bitmaps/* $(abslibdir)/bitmaps/
$(install_file) lib/countries $(abslibdir)
$(install_file) lib/*.translation lib/*.helptext $(abslibdir)/
$(install_file) `find contrib/ -type f -maxdepth 1` \
$(abslibdir)/contrib/
$(install_program) contrib/birthday contrib/conv \
$(abslibdir)/contrib/
dh_installdirs $(libdir)/contrib/mktable-1.0
$(install_file) `find contrib/mktable-1.0/ -type f -maxdepth 1` \
$(abslibdir)/contrib/mktable-1.0/
dh_installdirs $(libdir)/contrib/mktable-1.0/examples
$(install_file) `find contrib/mktable-1.0/examples -type f \
-maxdepth 1` $(abslibdir)/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/addressbook/manual.html $(abslibdir)/MANUAL
ln -s ../../doc/addressbook/REGISTRATION $(abslibdir)/REGISTRATION
ln -s ../../lib/addressbook/contrib $(absdocdir)/contrib
ln -s ../../lib/addressbook/sample $(absdocdir)/examples
dh_installexamples sample/*.dat sample/*.fmt
dh_installmenu
# dh_installinit # no init script
# dh_installcron # no cron
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 $(PREFIX)/usr/man/man1/$$fbase.1.gz ;\
done
dh_installchangelogs changes.html
$(install_file) debian/doc-base $(absdocbasedir)/addressbook
# dh_movefiles # single package
# dh_strip # nothing strippable
dh_compress
dh_fixperms
# dh_suidregister # no suids
dh_installdeb
# dh_shlibdeps # no shlibs
dh_gencontrol
# dh_makeshlibs # no shlibs
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
|