~ubuntu-branches/ubuntu/gutsy/am-utils/gutsy

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Philippe Troin
  • Date: 2002-03-20 11:15:26 UTC
  • Revision ID: james.westby@ubuntu.com-20020320111526-oe38xawxcylngubl
Tags: 6.0.7-6
* Do not clamp nfs to version 2 udp in /etc/am-utils/amd.conf.
* Amd now closes stdin, stderr, and stdout on startup; closes: #133614.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# Amd rules files, placed under the GNU General Public License.
 
3
# Copyright (C) 2001 Philippe Troin <phil@fifi.org>.
 
4
# Based on:
 
5
#   Sample debian/rules that uses debhelper.
 
6
#   GPL copyright 1997 to 1999 by Joey Hess.
 
7
 
 
8
# Uncomment this to turn on verbose mode. 
 
9
#export DH_VERBOSE=1
 
10
 
 
11
# This is the debhelper compatability version to use.
 
12
export DH_COMPAT=3
 
13
 
 
14
# This has to be exported to make some magic below work.
 
15
export DH_OPTIONS
 
16
 
 
17
DEBCFLAGS:=-O2
 
18
WGET=wget
 
19
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 
20
DEBCFLAGS += -g
 
21
endif
 
22
 
 
23
DEBVERSION:=$(shell head -1 debian/changelog \
 
24
                    | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
 
25
UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/-[0-9.]*$$//')
 
26
 
 
27
build: build-stamp
 
28
build-stamp:
 
29
        dh_testdir
 
30
 
 
31
        ln -sf am-utils.copyright debian/am-utils-doc.copyright
 
32
 
 
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
 
37
        $(MAKE)
 
38
        $(MAKE) -C doc ps
 
39
        mkdir debian/html
 
40
        cd debian/html && texi2html -split_chapter ../../doc/am-utils.texi
 
41
 
 
42
        touch build-stamp
 
43
 
 
44
clean:
 
45
        dh_testdir
 
46
        rm -f build-stamp 
 
47
 
 
48
        -$(MAKE) distclean
 
49
        -rm -fr debian/html
 
50
        -rm -f debian/am-utils-doc.copyright
 
51
 
 
52
        dh_clean
 
53
 
 
54
install: DH_OPTIONS=
 
55
install: build
 
56
        dh_testdir
 
57
        dh_testroot
 
58
        dh_clean -k
 
59
        dh_installdirs
 
60
 
 
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
 
83
 
 
84
        dh_movefiles
 
85
 
 
86
# Arch indep
 
87
binary-indep: binary-am-utils-doc
 
88
 
 
89
# Doc package
 
90
binary-am-utils-doc: DH_OPTIONS=-pam-utils-doc
 
91
binary-am-utils-doc: build install
 
92
        dh_testdir
 
93
        dh_testroot
 
94
        dh_installdocs
 
95
        dh_installchangelogs
 
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/
 
100
        dh_installinfo
 
101
        dh_compress
 
102
        dh_fixperms
 
103
        dh_installdeb
 
104
        dh_gencontrol
 
105
        dh_md5sums
 
106
        dh_builddeb
 
107
 
 
108
# Arch-specific
 
109
binary-arch: binary-am-utils binary-am-utils-dev
 
110
 
 
111
# am-utils
 
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.
 
115
        dh_testdir
 
116
        dh_testroot
 
117
        dh_installdebconf
 
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
 
131
        dh_installinit -n
 
132
        dh_undocumented
 
133
        dh_installchangelogs ChangeLog
 
134
        dh_strip
 
135
        dh_link
 
136
        dh_compress
 
137
        dh_fixperms
 
138
        dh_makeshlibs
 
139
        dh_installdeb
 
140
        dh_perl
 
141
        dh_shlibdeps
 
142
        dh_gencontrol
 
143
        dh_md5sums
 
144
        dh_builddeb
 
145
 
 
146
# am-utils-dev
 
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.
 
150
        dh_testdir
 
151
        dh_testroot
 
152
        dh_link
 
153
        dh_installdocs
 
154
        dh_strip
 
155
        dh_compress
 
156
        dh_fixperms
 
157
        dh_installdeb
 
158
        dh_gencontrol
 
159
        dh_md5sums
 
160
        dh_builddeb
 
161
 
 
162
binary: binary-indep binary-arch
 
163
        test "$$(find debian/tmp ! -type d)" = ""
 
164
 
 
165
 
 
166
print-version:
 
167
        @echo "Debian version:          $(DEBVERSION)"
 
168
        @echo "Upstream version:        $(UPVERSION)"
 
169
 
 
170
get-orig-source:
 
171
        $(WGET) -O am-utils_$(UPVERSION).orig.tar.gz \
 
172
          ftp://ftp.am-utils.org/pub/am-utils/am-utils-$(UPVERSION).tar.gz
 
173
 
 
174
.PHONY: build clean binary-indep binary-arch binary install binary-am-utils \
 
175
        binary-am-utils-dev print-version get-orig-source