2
# Amd rules files, placed under the GNU General Public License.
3
# Copyright (C) 2001 Philippe Troin <phil@fifi.org>.
5
# Sample debian/rules that uses debhelper.
6
# GPL copyright 1997 to 1999 by Joey Hess.
8
# Uncomment this to turn on verbose mode.
11
# This is the debhelper compatability version to use.
14
# This has to be exported to make some magic below work.
19
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
23
DEBVERSION:=$(shell head -1 debian/changelog \
24
| sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
25
UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/-[0-9.]*$$//')
31
ln -sf am-utils.copyright debian/am-utils-doc.copyright
33
touch config.h.in stamp-h.in stamp-h config.h configure.in aclocal.m4 configure config.status config.h.in $$(find . -name Makefile.in)
34
touch doc/*.info doc/stamp-vti doc/version.texi
35
CFLAGS="$(DEBCFLAGS)" ./configure --prefix=/usr --enable-shared \
36
--without-ldap --without-hesiod
40
cd debian/html && texi2html -split_chapter ../../doc/am-utils.texi
50
-rm -f debian/am-utils-doc.copyright
61
$(MAKE) prefix=`pwd`/debian/tmp/usr install
62
install -d debian/tmp/usr/share
63
mv debian/tmp/usr/man debian/tmp/usr/share/man
64
mv debian/tmp/usr/info debian/tmp/usr/share/info
65
rm -fr debian/tmp/usr/etc
66
install -d debian/tmp/etc/am-utils
67
cp debian/amd.conf debian/tmp/etc/am-utils/amd.conf
68
rm debian/tmp/usr/sbin/lostaltmail
69
rm debian/tmp/usr/bin/expn
70
rm debian/tmp/usr/share/man/man1/expn.1
71
rm debian/tmp/usr/share/man/man8/automount2amd.8
72
rm debian/tmp/usr/sbin/mk-amd-map
73
rm debian/tmp/usr/sbin/am-eject
74
rm debian/tmp/usr/share/man/man8/mk-amd-map.8
75
rm debian/tmp/usr/sbin/ctl-* debian/tmp/usr/sbin/wait* \
76
debian/tmp/usr/sbin/fix-amd-map \
77
debian/tmp/usr/sbin/fixrmtab
78
install -d debian/tmp/usr/include/amd
79
cp include/*.h debian/tmp/usr/include/amd
80
mv debian/tmp/usr/sbin/fsinfo debian/tmp/usr/sbin/amd-fsinfo
81
mv debian/tmp/usr/share/man/man8/fsinfo.8 \
82
debian/tmp/usr/share/man/man8/amd-fsinfo.8
87
binary-indep: binary-am-utils-doc
90
binary-am-utils-doc: DH_OPTIONS=-pam-utils-doc
91
binary-am-utils-doc: build install
96
install -d debian/am-utils-doc/usr/share/doc/am-utils/html
97
cp debian/html/*.html debian/am-utils-doc/usr/share/doc/am-utils/html/
98
cp doc/am-utils.texi debian/am-utils-doc/usr/share/doc/am-utils/
99
cp doc/am-utils.ps debian/am-utils-doc/usr/share/doc/am-utils/
109
binary-arch: binary-am-utils binary-am-utils-dev
112
binary-am-utils: DH_OPTIONS=-pam-utils
113
binary-am-utils: build install
114
# Need this version of debhelper for DH_OPTIONS to work.
118
dh_installdocs debian/cookbook.txt
119
install -d debian/am-utils/usr/share/doc/am-utils/examples
120
mv debian/am-utils/usr/sbin/amd2* \
121
debian/am-utils/usr/share/doc/am-utils/examples
122
mv debian/am-utils/usr/sbin/automount2amd \
123
debian/am-utils/usr/share/doc/am-utils/examples
124
cp debian/a_master debian/am-utils/usr/share/doc/am-utils/examples
125
dh_link usr/share/am-utils/amd.net usr/share/doc/am-utils/examples/a_net
126
install -d debian/am-utils/usr/share/doc/am-utils/kernel-patches
127
cp debian/*.diff debian/am-utils/usr/share/doc/am-utils/kernel-patches
128
gzip -v9 debian/am-utils/usr/share/doc/am-utils/kernel-patches/*
129
install -d debian/am-utils/usr/share/am-utils
130
cp debian/a_net debian/am-utils/usr/share/am-utils/amd.net
133
dh_installchangelogs ChangeLog
147
binary-am-utils-dev: DH_OPTIONS=-pam-utils-dev
148
binary-am-utils-dev: build install
149
# Need this version of debhelper for DH_OPTIONS to work.
162
binary: binary-indep binary-arch
163
test "$$(find debian/tmp ! -type d)" = ""
167
@echo "Debian version: $(DEBVERSION)"
168
@echo "Upstream version: $(UPVERSION)"
171
$(WGET) -O am-utils_$(UPVERSION).orig.tar.gz \
172
ftp://ftp.am-utils.org/pub/am-utils/am-utils-$(UPVERSION).tar.gz
174
.PHONY: build clean binary-indep binary-arch binary install binary-am-utils \
175
binary-am-utils-dev print-version get-orig-source