File: rules

package info (click to toggle)
phpmyadmin 4%3A2.9.1.1-3
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 13,224 kB
  • ctags: 119,177
  • sloc: php: 148,860; sh: 636; sql: 224; perl: 142
file content (246 lines) | stat: -rwxr-xr-x 10,109 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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
#!/usr/bin/make -f
# Generated automatically from debian/packages
# by yada v0.52, of Fri,  8 Dec 2006

DEB_HOST_ARCH        := $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
DEB_HOST_ARCH_OS     := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)
DEB_HOST_ARCH_CPU    := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
DEB_HOST_GNU_CPU     := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU 2>/dev/null)
DEB_HOST_GNU_TYPE    := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE 2>/dev/null)
DEB_HOST_GNU_SYSTEM  := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM 2>/dev/null)

DEB_BUILD_ARCH       := $(shell dpkg-architecture -qDEB_BUILD_ARCH 2>/dev/null)
DEB_BUILD_ARCH_OS    := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS 2>/dev/null)
DEB_BUILD_ARCH_CPU   := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null)
DEB_BUILD_GNU_CPU    := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU 2>/dev/null)
DEB_BUILD_GNU_TYPE   := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE 2>/dev/null)
DEB_BUILD_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM 2>/dev/null)

# Take account of old dpkg-architecture output.
ifeq ($(DEB_HOST_ARCH_CPU),)
  DEB_HOST_ARCH_CPU := $(DEB_HOST_GNU_CPU))
  ifeq ($(DEB_HOST_ARCH_CPU),i486)
    DEB_HOST_ARCH_OS := i386
  else
  ifeq ($(DEB_HOST_ARCH_CPU),x86_64)
    DEB_HOST_ARCH_OS := amd64
  endif
  endif
endif
ifeq ($(DEB_HOST_ARCH_OS),)
  DEB_HOST_ARCH_OS := $(subst -gnu,,$(DEB_HOST_GNU_SYSTEM))
  ifeq ($(DEB_HOST_ARCH_OS),gnu)
    DEB_HOST_ARCH_OS := hurd
  endif
endif
ifeq ($(DEB_BUILD_ARCH_CPU),)
  DEB_BUILD_ARCH_CPU := $(DEB_BUILD_GNU_CPU))
  ifeq ($(DEB_BUILD_ARCH_CPU),i486)
    DEB_BUILD_ARCH_OS := i386
  else
  ifeq ($(DEB_BUILD_ARCH_CPU),x86_64)
    DEB_BUILD_ARCH_OS := amd64
  endif
  endif
endif
ifeq ($(DEB_BUILD_ARCH_OS),)
  DEB_BUILD_ARCH_OS := $(subst -gnu,,$(DEB_BUILD_GNU_SYSTEM))
  ifeq ($(DEB_BUILD_ARCH_OS),gnu)
    DEB_BUILD_ARCH_OS := hurd
  endif
endif

LEFT_PARENTHESIS:=(
VERSION:=$(shell head -n1 debian/changelog | sed -e "s/^[0-9a-zA-Z.-]* $(LEFT_PARENTHESIS)//" -e "s/[^0-9a-zA-Z.:+~-].*//")

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/po/POTFILES.in
debian/templates: $(shell which yada) debian/packages-tmp
	yada rebuild templates
debian/po/POTFILES.in: $(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 ]
	yada patch "debian/patches/*.patch"
	touch debian/build-stamp

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

debian/build-indep-stamp: debian/build-arch-stamp
	@[ -f $(shell which yada) -a -f debian/rules ]
	yada patch "debian/patches/*.patch"
	touch debian/build-indep-stamp

.PHONY: install-tree
install-tree: install-tree-any
install-tree-any: \
	debian/tmp-phpmyadmin/DEBIAN/control

debian/tmp-phpmyadmin/DEBIAN/control: debian/build-indep-stamp debian/control
	rm -rf debian/tmp-phpmyadmin
	umask 022 && install -d debian/tmp-phpmyadmin/DEBIAN
	install -d debian/tmp-phpmyadmin/usr/share/doc/phpmyadmin
	umask 022; yada generate copyright \
	  > debian/tmp-phpmyadmin/usr/share/doc/phpmyadmin/copyright
	install -m 644 -p debian/changelog \
	  debian/tmp-phpmyadmin/usr/share/doc/phpmyadmin/changelog.Debian
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export ROOT="$$(pwd)/debian/tmp-phpmyadmin" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export CONTROL="$$(pwd)/debian/tmp-phpmyadmin/DEBIAN" \
	  && export PACKAGE="phpmyadmin" \
	  && export SOURCE="phpmyadmin" \
	  && 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 -data -into /usr/share/phpmyadmin *.php *.css';\
	echo -E 'yada install -data -into /usr/share/phpmyadmin/scripts scripts/setup.php';\
	echo -E 'yada copy -data -into /usr/share/phpmyadmin css js lang libraries themes';\
	echo -E 'yada remove -data -into /usr/share/phpmyadmin/lang *.sh';\
	echo -E 'yada remove -data -into /usr/share/phpmyadmin/libraries/fpdf README';\
	echo -E 'yada remove -data -into /usr/share/phpmyadmin/libraries/transformations *.sh README TEMPLATE*';\
	echo -E 'yada install -data -into /usr/share/phpmyadmin Documentation.html translators.html';\
	echo -E 'yada install -data -into /usr/share/phpmyadmin ChangeLog INSTALL README';\
	echo -E 'yada install -dir /var/lib/phpmyadmin';\
	echo -E 'yada symlink -data -into /usr/share/phpmyadmin/config /var/lib/phpmyadmin/config.inc.php';\
	echo -E 'yada install -dir /etc/phpmyadmin';\
	echo -E 'yada install -conf -ucf -subdir phpmyadmin debian/conf/config.inc.php';\
	echo -E 'yada install -conf -ucf -subdir phpmyadmin debian/conf/config.header.inc.php';\
	echo -E 'yada install -conf -ucf -subdir phpmyadmin debian/conf/config.footer.inc.php';\
	echo -E 'yada install -conf -ucf -subdir phpmyadmin debian/conf/htaccess';\
	echo -E 'yada install -conf -ucf -subdir phpmyadmin debian/conf/apache.conf';\
	echo -E 'yada symlink -into /usr/share/phpmyadmin -as .htaccess /etc/phpmyadmin/htaccess';\
	echo -E 'yada install -into /usr/share/phpmyadmin debian/src/config.inc.php';\
	echo -E 'yada install -into /usr/share/phpmyadmin debian/src/config.header.inc.php';\
	echo -E 'yada install -into /usr/share/phpmyadmin debian/src/config.footer.inc.php';\
	echo -E 'yada install -dir /var/www';\
	echo -E '';\
	echo -E 'perl -pi -e "s/'\''([0-9a-z.]+)'\''/'\''\$$1-Debian-$${VERSION##*-}'\''/ if /set..PMA_VERSION/" $$ROOT/usr/share/phpmyadmin/libraries/Config.class.php';\
	echo -E '';\
	echo -E 'yada install -doc README TODO CREDITS';\
	echo -E 'yada install -doc Documentation.html translators.html';\
	echo -E 'yada install -doc -as changelog ChangeLog';\
	echo -E 'yada install -doc -as README.Debian debian/README';\
	echo -E 'yada install -doc -as NEWS.Debian -gzip debian/NEWS';\
	echo -E 'yada install -doc -as NEWS debian/NEWS.upstream';\
	echo -E 'yada install -doc -subdir examples libraries/config.default.php';\
	echo -E 'yada install -doc -subdir scripts scripts/*';\
	echo -E 'yada remove -doc -subdir scripts setup.php') | /bin/sh
	@umask 022 \
	  && export pwd="$$(pwd)" \
	  && export ROOT="$$(pwd)/debian/tmp-phpmyadmin" \
	  && export TMPROOT="$$(pwd)/debian/tmp" \
	  && export CONTROL="$$(pwd)/debian/tmp-phpmyadmin/DEBIAN" \
	  && export PACKAGE="phpmyadmin" \
	  && export SOURCE="phpmyadmin" \
	  && 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 phpmyadmin
	yada generate maintscripts phpmyadmin
	find debian/tmp-phpmyadmin -type f -print \
	  | sed -n 's/^debian\/tmp-phpmyadmin\(\/etc\/.*\)$$/\1/p' \
	  > debian/tmp-phpmyadmin/DEBIAN/conffiles
	test -s debian/tmp-phpmyadmin/DEBIAN/conffiles || rm -f debian/tmp-phpmyadmin/DEBIAN/conffiles
	yada rebuild control
	yada generate substvars phpmyadmin
	umask 022 && dpkg-gencontrol -isp -pphpmyadmin -Pdebian/tmp-phpmyadmin

# 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-indep: \
	binary-package-phpmyadmin

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

.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
	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