File: rules

package info (click to toggle)
krb5 1.4.4-7etch1
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 49,200 kB
  • ctags: 25,837
  • sloc: ansic: 270,278; exp: 21,157; makefile: 10,635; sh: 6,403; yacc: 2,515; perl: 1,925; cpp: 743; awk: 449; python: 379; asm: 248; lex: 190; sed: 172; csh: 147
file content (153 lines) | stat: -rwxr-xr-x 5,080 bytes parent folder | download | duplicates (2)
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#!/usr/bin/make -f
# Based on sample debian/rules that uses debhelper. 
# GNU copyright 1997 by Joey Hess.

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

# This has to be exported to make some magic below work.
export DH_OPTIONS

CCOPTS=-g -DUSE_PTHREAD_LOCK_ONLY_IF_LOADED
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
    CCOPTS += -O0
else
    CCOPTS += -O2
endif

LINTIAN_PACKAGES = krb5-user krb5-kdc libkadm55 libkrb53
DUPLICATE_PACKAGES = krb5-admin-server krb5-clients krb5-ftpd krb5-kdc \
	krb5-rsh-server krb5-telnetd krb5-user libkadm55

# The flags to pass to dh_install specifying the upstream files to exclude.
# We use --fail-missing to be sure we catch any new upstream files, so be
# sure to update this list if upstream adds any more files we don't want.
EXCLUDE = -Xtmac.doc -Xexamples/krb5 -Xgnats/mit -Xkrb5-send-pr \
	-Xsserver -Xsim_server -Xuuserver -Xgss-server \
	-Xsclient -Xsim_client -Xuuclient -Xgss-client

# We touch each configure and Autoconf-related file so that we do not attempt
# to use Autoconf.
configure: configure-stamp
configure-stamp:
	dh_testdir
	-mkdir build
	find src -name configure -print | xargs touch
	find src \( -name \*hin -o -name \*.h.in -o -name \*.stmp \) -print \
		| xargs touch
	cd build && ../src/configure --prefix=/usr --enable-shared  \
		--with-system-et --with-system-ss --enable-fakeka \
		CFLAGS="$(CCOPTS) -D_REENTRANT -DHAVE_VSNPRINTF" --localstatedir=/etc \
		--mandir=/usr/share/man --without-tcl --enable-static
	touch configure-stamp

# Build the info pages in a separate directory, since otherwise we'll
# overwrite the info pages provided upstream and then debian/rules clean won't
# get back to a virgin copy of the package.
build: build-stamp
build-stamp: configure-stamp
	cd build && $(MAKE) all
	-mkdir build/info
	cd build/info && makeinfo ../../doc/admin.texinfo
	cd build/info && makeinfo ../../doc/install.texinfo
	cd build/info && makeinfo ../../doc/user-guide.texinfo
	cd build/info && makeinfo ../../doc/krb425.texinfo
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-rm -r build
	dh_clean build-stamp configure-stamp

install: DH_OPTIONS=
install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	cd build && $(MAKE) install DESTDIR=`pwd`/../debian/tmp

	install -m644 src/util/ac_check_krb5.m4 \
		debian/libkrb5-dev/usr/share/aclocal
	mv debian/tmp/usr/bin/telnet debian/tmp/usr/bin/telnet.krb5
	mv debian/tmp/usr/share/man/man1/telnet.1 \
		debian/tmp/usr/share/man/man1/telnet.krb5.1
	for foo in rlogin rsh ftp rcp ; do \
		mv debian/tmp/usr/bin/$$foo debian/tmp/usr/bin/krb5-$$foo; \
		mv debian/tmp/usr/share/man/man1/$$foo.1 \
			debian/tmp/usr/share/man/man1/krb5-$$foo.1 ; \
	done

	dh_install --sourcedir=debian/tmp --fail-missing $(EXCLUDE)

	docbook-to-man debian/krb5_newrealm.sgml \
		> debian/krb5-admin-server/usr/share/man/man8/krb5_newrealm.8
	install -o root -g root -m 755 debian/krb5_newrealm \
		debian/krb5-admin-server/usr/sbin
	install -o root -g root -m 644 debian/kdc.conf \
		debian/krb5-kdc/usr/share/krb5-kdc/kdc.conf.template
	ln -s /usr/share/krb5-kdc/kdc.conf.template \
		debian/krb5-kdc/usr/share/doc/krb5-kdc/examples/kdc.conf
	for foo in $(LINTIAN_PACKAGES) ; do \
		install -d debian/$$foo/usr/share/lintian/overrides; \
		cp debian/$$foo.lintian \
			debian/$$foo/usr/share/lintian/overrides/$$foo; \
	done
	for foo in $(DUPLICATE_PACKAGES) ; do \
		install -d debian/$$foo/usr/share/lintian/overrides; \
		echo "$$foo: package-has-a-duplicate-relation" \
			>> debian/$$foo/usr/share/lintian/overrides/$$foo; \
	done

# Build architecture-independent files here.
# Pass -i to all debhelper commands in this target to reduce clutter.
binary-indep: DH_OPTIONS=-i
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs  doc/CHANGES
	dh_installdocs
	dh_installinfo
	dh_link
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.  Strip
# libkrb53 and libkadm55 separately and save the debug information for the
# libkrb5-dbg package.  This method strips the libraries in those packages
# twice, but that should be harmless and all other ways of doing this seem
# uglier.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_installdebconf
	dh_installinit -- defaults 18 18
	DH_OPTIONS="" dh_strip -plibkrb53 --dbg-package=libkrb5-dbg
	DH_OPTIONS="" dh_strip -plibkadm55 --dbg-package=libkrb5-dbg
	dh_strip
	dh_link
	dh_compress
	dh_fixperms
	chmod u+s debian/krb5-user/usr/bin/ksu
	chmod 700 debian/krb5-kdc/var/lib/krb5kdc
	chmod 700 debian/krb5-kdc/etc/krb5kdc
	DH_OPTIONS="" dh_makeshlibs -plibkrb53 '-Vlibkrb53 (>= 1.4.2)'
	DH_OPTIONS="" dh_makeshlibs -plibkadm55
	dh_installdeb
	dh_shlibdeps -L libkrb53 -l`pwd`/debian/libkrb53/usr/lib
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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