~ubuntu-branches/ubuntu/maverick/vim/maverick

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2008-06-26 13:42:18 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080626134218-703edeyb8k70qpbz
Tags: 1:7.1.314-3ubuntu1
* Resynchronise with Debian. Remaining changes:
  - Enable detection of GNU screen as a mouse-capable terminal.
  - Add NoDisplay=true to gvim.desktop.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Build-depend on libxt-dev.
  - Enable Python interpreter on basic builds.
  - Create a .pot file for translations.
  - Disable autoindent, line-wrapping, and backup files by default.
* Fixes various vulnerabilities due to improper quoting of 'execute'
  arguments (LP: #240216).
* Drop fixes for upgrade problems from Ubuntu 6.06 LTS; direct upgrades
  from 6.06 to 8.10 will not be supported.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
GUIFLAGS+=--enable-fontset
60
60
 
61
61
GTK2FLAGS+=--enable-gui=gtk2
 
62
GTK2FLAGS+=--enable-gtk2-check
 
63
GTK2FLAGS+=--disable-gnome-check
 
64
GTK2FLAGS+=--disable-motif-check
62
65
 
63
66
GNOMEFLAGS+=--enable-gui=gnome2
 
67
GNOMEFLAGS+=--disable-gtk2-check
 
68
GNOMEFLAGS+=--enable-gnome-check
 
69
GNOMEFLAGS+=--disable-motif-check
64
70
 
65
71
LESSTIFFLAGS+=--enable-gui=motif
 
72
LESSTIFFLAGS+=--disable-gtk2-check
 
73
LESSTIFFLAGS+=--disable-gnome-check
 
74
LESSTIFFLAGS+=--enable-motif-check
66
75
 
67
76
NOINTERPFLAGS+=--disable-mzschemeinterp
68
77
NOINTERPFLAGS+=--disable-tclinterp
134
143
DOT_IN_DEPS += debian/vim-common.links
135
144
DOT_IN_DEPS += debian/vim-gui-common.links
136
145
DOT_IN_DEPS += debian/vim-runtime.links
 
146
DOT_IN_DEPS += debian/vim-runtime.postrm
 
147
DOT_IN_DEPS += debian/vim-runtime.preinst
137
148
DOT_IN_DEPS += debian/runtime/debian.vim
138
149
DOT_IN_DEPS_TINY := debian/tiny/vimrc.tiny
139
150
 
140
151
# nothing to do per default
141
152
all: 
142
153
 
 
154
# Should be run from master branch after the release has been prepared
143
155
update-orig:
144
156
        if git rev-parse --git-dir >/dev/null 2>&1; then \
145
157
            git checkout upstream; \
146
158
            git tag upstream/$(DEBVERSION); \
147
159
            git archive --format=tar --prefix=$(NAME)-$(DEBVERSION)/ upstream | gzip > $(ORIG_SOURCE); \
148
160
            pristine-tar commit $(ORIG_SOURCE); \
149
 
            git checkout debian; \
 
161
            git checkout master; \
150
162
        fi
151
163
 
152
164
$(ORIG_SOURCE):
174
186
        rm -f debian/helpztags.1
175
187
        rm -rf debian/policy/vim-policy.html
176
188
        rm -f debian/policy/vim-policy.txt
177
 
        if test -f src/auto/configure.dist; then mv src/auto/configure{.dist,}; fi
178
189
        if test -f src/auto/config.cache; then make distclean; fi
179
190
        rm -f runtime/doc/doctags runtime/doc/tags.ref
180
191
        rm -f runtime/doc/*.html runtime/doc/*.log
 
192
        rm -f src/pixmaps src/runtime
181
193
        dh_clean
182
194
 
183
195
clean-vim-basic:
188
200
                 vim-runtime.install; do \
189
201
          rm -f debian/$$x; \
190
202
        done
 
203
        [ ! -L src/vim-basic/po ] || $(MAKE) -C src/vim-basic/po clean
191
204
        rm -f $(DOT_IN_DEPS)
192
 
        rm -f src/vim.basic
 
205
        rm -rf src/vim-basic
193
206
 
 
207
clean-%: SHADOWDIR=$*
194
208
clean-%:
195
209
        for x in $(PER_VARIANT_FILES) ; do \
196
210
          rm -f debian/$*.$$x ; \
197
211
        done
198
212
        rm -f debian/lintian/$*
199
 
        rm -f src/$(subst -,.,$*)
200
213
        if [ "$*" = "vim-tiny" ]; then \
201
214
          rm -f $(DOT_IN_DEPS_TINY); \
202
215
        fi
 
216
        rm -rf src/$(SHADOWDIR)
203
217
 
204
 
build:
 
218
build: build-stamp-arch
205
219
 
206
220
build-indep: build-stamp-indep
 
221
build-stamp-indep: export DH_OPTIONS=-pvim-doc -pvim-python -pvim-perl -pvim-ruby -pvim-tcl -pvim-full
207
222
build-stamp-indep:
208
223
        dh_testdir
 
224
        dh_clean -k
209
225
        $(MAKE) -C runtime/doc html
210
226
        $(MAKE) -C debian/policy text html
211
227
        $(MAKE) -C src/po vim.pot
216
232
        dh_testdir
217
233
        touch $@
218
234
 
219
 
autoconf-stamp:
220
 
        if ! test -f src/auto/configure.dist; then \
221
 
          cp -a src/auto/configure src/auto/configure.dist; \
222
 
        fi
223
 
        $(MAKE) -C src autoconf
224
 
        touch $@
225
 
 
226
 
configure-stamp-%: autoconf-stamp
 
235
configure-stamp-%: SHADOWDIR=$*
 
236
configure-stamp-%:
227
237
        dh_testdir
228
238
        @echo "*** DEBIAN *** CONFIGURING VARIANT $*"
 
239
        $(MAKE) -C src shadow SHADOWDIR=$(SHADOWDIR)
229
240
        if test -f src/auto/config.cache; then make distclean; fi
230
 
        LDFLAGS="-Wl,--as-needed" CFLAGS="$(CFLAGS_$(*))" ./configure $(CFGFLAGS_$(*))
 
241
        cd src/$(SHADOWDIR) && LDFLAGS="-Wl,--as-needed" CFLAGS="$(CFLAGS_$(*))" ./configure $(CFGFLAGS_$(*))
231
242
        touch $@
232
243
 
233
244
build-stamp-%: CURCFLAGS=$(CFLAGS_$*)
 
245
build-stamp-%: SHADOWDIR=$*
234
246
build-stamp-%: configure-stamp-%
235
247
        dh_testdir
 
248
        dh_clean -p$* -k
236
249
        @echo "*** DEBIAN *** BUILDING VARIANT $*"
237
 
        $(MAKE) CFLAGS="$(CURCFLAGS)"
238
 
        mv src/vim src/$(subst -,.,$*)
 
250
        $(MAKE) -C src/$(SHADOWDIR) CFLAGS="$(CURCFLAGS)"
 
251
        mv src/$(SHADOWDIR)/vim src/$(SHADOWDIR)/$(subst -,.,$*)
239
252
        touch $@
240
253
 
241
254
install: install-stamp
242
255
install-stamp: $(foreach v,$(VARIANTS),install-stamp-$(v))
243
 
        dh_testdir
244
 
        dh_testroot
245
 
        dh_installchangelogs -pvim-python -pvim-perl -pvim-ruby -pvim-tcl -pvim-full
246
 
        dh_installdocs -pvim-python -pvim-perl -pvim-ruby -pvim-tcl -pvim-full
247
 
        touch $@
248
256
 
249
 
install-stamp-indep: export DH_OPTIONS=-pvim-doc
 
257
install-stamp-indep: export DH_OPTIONS=-pvim-doc -pvim-python -pvim-perl -pvim-ruby -pvim-tcl -pvim-full
250
258
install-stamp-indep: build-stamp-indep
251
259
        dh_testdir
252
260
        dh_testroot
253
 
        dh_clean -k
254
261
        dh_installdirs
255
 
        dh_install --fail-missing
 
262
        dh_install
256
263
        dh_link
257
264
        dh_installchangelogs
258
265
        dh_installdocs
264
271
        dh_testdir
265
272
        dh_testroot
266
273
        @echo "*** DEBIAN *** INSTALLING VARIANT vim-basic"
267
 
        dh_clean -k
268
274
        dh_installdirs
269
275
        
270
276
        # UPSTREAM INSTALLATION
271
277
        
272
 
        cp src/{vim.basic,vim}
273
 
        $(MAKE) -C src DESTDIR=$(DESTDIR) installvimbin \
274
 
                                          installtutorbin \
275
 
                                          installruntime \
276
 
                                          installtools \
277
 
                                          install-icons \
278
 
                                          install-languages
 
278
        $(MAKE) -C src/vim-basic DESTDIR=$(DESTDIR) installvimbin \
 
279
                                                    installtutorbin \
 
280
                                                    installruntime \
 
281
                                                    installtools \
 
282
                                                    install-icons \
 
283
                                                    install-languages
 
284
        
279
285
        if [ $(MAKETEST) = "yes" ]; then \
280
 
          $(MAKE) -C src DESTDIR=$(DESTDIR) test; \
 
286
          $(MAKE) -C src/vim-basic test; \
281
287
        fi
282
288
        # installvimbin installs the vim binary under debian/tmp but we install
283
289
        # it into the vim package from src/.  Need to rm it from debian/tmp so
284
290
        # that dh_install doesn't fail
285
 
        rm -f src/vim debian/tmp/usr/bin/vim
 
291
        rm -f debian/tmp/usr/bin/vim
 
292
        cp src/vim-basic/vim src/vim-basic/vim.basic
286
293
        
287
294
        # DEBIAN INSTALLATION
288
295
        
305
312
        # variant-related installations for package "vim"
306
313
        # to be kept in sync with those in "install-stamp-%" target
307
314
        for x in $(PER_VARIANT_FILES) ; do \
308
 
          sed -e "s:@PKG@:vim:;s:@VARIANT@:basic:" \
 
315
          sed -e "s:@PKG@:vim:;s:@VARIANT@:basic:g" \
309
316
              -e "s:@COMMON@:vim-common:" \
310
317
              debian/vim-variant.$$x > debian/vim.$$x ;\
311
318
        done
388
395
        dh_testdir
389
396
        dh_testroot
390
397
        @echo "*** DEBIAN *** INSTALLING VARIANT vim-tiny"
391
 
        dh_clean -k
392
398
        dh_installdirs
393
399
        
394
400
        # variant-related installations
395
401
        # to be kept in sync with those in "install-stamp-vim-basic" target
396
402
        for x in $(PER_VARIANT_FILES) ; do \
397
 
          sed -e "s:@PKG@:vim-tiny:" -e "s:@VARIANT@:tiny:" \
 
403
          sed -e "s:@PKG@:vim-tiny:" -e "s:@VARIANT@:tiny:g" \
398
404
              -e "s:@COMMON@:vim-common:" \
399
405
              debian/vim-variant.$$x > debian/vim-tiny.$$x ;\
400
406
        done
426
432
        dh_testdir
427
433
        dh_testroot
428
434
        @echo "*** DEBIAN *** INSTALLING VARIANT $*"
429
 
        dh_clean -k
430
435
        dh_installdirs
431
436
        
432
437
        # variant-related installations
433
438
        # to be kept in sync with those in "install-stamp-vim-basic" target
434
439
        for x in $(PER_VARIANT_FILES) ; do \
435
440
          if [ "$*" = "vim-nox" ]; then \
436
 
            sed -e "s:@PKG@:$*:" -e "s:@VARIANT@:$(patsubst vim-%,%,$*):" \
 
441
            sed -e "s:@PKG@:$*:" -e "s:@VARIANT@:$(patsubst vim-%,%,$*):g" \
437
442
                -e "s:@COMMON@:vim-common:" \
438
443
                debian/vim-variant.$$x > debian/$*.$$x ;\
439
444
          else \
440
 
            sed -e "s:@PKG@:$*:" -e "s:@VARIANT@:$(patsubst vim-%,%,$*):" \
 
445
            sed -e "s:@PKG@:$*:" -e "s:@VARIANT@:$(patsubst vim-%,%,$*):g" \
441
446
                -e "s:@COMMON@:vim-gui-common:" \
442
447
                debian/vim-variant.$$x > debian/$*.$$x ;\
443
448
          fi \
463
468
        cat $< | sed 's/@VIMCUR@/$(VIMCUR)/' > $@
464
469
 
465
470
binary-indep: export DH_OPTIONS=-i
466
 
binary-indep: build-stamp-indep build-stamp-arch install install-stamp-indep
 
471
binary-indep: install-stamp-vim-basic install-stamp-indep
467
472
        dh_testdir
468
473
        dh_testroot
469
474
        dh_compress
470
475
        dh_fixperms
471
476
        dh_installdeb
472
 
        dh_shlibdeps
473
477
        dh_gencontrol
474
478
        dh_md5sums
475
479
        dh_builddeb -pvim-runtime -- -Zbzip2
476
480
        dh_builddeb -Nvim-runtime
477
481
 
478
 
binary-arch: build-stamp-arch install
479
 
binary-arch: $(foreach v,$(VARIANTS),binary-arch-$(v)) binary-arch-vim-dbg
 
482
binary-arch: export DH_OPTIONS=-pvim-dbg
 
483
binary-arch: $(foreach v,$(VARIANTS),binary-arch-$(v))
 
484
        dh_testdir
 
485
        dh_testroot
 
486
        dh_compress
 
487
        dh_fixperms
 
488
        dh_installdeb
 
489
        dh_gencontrol
 
490
        dh_md5sums
 
491
        dh_builddeb
480
492
 
481
493
binary-arch-vim-basic: export DH_OPTIONS=-pvim-common -pvim
482
494
binary-arch-vim-basic: install-stamp-vim-basic
506
518
        dh_md5sums
507
519
        dh_builddeb
508
520
 
509
 
binary-arch-vim-dbg: export DH_OPTIONS=-pvim-dbg
510
 
binary-arch-vim-dbg:
511
 
        dh_testdir
512
 
        dh_testroot
513
 
        dh_compress
514
 
        dh_fixperms
515
 
        dh_installdeb
516
 
        dh_gencontrol
517
 
        dh_md5sums
518
 
        dh_builddeb
519
 
 
520
521
binary: beginlog binary-indep binary-arch endlog
521
522
.PHONY: patch unpatch extract clean build install binary-indep binary-arch binary get-orig-source check-tarball update-orig
522
523
 
528
529
endlog:
529
530
        @echo "*** DEBIAN *** BUILD COMPLETED"
530
531
 
531
 
.NOTPARALLEL:
532
532
# vim: set foldmethod=marker: