~mvo/apt/dep8

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Michael Vogt
  • Date: 2011-02-08 09:25:47 UTC
  • mfrom: (1561.38.60 apt-sid)
  • Revision ID: michael.vogt@ubuntu.com-20110208092547-3gsosv0ywgr9vh2q
merged from lp:~donkult/apt/sid

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
# Made with the aid of dh_make, by Craig Small
3
3
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
4
4
# Some lines taken from debmake, by Christoph Lameter.
5
 
# $Id: rules,v 1.68 2004/05/30 18:21:43 mdz Exp $
6
 
 
7
 
# LD_LIBRARY_PATH=pwd/debian/apt/usr/lib dh_shlibdeps -papt
8
 
# dpkg: /home/jgg/work/apt2/debian/apt/usr/lib/libapt-pkg.so.2.9 not found.
9
 
 
10
 
# For the deb builder, you can run 'debian/rules cvs-build', which does all
11
 
# steps nescessary to produce a proper source tarball with the CVS/ removed.
12
 
# It builds in debian/cvs-build/apt-<VER>/, and places files in
13
 
# debian/cvs-build/.  Optionally, you can run 'debian/rules cvs-mkul' to
14
 
# create ../upload-<VER>, with all the files needed to be uploaded placed
15
 
# in it.
16
5
 
17
6
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
18
7
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
85
74
LIBAPTPKG_PROVIDE=libapt-pkg$(LIBAPTPKG_MAJOR)
86
75
LIBAPTINST_PROVIDE=libapt-inst$(LIBAPTINST_MAJOR)
87
76
 
88
 
debian/shlibs.local: apt-pkg/makefile
89
 
        # We have 3 shlibs.local files: One for 'apt', one for 'apt-utils' and
90
 
        # one for the rest of the packages. This ensures that each package gets
91
 
        # the right overrides…
92
 
        rm -rf $@ $@.apt $@.apt-utils
93
 
        echo "libapt-pkg $(LIBAPTPKG_MAJOR)" > $@.apt
94
 
 
95
 
        echo "libapt-pkg $(LIBAPTPKG_MAJOR) $(LIBAPTPKG_PROVIDE)" > $@.apt-utils
96
 
        echo "libapt-inst $(LIBAPTINST_MAJOR)" >> $@.apt-utils
97
 
 
98
 
        echo "libapt-pkg $(LIBAPTPKG_MAJOR) $(LIBAPTPKG_PROVIDE)" > $@
99
 
        echo "libapt-inst $(LIBAPTINST_MAJOR) $(LIBAPTINST_PROVIDE)" >> $@
 
77
# do not fail as we are just experimenting with symbol files for now
 
78
export DPKG_GENSYMBOLS_CHECK_LEVEL=0
100
79
 
101
80
build: build/build-stamp
102
81
build-doc: build/build-doc-stamp
131
110
        [ ! -f Makefile ] || $(MAKE) clean distclean
132
111
        rm -rf build
133
112
 
134
 
        # Add here commands to clean up after the build process.
135
 
        dh_clean debian/copyright debian/shlibs.local debian/shlibs.local.apt debian/shlibs.local.apt-utils
136
 
 
137
113
binary-indep: apt-doc libapt-pkg-doc
138
114
# Build architecture-independent files here.
139
 
libapt-pkg-doc: build-doc debian/shlibs.local
 
115
libapt-pkg-doc: build-doc
140
116
        dh_testdir -p$@
141
117
        dh_testroot -p$@
142
 
        dh_clean -p$@ -k
 
118
        dh_prep -p$@
143
119
        dh_installdirs -p$@
144
120
#
145
121
# libapt-pkg-doc install
158
134
        dh_compress -p$@
159
135
        dh_fixperms -p$@
160
136
        dh_installdeb -p$@
161
 
        dh_gencontrol -p$@ -u -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE)
 
137
        dh_gencontrol -p$@ -- -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE)
162
138
        dh_md5sums -p$@
163
139
        dh_builddeb -p$@
164
140
 
165
141
apt-doc: build-doc
166
142
        dh_testdir -p$@
167
143
        dh_testroot -p$@
168
 
        dh_clean -p$@ -k
 
144
        dh_prep -p$@
169
145
#
170
146
# apt-doc install
171
147
#
188
164
 
189
165
binary-arch: apt libapt-pkg-dev apt-utils apt-transport-https
190
166
apt_MANPAGES = apt-cache apt-cdrom apt-config apt-get apt-key apt-mark apt-secure apt apt.conf apt_preferences sources.list
191
 
apt: build build-doc debian/shlibs.local
 
167
apt: build build-doc
192
168
        dh_testdir -p$@
193
169
        dh_testroot -p$@
194
 
        dh_clean -p$@ -k
 
170
        dh_prep -p$@
195
171
        dh_installdirs -p$@
196
172
#
197
173
# apt install
198
174
#
199
 
        cp $(BLD)/bin/apt-* debian/$@/usr/bin/
200
 
 
201
 
        # Remove the bits that are in apt-utils
202
 
        rm $(addprefix debian/$@/usr/bin/apt-,$(APT_UTILS))
203
 
 
204
 
        # install the shared libs
205
 
        find $(BLD)/bin/ -type f -name "libapt-pkg*.so.*" -exec cp -a "{}" debian/$@/usr/lib/ \;
206
 
        find $(BLD)/bin/ -type l -name "libapt-pkg*.so.*" -exec cp -a "{}" debian/$@/usr/lib/ \;
207
 
 
208
 
        cp $(BLD)/bin/methods/* debian/$@/usr/lib/apt/methods/
209
 
        # https has its own package
210
 
        rm debian/$@/usr/lib/apt/methods/https
211
 
 
212
 
        cp $(BLD)/scripts/dselect/* debian/$@/usr/lib/dpkg/methods/apt/
213
 
        cp -r $(BLD)/locale debian/$@/usr/share/
214
 
 
215
 
        cp debian/bugscript debian/$@/usr/share/bug/apt/script
216
 
        cp debian/apt.logrotate debian/$@/etc/logrotate.d/apt
217
 
 
218
175
        cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove
219
176
 
220
 
        # copy lintian override
221
 
        cp share/lintian-overrides debian/$@/usr/share/lintian/overrides/apt
222
 
 
223
177
        # make rosetta happy and remove pot files in po/ (but leave stuff
224
178
        # in po/domains/* untouched) and cp *.po into each domain dir
225
179
        rm -f build/po/*.pot
226
180
        rm -f po/*.pot
227
181
 
 
182
        dh_install -p$@ --sourcedir=$(BLD)
 
183
 
 
184
        # Remove the bits that are in apt-utils
 
185
        rm $(addprefix debian/$@/usr/bin/apt-,$(APT_UTILS))
 
186
 
 
187
        # https has its own package
 
188
        rm debian/$@/usr/lib/apt/methods/https
 
189
 
228
190
        # move the mirror failure script in place
229
191
        #mv debian/$@/usr/bin/apt-report-mirror-failure \
230
192
        #   debian/$@/usr/lib/apt/apt-report-mirror-failure \
231
193
 
 
194
        dh_bugfiles -p$@
 
195
        dh_lintian -p$@
232
196
        dh_installexamples -p$@ $(BLD)/docs/examples/*
233
197
        dh_installman -p$@ $(wildcard $(patsubst %,doc/%.[158],$(apt_MANPAGES)) $(patsubst %,doc/*/%.*.[158],$(apt_MANPAGES)))
234
198
        dh_installcron -p$@
235
199
        dh_installdocs -p$@
236
200
        dh_installchangelogs -p$@
 
201
        dh_installlogrotate -p$@
237
202
        dh_strip -p$@
238
203
        dh_compress -p$@
239
204
        dh_fixperms -p$@
240
 
        dh_makeshlibs -p$@ --major=$(LIBAPTPKG_MAJOR) --version-info='$(LIBAPTPKG_PROVIDE)'
 
205
        dh_makeshlibs -p$@
241
206
        dh_installdeb -p$@
242
 
        dh_shlibdeps -p$@ -l$(CURDIR)/debian/apt/usr/lib:$(CURDIR)/debian/$@/usr/lib -- -Ldebian/shlibs.local.apt
243
 
        dh_gencontrol -p$@ -u -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE)
 
207
        dh_shlibdeps -p$@ -l$(CURDIR)/debian/apt/usr/lib:$(CURDIR)/debian/$@/usr/lib
 
208
        dh_gencontrol -p$@ -- -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE)
244
209
        dh_md5sums -p$@
245
210
        dh_builddeb -p$@
246
211
 
247
 
libapt-pkg-dev: build debian/shlibs.local
 
212
libapt-pkg-dev: build
248
213
        dh_testdir -p$@
249
214
        dh_testroot -p$@
250
 
        dh_clean -p$@ -k
 
215
        dh_prep -p$@
251
216
        dh_installdirs -p$@
252
217
#
253
218
# libapt-pkg-dev install
254
219
#
255
 
        cp -a $(BLD)/bin/libapt-pkg*.so debian/libapt-pkg-dev/usr/lib/
256
 
        cp -a $(BLD)/bin/libapt-inst*.so debian/libapt-pkg-dev/usr/lib/
257
 
#       ln -s libapt-pkg.so.$(LIBAPTPKG_MAJOR) debian/libapt-pkg-dev/usr/lib/libapt-pkg.so
258
 
        cp $(BLD)/include/apt-pkg/*.h debian/libapt-pkg-dev/usr/include/apt-pkg/
259
 
 
 
220
        dh_install -p$@ --sourcedir=$(BLD)
260
221
        dh_installdocs -p$@
261
 
 
262
222
        dh_installchangelogs -p$@
263
223
        dh_strip -p$@
264
224
        dh_compress -p$@
265
225
        dh_fixperms -p$@
266
226
        dh_installdeb -p$@
267
 
        dh_gencontrol -p$@ -u -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE) -Vlibapt-inst:provides=$(LIBAPTINST_PROVIDE)
 
227
        dh_gencontrol -p$@ -- -Vlibapt-pkg:provides=$(LIBAPTPKG_PROVIDE) -Vlibapt-inst:provides=$(LIBAPTINST_PROVIDE)
268
228
        dh_md5sums -p$@
269
229
        dh_builddeb -p$@
270
230
 
271
231
apt-utils_MANPAGES = apt-sortpkgs apt-ftparchive apt-extracttemplates
272
 
apt-utils: build debian/shlibs.local
 
232
apt-utils: build
273
233
        dh_testdir -p$@
274
234
        dh_testroot -p$@
275
 
        dh_clean -p$@ -k
 
235
        dh_prep -p$@
276
236
        dh_installdirs -p$@
277
237
 
278
 
        # install the shared libs
279
 
        find $(BLD)/bin/ -type f -name "libapt-inst*.so.*" -exec cp -a "{}" debian/$@/usr/lib/ \;
280
 
        find $(BLD)/bin/ -type l -name "libapt-inst*.so.*" -exec cp -a "{}" debian/$@/usr/lib/ \;
281
 
 
282
238
        cp $(addprefix $(BLD)/bin/apt-,$(APT_UTILS)) debian/$@/usr/bin/
 
239
 
 
240
        dh_install -p$@ --sourcedir=$(BLD)
283
241
        dh_installdocs -p$@
284
242
        dh_installexamples -p$@
285
243
 
290
248
        dh_strip -p$@
291
249
        dh_compress -p$@
292
250
        dh_fixperms -p$@
293
 
        dh_makeshlibs -p$@ --major=$(LIBAPTINST_MAJOR) --version-info='$(LIBAPTINST_PROVIDE)'
 
251
        dh_makeshlibs -p$@
294
252
        dh_installdeb -p$@
295
 
        dh_shlibdeps -p$@ -l$(CURDIR)/debian/apt/usr/lib:$(CURDIR)/debian/$@/usr/lib -- -Ldebian/shlibs.local.apt-utils
296
 
        dh_gencontrol -p$@ -u -Vlibapt-inst:provides=$(LIBAPTINST_PROVIDE)
 
253
        dh_shlibdeps -p$@ -l$(CURDIR)/debian/apt/usr/lib:$(CURDIR)/debian/$@/usr/lib
 
254
        dh_gencontrol -p$@ -- -Vlibapt-inst:provides=$(LIBAPTINST_PROVIDE)
297
255
        dh_md5sums -p$@
298
256
        dh_builddeb -p$@
299
257
 
300
 
apt-transport-https: build debian/shlibs.local libapt-pkg-dev
 
258
apt-transport-https: build libapt-pkg-dev
301
259
        dh_testdir -p$@
302
260
        dh_testroot -p$@
303
 
        dh_clean -p$@ -k
 
261
        dh_prep -p$@
304
262
        dh_installdirs -p$@
305
263
 
306
 
        # install the method
307
 
        mkdir --parents debian/$@/usr/lib/apt/methods
308
 
        cp $(BLD)/bin/methods/https debian/$@/usr/lib/apt/methods
309
 
 
 
264
        dh_install -p$@ --sourcedir=$(BLD)
310
265
        dh_installdocs -p$@ debian/apt-transport-https.README
311
266
        dh_installexamples -p$@
312
267
 
332
287
        rm -f l33ch-stamp
333
288
 
334
289
binary: binary-indep binary-arch
335
 
.PHONY: build clean binary-indep binary-arch binary debian/shlibs.local
 
290
.PHONY: build clean binary-indep binary-arch binary