~ubuntu-branches/ubuntu/vivid/vim/vivid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2008-11-05 11:37:43 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20081105113743-9i4urcsm3n44mhqe
Tags: 2:7.2.025-2ubuntu1
* Merge from debian unstable, remaining changes:
  - runtime/syntax/debcontrol.vim:
    + Add "metapackages" to the list of valid sections.
  - runtime/syntax/debchangelog.vim:
    + Add "jaunty" to the list of valid suites.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Enable Python interpreter on basic builds.
  - Create a .pot file for translations.
  - Disable autoindent, line-wrapping, and backup files by default.
  - runtime/syntax/debsources.vim:
    + Add "jaunty" to debsourcesDistrKeyword
  - runtime/syntax/grub.vim:
    + Add Ubuntu-specific 'quiet' keyword.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 
10
10
BUILDER := $(shell echo $${DEBEMAIL:-$${EMAIL:-$$(echo $$LOGNAME@$$(cat /etc/mailname 2> /dev/null))}})
11
11
 
12
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
12
CFLAGS = -Wall -g
 
13
ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
13
14
  CFLAGS+=-O0
14
15
else
15
16
  CFLAGS+=-O2
17
18
 
18
19
MAKETEST := no
19
20
ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
20
 
  ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
 
21
  ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
21
22
    MAKETEST := yes
22
23
  endif
23
24
endif
24
25
 
25
 
INSTALL+=install
26
 
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
27
 
  INSTALL+=-s
28
 
endif
29
 
 
30
 
CFLAGS+=$(if $(findstring nodebug,$(DEB_BUILD_OPTIONS)),,-g -Wall)
31
 
CFGFLAGS:=--prefix=/usr --mandir='$${prefix}'/share/man --with-compiledby="$(BUILDER)"
 
26
INSTALL := install
 
27
ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
 
28
  INSTALL += -s
 
29
endif
 
30
 
 
31
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
32
    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
 
33
    MAKEFLAGS += -j$(NUMJOBS)
 
34
endif
 
35
 
 
36
CFGFLAGS:=--prefix=/usr --mandir='$${prefix}'/share/man --with-compiledby="$(BUILDER)" --without-local-dir
32
37
 
33
38
# "vim-tiny" features: in addition to those coming from the --with-features=xxx,
34
39
# "vim-tiny" is built with those listed in debian/tiny/features.txt
122
127
CFGFLAGS_vim-nox:=$(CFGFLAGS) $(OPTFLAGS) $(NOXFLAGS) $(ALLINTERPFLAGS)
123
128
 
124
129
NAME:=vim
125
 
VERSION:=7.1
 
130
VERSION:=7.2
126
131
SNAPSHOT:=
127
 
VIMCUR:=$(NAME)$(subst .,,$(VERSION))
 
132
VIMCUR:=$(NAME)$(subst .,,$(VERSION))$(SNAPSHOT)
128
133
DEBVERSION:=$(shell dpkg-parsechangelog | sed -n '/^Version:/{s/Version: *\([^:]*:\)\?\([^-]*\)-.*/\2/;p;q}')
129
 
FTP:=ftp://ftp.vim.org/pub/vim/$(if $(SNAPSHOT),unstable/,)
 
134
FTP:=ftp://ftp.vim.org/pub/vim$(if $(SNAPSHOT),/unstable,)
130
135
MAIN_TARBALL:=$(NAME)-$(VERSION)$(SNAPSHOT).tar.bz2
131
136
LANG_TARBALL:=$(NAME)-$(VERSION)$(SNAPSHOT)-lang.tar.gz
132
137
EXTRA_TARBALL:=$(NAME)-$(VERSION)$(SNAPSHOT)-extra.tar.gz
137
142
LANGS += pl pl.ISO8859-2 pl.UTF-8
138
143
LANGS += ru
139
144
 
140
 
DOT_IN_DEPS := debian/vim-runtime.install
141
 
DOT_IN_DEPS += debian/vim-common.install
 
145
DOT_IN_DEPS := debian/vim-common.install
 
146
DOT_IN_DEPS += debian/vim-common.links
142
147
DOT_IN_DEPS += debian/vim-gui-common.install
143
 
DOT_IN_DEPS += debian/vim-common.links
144
148
DOT_IN_DEPS += debian/vim-gui-common.links
 
149
DOT_IN_DEPS += debian/vim-runtime.install
145
150
DOT_IN_DEPS += debian/vim-runtime.links
146
151
DOT_IN_DEPS += debian/vim-runtime.postrm
147
152
DOT_IN_DEPS += debian/vim-runtime.preinst
148
153
DOT_IN_DEPS += debian/runtime/debian.vim
 
154
DOT_IN_DEPS += debian/lintian/vim-runtime
149
155
DOT_IN_DEPS_TINY := debian/tiny/vimrc.tiny
150
156
 
151
157
# nothing to do per default
154
160
# Should be run from master branch after the release has been prepared
155
161
update-orig:
156
162
        if git rev-parse --git-dir >/dev/null 2>&1; then \
157
 
            git checkout upstream; \
158
 
            git tag upstream/$(DEBVERSION); \
 
163
            git tag upstream/$(DEBVERSION) upstream; \
159
164
            git archive --format=tar --prefix=$(NAME)-$(DEBVERSION)/ upstream | gzip > $(ORIG_SOURCE); \
160
165
            pristine-tar commit $(ORIG_SOURCE); \
161
 
            git checkout master; \
162
166
        fi
163
167
 
164
168
$(ORIG_SOURCE):
170
174
 
171
175
get-orig-source:
172
176
        wget -O $(MAIN_TARBALL) $(FTP)/unix/$(MAIN_TARBALL)
173
 
        tar zx -f $(MAIN_TARBALL)
 
177
        tar jx -f $(MAIN_TARBALL)
174
178
        wget -O $(LANG_TARBALL) $(FTP)/extra/$(LANG_TARBALL)
175
179
        tar zx -f $(LANG_TARBALL)
176
180
        wget -O $(EXTRA_TARBALL) $(FTP)/extra/$(EXTRA_TARBALL)
177
181
        tar zx -f $(EXTRA_TARBALL)
178
 
        mv $(NAME)$(VERSION)$(SNAPSHOT) $(NAME)-$(DEBVERSION)
 
182
        mv $(VIMCUR) $(NAME)-$(DEBVERSION)
179
183
        tar zc -f $(ORIG_SOURCE) $(NAME)-$(DEBVERSION)
180
184
        rm -rf $(NAME)-$(DEBVERSION)
 
185
        rm -f $(MAIN_TARBALL) $(LANG_TARBALL) $(EXTRA_TARBALL)
181
186
 
182
187
clean: $(foreach v,$(VARIANTS),clean-$(v))
183
188
        dh_testdir
193
198
        dh_clean
194
199
 
195
200
clean-vim-basic:
 
201
        dh_testdir
 
202
        dh_testroot
196
203
        for x in $(PER_VARIANT_FILES) ; do \
197
204
          rm -f debian/vim.$$x ; \
198
205
        done
199
 
        for x in vim-gui-common.{install,links} vim-common.{install,links} \
200
 
                 vim-runtime.install; do \
201
 
          rm -f debian/$$x; \
202
 
        done
203
206
        [ ! -L src/vim-basic/po ] || $(MAKE) -C src/vim-basic/po clean
204
207
        rm -f $(DOT_IN_DEPS)
205
208
        rm -rf src/vim-basic
206
209
 
207
210
clean-%: SHADOWDIR=$*
208
211
clean-%:
 
212
        dh_testdir
 
213
        dh_testroot
209
214
        for x in $(PER_VARIANT_FILES) ; do \
210
215
          rm -f debian/$*.$$x ; \
211
216
        done
251
256
        mv src/$(SHADOWDIR)/vim src/$(SHADOWDIR)/$(subst -,.,$*)
252
257
        touch $@
253
258
 
254
 
install: install-stamp
255
 
install-stamp: $(foreach v,$(VARIANTS),install-stamp-$(v))
 
259
install: $(foreach v,$(VARIANTS),install-stamp-$(v))
256
260
 
257
261
install-stamp-indep: export DH_OPTIONS=-pvim-doc -pvim-python -pvim-perl -pvim-ruby -pvim-tcl -pvim-full
258
262
install-stamp-indep: build-stamp-indep
277
281
        
278
282
        $(MAKE) -C src/vim-basic DESTDIR=$(DESTDIR) installvimbin \
279
283
                                                    installtutorbin \
 
284
                                                    installgtutorbin \
280
285
                                                    installruntime \
281
286
                                                    installtools \
282
287
                                                    install-icons \
283
288
                                                    install-languages
284
289
        
 
290
# Tests need to be run in series, otherwise the terminal requests may not see
 
291
# proper responses
285
292
        if [ $(MAKETEST) = "yes" ]; then \
286
 
          $(MAKE) -C src/vim-basic test; \
 
293
          $(MAKE) -j1 -C src/vim-basic test; \
287
294
        fi
288
295
        # installvimbin installs the vim binary under debian/tmp but we install
289
296
        # it into the vim package from src/.  Need to rm it from debian/tmp so
302
309
        
303
310
        # rm stuff handled by alternatives
304
311
        rm -f $(DESTDIR)/usr/bin/{ex,view}
305
 
        @for f in `find $(DESTDIR)/usr/share/man -name view.1 -o -name ex.1`; do \
306
 
          rm -f $$f; \
307
 
        done
 
312
        for f in `find $(DESTDIR)/usr/share/man -name view.1 -o -name ex.1`; do \
 
313
          rm -f $$f; \
 
314
        done
 
315
        
 
316
        # rm stuff handled by our own symlinks
 
317
        for f in `find $(DESTDIR)/usr/share/man -name rvim.1 -o -name rview.1`; do \
 
318
          rm -f $$f; \
 
319
        done
 
320
        
308
321
        # helpztags manpage
309
322
        pod2man -c "User Commands" -s 1 -q none -r "vim $(VERSION)$(SNAPSHOT)"  \
310
323
                -d "September 2003" debian/helpztags debian/helpztags.1
326
339
        
327
340
        # Generate language-specific sections of
328
341
        # vim-{runtime,common,gui-common}.install files
329
 
        @for L in $(LANGS); do \
 
342
        for L in $(LANGS); do \
330
343
          echo debian/tmp/usr/share/man/$$L/man1/vimtutor.1  \
331
344
            usr/share/man/$$L/man1/ >>debian/vim-runtime.install; \
332
 
        done
333
 
        
334
 
        @for L in $(LANGS); do \
335
 
          echo debian/tmp/usr/share/man/$$L/man1/\*  \
336
 
            usr/share/man/$$L/man1/ >>debian/vim-common.install; \
337
 
        done
338
 
        
339
 
        @for L in $(LANGS); do \
 
345
          for f in vim xxd vimdiff; do \
 
346
            echo debian/tmp/usr/share/man/$$L/man1/$$f.1 \
 
347
              usr/share/man/$$L/man1/ >>debian/vim-common.install; \
 
348
          done; \
340
349
          echo debian/tmp/usr/share/man/$$L/man1/evim.1  \
341
350
            usr/share/man/$$L/man1/ >>debian/vim-gui-common.install; \
342
351
        done
348
357
           debian/vim-gui-common/usr/share/man/man1/gvim.1
349
358
        cp debian/vim-common/usr/share/man/man1/vimdiff.1 \
350
359
           debian/vim-gui-common/usr/share/man/man1/gvimdiff.1
351
 
        rm -f debian/vim-common/usr/share/man/man1/evim.1
352
 
        @for L in $(LANGS); do \
 
360
        for L in $(LANGS); do \
353
361
          cp debian/vim-common/usr/share/man/$$L/man1/vim.1 \
354
362
             debian/vim-gui-common/usr/share/man/$$L/man1/gvim.1; \
355
363
          cp debian/vim-common/usr/share/man/$$L/man1/vimdiff.1 \
356
364
             debian/vim-gui-common/usr/share/man/$$L/man1/gvimdiff.1; \
357
 
          rm -f debian/vim-common/usr/share/man/$$L/man1/evim.1; \
358
 
        done
359
 
        # remove things that are in vim-runtime
360
 
        rm -f debian/vim-common/usr/share/man/man1/vimtutor.1
361
 
        @for L in $(LANGS); do \
362
 
          rm -f debian/vim-common/usr/share/man/$$L/man1/vimtutor.1; \
363
365
        done
364
366
        rmdir debian/vim-gui-common/usr/bin
365
367
        # Generate language-specific sections of
366
 
        # vim-{common,gui-common}.links files
367
 
        @for L in $(LANGS); do \
 
368
        # vim-{runtime,common,gui-common}.links files
 
369
        for L in $(LANGS); do \
 
370
          echo usr/share/man/$$L/man1/vimtutor.1 \
 
371
            usr/share/man/$$L/man1/gvimtutor.1 >>debian/vim-runtime.links; \
368
372
          for p in rvim rview; do \
369
373
            echo usr/share/man/$$L/man1/vim.1  \
370
374
              usr/share/man/$$L/man1/$$p.1 >>debian/vim-common.links; \
371
375
          done; \
372
 
        done
373
 
        
374
 
        @for L in $(LANGS); do \
375
376
          for p in gview rgvim rgview; do \
376
377
            echo usr/share/man/$$L/man1/gvim.1  \
377
378
              usr/share/man/$$L/man1/$$p.1 >>debian/vim-gui-common.links; \
406
407
        done
407
408
        sed -e "s:@PKG@:vim-tiny:;s:@VARIANT@:tiny:" \
408
409
            debian/lintian/vim-variant > debian/lintian/vim-tiny
409
 
        # Handle the gvim menu file overrides
410
 
        if [ -e "debian/lintian/vim-tiny.in" ]; then \
411
 
            cat debian/lintian/vim-tiny.in >> debian/lintian/vim-tiny; \
412
 
        fi
413
410
        for L in $(LANGS); do \
414
411
          sed -e "s:\(.*\)@LANG_ALTS@:\1--slave \$$mandir/$$L/man1/\$$i.1.gz \$$i.$$L.1.gz \$$mandir/$$L/man1/vim.1.gz \\\\\n&:" \
415
412
              -i debian/vim-tiny.postinst; \