File: rules

package info (click to toggle)
libapache2-mod-auth-plain 2.0.48-4-2.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 104 kB
  • ctags: 28
  • sloc: ansic: 230; sh: 45; makefile: 12
file content (209 lines) | stat: -rwxr-xr-x 8,752 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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
#!/usr/bin/make -f
# Generated automatically from debian/packages
# by yada v0.30, of Fri,  6 Aug 2004

DEB_HOST_ARCH        := $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_GNU_CPU     := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
DEB_HOST_GNU_TYPE    := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_HOST_GNU_SYSTEM  := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM)

DEB_BUILD_ARCH       := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_BUILD_GNU_CPU    := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
DEB_BUILD_GNU_TYPE   := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_BUILD_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)

VERSION:=$(shell LC_ALL=C dpkg-parsechangelog | sed -ne 's/^Version: *\([^2]*\)/\1/p')

SHELL=/bin/bash

.PHONY: default
default:
	@echo "Specify a target:"; \
	echo " build              compile the package"; \
	echo " build-arch         compile the architecture-dependent package"; \
	echo " build-indep        compile the architecture-independent package"; \
	echo " binary             make all binary packages"; \
	echo " binary-arch        make all architecture-dependent binary packages"; \
	echo " binary-indep       make all architecture-independent binary packages"; \
	echo " clean              clean up the source package"; \
	echo; \
	echo " clean-install-tree clean up only under debian/"; \
	echo

# Build the package and prepare the install tree

.PHONY: build-only build
build-only: debian/build-stamp
build: build-only

.PHONY: build-arch-only build-arch
build-arch-only: debian/build-arch-stamp
build-arch: build-arch-only

.PHONY: build-indep-only build-indep
build-indep-only: debian/build-indep-stamp
build-indep: build-indep-only

# Make sure these rules and the control file are up-to-date

.PHONY: rules control templates
rules: debian/rules
debian/rules: $(shell which yada) debian/packages-tmp
	yada rebuild rules

control: debian/control
debian/control: $(shell which yada) debian/packages-tmp
	yada rebuild control

templates: debian/templates
debian/templates: $(shell which yada) debian/packages-tmp
	yada rebuild templates

debian/build-stamp: debian/build-arch-stamp debian/build-indep-stamp
	@[ -f $(shell which yada) -a -f debian/rules ]
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export SOURCE="libapache2-mod-auth-plain" \
	  && export VERSION="$(VERSION)" \
	  && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
	  && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
	  && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
	  && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
	  && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
	  && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'CC=$${CC:-gcc}';\
	echo -E 'CFLAGS=$${CFLAGS:--g -Wall}';\
	echo -E 'APXS=$${APXS:-apxs2}';\
	echo -E 'if [ "$${DEB_BUILD_OPTIONS#*noopt}" != "$$DEB_BUILD_OPTIONS" ]; then';\
	echo -E '     CFLAGS="$$CFLAGS -O0"';\
	echo -E 'else';\
	echo -E '     CFLAGS="$$CFLAGS -O2"';\
	echo -E 'fi';\
	echo -E 'make mod_auth_plain.la CC="$$CC" CFLAGS="$$CFLAGS" APXS="$$APXS" LIBS=""') | /bin/sh
	touch debian/build-stamp

debian/build-arch-stamp:
	@[ -f $(shell which yada) -a -f debian/rules ]
	touch debian/build-arch-stamp

debian/build-indep-stamp:
	@[ -f $(shell which yada) -a -f debian/rules ]
	touch debian/build-indep-stamp

.PHONY: install-tree
install-tree: install-tree-any
install-tree-any: \
	debian/tmp-libapache2-mod-auth-plain/DEBIAN/control

debian/tmp-libapache2-mod-auth-plain/DEBIAN/control: debian/build-stamp debian/control
	rm -rf debian/tmp-libapache2-mod-auth-plain
	umask 022 && install -d debian/tmp-libapache2-mod-auth-plain/DEBIAN
	install -d debian/tmp-libapache2-mod-auth-plain/usr/share/doc/libapache2-mod-auth-plain
	umask 022; yada generate copyright \
	  > debian/tmp-libapache2-mod-auth-plain/usr/share/doc/libapache2-mod-auth-plain/copyright
	install -m 644 -p debian/changelog \
	  debian/tmp-libapache2-mod-auth-plain/usr/share/doc/libapache2-mod-auth-plain/changelog
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export ROOT="$$(pwd)/debian/tmp-libapache2-mod-auth-plain" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export CONTROL="$$(pwd)/debian/tmp-libapache2-mod-auth-plain/DEBIAN" \
	  && export PACKAGE="libapache2-mod-auth-plain" \
	  && export SOURCE="libapache2-mod-auth-plain" \
	  && export VERSION="$(VERSION)" \
	  && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
	  && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
	  && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
	  && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
	  && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
	  && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'yada install -lib -into /usr/lib/apache2/modules .libs/mod_auth_plain.so';\
	echo -E 'yada install -conf -into /etc/apache2/mods-available debian/conf/auth_plain.load';\
	echo -E 'yada install -doc -subdir examples -as .htaccess example.htaccess';\
	echo -E 'yada install -doc -subdir examples -as .htpasswd example.htpasswd';\
	echo -E 'yada install -doc README';\
	echo -E 'yada install -doc -as README.Debian debian/README') | /bin/sh
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export ROOT="$$(pwd)/debian/tmp-libapache2-mod-auth-plain" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export CONTROL="$$(pwd)/debian/tmp-libapache2-mod-auth-plain/DEBIAN" \
	  && export PACKAGE="libapache2-mod-auth-plain" \
	  && export SOURCE="libapache2-mod-auth-plain" \
	  && export VERSION="$(VERSION)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'yada perl';\
	echo -E 'yada python';\
	echo -E 'yada strip';\
	echo -E 'yada shlibdeps') | /bin/sh
	yada compress libapache2-mod-auth-plain
	yada generate maintscripts libapache2-mod-auth-plain
	find debian/tmp-libapache2-mod-auth-plain -type f -print \
	  | sed -n 's/^debian\/tmp-libapache2-mod-auth-plain\(\/etc\/.*\)$$/\1/p' \
	  > debian/tmp-libapache2-mod-auth-plain/DEBIAN/conffiles
	if test ! -s debian/tmp-libapache2-mod-auth-plain/DEBIAN/conffiles; then rm -f debian/tmp-libapache2-mod-auth-plain/DEBIAN/conffiles; fi
	yada rebuild control
	yada generate substvars libapache2-mod-auth-plain
	umask 022 && dpkg-gencontrol -isp -plibapache2-mod-auth-plain -Pdebian/tmp-libapache2-mod-auth-plain

# Build package files

.PHONY: binary binary-arch binary-indep
binary: binary-arch binary-indep
binary-arch: binary-arch-any

.PHONY: binary-arch-any
binary-arch-any: \
	binary-package-libapache2-mod-auth-plain
binary-indep:

.PHONY: binary-package-libapache2-mod-auth-plain
binary-package-libapache2-mod-auth-plain: check-root debian/tmp-libapache2-mod-auth-plain/DEBIAN/control
	@[ -f $(shell which yada) -a -f debian/rules ]
	chown -R 0.0 debian/tmp-libapache2-mod-auth-plain
	chmod -R u=rwX,go=rX debian/tmp-libapache2-mod-auth-plain
	@if [ -d debian/tmp-libapache2-mod-auth-plain/usr/doc/libapache2-mod-auth-plain ]; then \
	  echo "*** Yada warning: /usr/doc/libapache2-mod-auth-plain should be /usr/share/doc/libapache2-mod-auth-plain";\
	fi
	dpkg-deb --build debian/tmp-libapache2-mod-auth-plain ..

.PHONY: check-root
check-root:
	@[ `id -u` = 0 ] || (echo "You must be root to do this!"; false)

debian/packages-tmp: debian/packages 
	yada rebuild packages

## Clean up afterwards

.PHONY: clean clean-install-tree clean-build

clean: clean-install-tree clean-build debian/control debian/rules
	rm -f debian/packages-tmp debian/packages-tmp-new debian/packages-tmp-include

clean-build:
	@[ -f $(shell which yada) -a -f debian/rules ]
	rm -f debian/build-stamp debian/build-arch-stamp debian/build-indep-stamp
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export SOURCE="libapache2-mod-auth-plain" \
	  && export VERSION="$(VERSION)" \
	  && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \
	  && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \
	  && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \
	  && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \
	  && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \
	  && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\
	echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\
	echo -E 'make clean || true') | /bin/sh
	yada unpatch
	rm -rf debian/tmp

clean-install-tree: debian/rules
	@[ -f $(shell which yada) -a -f debian/rules ]
	rm -f debian/install-tree-stamp
	rm -rf debian/tmp-* debian/files* debian/substvars debian/shlibs.local debian/ucf