r1054 - in /trunk/packages/vim/debian: changelog control rules vim-full.preinst vim-perl.preinst vim-python.preinst vim-ruby.preinst vim-tcl.preinst vim-variant.postinst vim-variant.prerm

jamessan at users.alioth.debian.org jamessan at users.alioth.debian.org
Sun Oct 7 16:37:49 UTC 2007


Author: jamessan
Date: Sun Oct  7 16:37:49 2007
New Revision: 1054

URL: http://svn.debian.org/wsvn/pkg-vim/?sc=1&rev=1054
Log:
vim-lesstif is still being built since changing GUI toolkits on a user seems to
be a harsh change to impose on someone.

* debian/rules:
  - Remove vim-{python,perl,tcl,ruby,full} variants.
  - Add vim-nox which has all language bindings but no X requirement.
  - Include all language bindings when building vim-gtk.
* debian/control:
  - Remove Build-Depends on dpkg and dpkg-dev since the specific versions we
    need are older than what's in stable.
  - Make vim-full a transition package Depending on vim-gnome.
  - Make vim-{python,perl,tcl,ruby} transition packages Depending on
    vim-gtk.

Added:
    trunk/packages/vim/debian/vim-full.preinst
    trunk/packages/vim/debian/vim-perl.preinst
    trunk/packages/vim/debian/vim-python.preinst
    trunk/packages/vim/debian/vim-ruby.preinst
    trunk/packages/vim/debian/vim-tcl.preinst
Modified:
    trunk/packages/vim/debian/changelog
    trunk/packages/vim/debian/control
    trunk/packages/vim/debian/rules
    trunk/packages/vim/debian/vim-variant.postinst
    trunk/packages/vim/debian/vim-variant.prerm

Modified: trunk/packages/vim/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/changelog?rev=1054&op=diff
==============================================================================
--- trunk/packages/vim/debian/changelog (original)
+++ trunk/packages/vim/debian/changelog Sun Oct  7 16:37:49 2007
@@ -26,6 +26,16 @@
     Alberto Reyes.  (Closes: #386064)
   * Add tex.vim-syntax_additions.diff, which adds syntax highlighting for
     acronyms, URLs, and citetest.  (Closes: #444411, #444408, #444301)
+  * debian/rules:
+    - Remove vim-{python,perl,tcl,ruby,full} variants.
+    - Add vim-nox which has all language bindings but no X requirement.
+    - Include all language bindings when building vim-gtk.
+  * debian/control:
+    - Remove Build-Depends on dpkg and dpkg-dev since the specific versions we
+      need are older than what's in stable.
+    - Make vim-full a transition package Depending on vim-gnome.
+    - Make vim-{python,perl,tcl,ruby} transition packages Depending on
+      vim-gtk.
 
  -- James Vega <jamessan at debian.org>  Wed, 03 Oct 2007 09:25:12 -0400
 

Modified: trunk/packages/vim/debian/control
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/control?rev=1054&op=diff
==============================================================================
--- trunk/packages/vim/debian/control (original)
+++ trunk/packages/vim/debian/control Sun Oct  7 16:37:49 2007
@@ -4,7 +4,7 @@
 Maintainer: Debian VIM Maintainers <pkg-vim-maintainers at lists.alioth.debian.org>
 Uploaders: Norbert Tretkowski <nobse at debian.org>, Pierre Habouzit <madcoder at debian.org>, Stefano Zacchiroli <zack at debian.org>, James Vega <jamessan at debian.org>
 Standards-Version: 3.7.2
-Build-Depends: debhelper (>= 4.2.21), dpkg (>> 1.7.0), dpkg-dev (>= 1.13.19), bzip2, perl (>= 5.6), libgpmg1-dev [!hurd-i386] | not+linux-gnu, libperl-dev (>= 5.6), tcl8.4-dev, python-dev, libxpm-dev, libncurses5-dev, ruby, ruby1.8-dev, libgtk2.0-dev (>= 2.2), libgnomeui-dev [!hurd-i386], lesstif2-dev, quilt, make (>= 3.80+3.81.b4), docbook-xml, docbook-utils, lynx
+Build-Depends: debhelper (>= 4.2.21), bzip2, perl (>= 5.6), libgpmg1-dev [!hurd-i386] | not+linux-gnu, libperl-dev (>= 5.6), tcl8.4-dev, python-dev, libxpm-dev, libncurses5-dev, ruby, ruby1.8-dev, libgtk2.0-dev (>= 2.2), libgnomeui-dev [!hurd-i386], lesstif2-dev, quilt, make (>= 3.80+3.81.b4), docbook-xml, docbook-utils, lynx
 Build-Conflicts: libperl-dev (= 5.8.4-1)
 XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-vim/trunk/packages/vim
 XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/
@@ -14,7 +14,7 @@
 Priority: important
 Architecture: any
 Depends: ${shlibs:Depends}
-Recommends: vim | vim-gnome | vim-gtk | vim-lesstif | vim-perl | vim-python | vim-ruby | vim-tcl | vim-full | vim-tiny
+Recommends: vim | vim-gnome | vim-gtk | vim-lesstif | vim-nox | vim-tiny
 Description: Vi IMproved - Common files
  Vim is an almost compatible version of the UNIX editor Vi.
  .
@@ -30,7 +30,7 @@
 Package: vim-gui-common
 Priority: optional
 Architecture: all
-Recommends: vim-gnome | vim-gtk | vim-lesstif | vim-perl | vim-python | vim-ruby | vim-tcl | vim-full
+Recommends: vim-gnome | vim-gtk | vim-lesstif
 Description: Vi IMproved - Common GUI files
  Vim is an almost compatible version of the UNIX editor Vi.
  .
@@ -39,15 +39,14 @@
  completion, block operations, folding, Unicode support, etc.
  .
  This package contains files shared by all GUI-enabled vim
- variants (vim-perl, vim-gnome, ...) available in Debian.
- Examples of such shared files are: icons,
- desktop environments settings, and menu entries.
+ variants available in Debian.  Examples of such shared files are:
+ icons, desktop environments settings, and menu entries.
 
 Package: vim-runtime
 Priority: optional
 Architecture: all
 Replaces: vim-tiny
-Recommends: vim | vim-gnome | vim-gtk | vim-lesstif | vim-perl | vim-python | vim-ruby | vim-tcl | vim-full | vim-tiny
+Recommends: vim | vim-gnome | vim-gtk | vim-lesstif | vim-nox | vim-tiny
 Enhances: vim-tiny
 Description: Vi IMproved - Runtime files
  Vim is an almost compatible version of the UNIX editor Vi.
@@ -115,74 +114,48 @@
 
 Package: vim-perl
 Priority: extra
+Architecture: all
+Depends: vim-gtk (>= 1:7.1-135+1)
+Provides: gvim, editor
+Description: Vi IMproved - enhanced vi editor (transitional package)
+ This package is simply a transitional package from individual
+ vim-$language packages to vim-gtk.
+
+Package: vim-python
+Priority: extra
+Architecture: all
+Depends: vim-gtk (>= 1:7.1-135+1)
+Provides: gvim, editor
+Description: Vi IMproved - enhanced vi editor (transitional package)
+ This package is simply a transitional package from individual
+ vim-$language packages to vim-gtk.
+
+Package: vim-ruby
+Priority: extra
+Architecture: all
+Depends: vim-gtk (>= 1:7.1-135+1)
+Provides: gvim, editor
+Description: Vi IMproved - enhanced vi editor (transitional package)
+ This package is simply a transitional package from individual
+ vim-$language packages to vim-gtk.
+
+Package: vim-tcl
+Priority: extra
+Architecture: all
+Depends: vim-gtk (>= 1:7.1-135+1)
+Provides: gvim, editor
+Description: Vi IMproved - enhanced vi editor (transitional package)
+ This package is simply a transitional package from individual
+ vim-$language packages to vim-gtk.
+
+Package: vim-gtk
+Priority: extra
 Architecture: any
 Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
+Conflicts: vim-python (<< 1:7.1-135+1), vim-perl (<< 1:7.1-135+1), vim-ruby (<< 1:7.1-135+1), vim-tcl (<< 1:7.1-135+1)
+Replaces: vim-python (<< 1:7.1-135+1), vim-perl (<< 1:7.1-135+1), vim-ruby (<< 1:7.1-135+1), vim-tcl (<< 1:7.1-135+1)
 Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme
 Provides: gvim, editor
-Description: Vi IMproved - enhanced vi editor - with Perl support
- Vim is an almost compatible version of the UNIX editor Vi.
- .
- Many new features have been added: multi level undo, syntax
- highlighting, command line history, on-line help, filename
- completion, block operations, folding, Unicode support, etc.
- .
- This package contains a version of vim compiled with Perl
- scripting support and the GTK2 GUI.
-
-Package: vim-python
-Priority: extra
-Architecture: any
-Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
-Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme
-Provides: gvim, editor
-Description: Vi IMproved - enhanced vi editor - with Python support
- Vim is an almost compatible version of the UNIX editor Vi.
- .
- Many new features have been added: multi level undo, syntax
- highlighting, command line history, on-line help, filename
- completion, block operations, folding, Unicode support, etc.
- .
- This package contains a version of vim compiled with Python
- scripting support and the GTK2 GUI.
-
-Package: vim-ruby
-Priority: extra
-Architecture: any
-Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
-Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme
-Provides: gvim, editor
-Description: Vi IMproved - enhanced vi editor - with Ruby support
- Vim is an almost compatible version of the UNIX editor Vi.
- .
- Many new features have been added: multi level undo, syntax
- highlighting, command line history, on-line help, filename
- completion, block operations, folding, Unicode support, etc.
- .
- This package contains a version of vim compiled with Ruby
- scripting support and the GTK2 GUI.
-
-Package: vim-tcl
-Priority: extra
-Architecture: any
-Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
-Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme
-Provides: gvim, editor
-Description: Vi IMproved - enhanced vi editor - with TCL support
- Vim is an almost compatible version of the UNIX editor Vi.
- .
- Many new features have been added: multi level undo, syntax
- highlighting, command line history, on-line help, filename
- completion, block operations, folding, Unicode support, etc.
- .
- This package contains a version of vim compiled with TCL
- scripting support and the GTK2 GUI.
-
-Package: vim-gtk
-Priority: extra
-Architecture: any
-Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
-Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme
-Provides: gvim, editor
 Description: Vi IMproved - enhanced vi editor - with GTK2 GUI
  Vim is an almost compatible version of the UNIX editor Vi.
  .
@@ -190,8 +163,24 @@
  highlighting, command line history, on-line help, filename
  completion, block operations, folding, Unicode support, etc.
  .
+ This package contains a version of vim compiled with a GTK2 GUI
+ and support for scripting with Perl, Python, Ruby, and TCL.
+
+Package: vim-nox
+Priority: extra
+Architecture: any
+Depends: vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
+Suggests: cscope, vim-doc
+Provides: editor
+Description: Vi IMproved - enhanced vi editor
+ Vim is an almost compatible version of the UNIX editor Vi.
+ .
+ Many new features have been added: multi level undo, syntax
+ highlighting, command line history, on-line help, filename
+ completion, block operations, folding, Unicode support, etc.
+ .
  This package contains a version of vim compiled with support for
- GTK2 GUI.
+ scripting with Perl, Python, Ruby, and TCL but no GUI.
 
 Package: vim-lesstif
 Priority: extra
@@ -206,13 +195,15 @@
  highlighting, command line history, on-line help, filename
  completion, block operations, folding, Unicode support, etc.
  .
- This package contains a version of vim compiled with support for
- LessTif GUI.
+ This package contains a version of vim compiled with a LessTif GUI
+ and support for scripting with Perl, Python, Ruby, and TCL.
 
 Package: vim-gnome
 Priority: extra
 Architecture: any
 Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
+Conflicts: vim-full (<< 1:7.1-135+1)
+Replaces: vim-full (<< 1:7.1-135+1)
 Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme
 Provides: gvim, editor
 Description: Vi IMproved - enhanced vi editor - with GNOME2 GUI
@@ -222,22 +213,13 @@
  highlighting, command line history, on-line help, filename
  completion, block operations, folding, Unicode support, etc.
  .
- This package contains a version of vim compiled with support for
- GNOME2 GUI.
+ This package contains a version of vim compiled with a GNOME2 GUI
+ and support for scripting with Perl, Python, Ruby, and TCL.
 
 Package: vim-full
 Priority: extra
-Architecture: any
-Depends: vim-gui-common (= ${source:Version}), vim-common (= ${binary:Version}), vim-runtime (= ${source:Version}), ${shlibs:Depends}
-Suggests: cscope, vim-doc, ttf-bitstream-vera, gnome-icon-theme
-Provides: gvim, editor
-Description: Vi IMproved - enhanced vi editor - full fledged version
- Vim is an almost compatible version of the UNIX editor Vi.
- .
- Many new features have been added: multi level undo, syntax
- highlighting, command line history, on-line help, filename
- completion, block operations, folding, Unicode support, etc.
- .
- This package contains a version of vim compiled with support for
- the GNOME2 GUI and scripting support for Perl, Python, Ruby, and
- TCL.
+Architecture: all
+Depends: vim-gnome (>= 1:7.1-135+1)
+Provides: gvim, editor
+Description: Vi IMproved - enhanced vi editor (transitional package)
+ This package is simply a transitional package from vim-full to vim-gnome.

Modified: trunk/packages/vim/debian/rules
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/rules?rev=1054&op=diff
==============================================================================
--- trunk/packages/vim/debian/rules (original)
+++ trunk/packages/vim/debian/rules Sun Oct  7 16:37:49 2007
@@ -46,45 +46,24 @@
 OPTFLAGS+=--with-features=huge
 OPTFLAGS+=--enable-multibyte
 
+NOXFLAGS+=--without-x
+NOXFLAGS+=--enable-gui=no
+
 GUIFLAGS+=--with-x
 GUIFLAGS+=--enable-xim
 GUIFLAGS+=--enable-fontset
+
 GTK2FLAGS+=--enable-gui=gtk2
-GTK2FLAGS+=--with-features=big
 
 GNOMEFLAGS+=--enable-gui=gnome2
 
 LESSTIFFLAGS+=--enable-gui=motif
 
-PERLFLAGS+=--enable-perlinterp
-PERLFLAGS+=--disable-mzschemeinterp
-PERLFLAGS+=--disable-pythoninterp
-PERLFLAGS+=--disable-rubyinterp
-PERLFLAGS+=--disable-tclinterp
-
-PYTHONFLAGS+=--enable-pythoninterp
-PYTHONFLAGS+=--disable-mzschemeinterp
-PYTHONFLAGS+=--disable-perlinterp
-PYTHONFLAGS+=--disable-rubyinterp
-PYTHONFLAGS+=--disable-tclinterp
-
-RUBYFLAGS+=--enable-rubyinterp
-RUBYFLAGS+=--disable-mzschemeinterp
-RUBYFLAGS+=--disable-perlinterp
-RUBYFLAGS+=--disable-pythoninterp
-RUBYFLAGS+=--disable-tclinterp
-
-TCLFLAGS+=--enable-tclinterp
-TCLFLAGS+=--disable-mzschemeinterp
-TCLFLAGS+=--disable-perlinterp
-TCLFLAGS+=--disable-pythoninterp
-TCLFLAGS+=--disable-rubyinterp
-
-BASICFLAGS+=--disable-mzschemeinterp
-BASICFLAGS+=--disable-tclinterp
-BASICFLAGS+=--disable-perlinterp
-BASICFLAGS+=--disable-pythoninterp
-BASICFLAGS+=--disable-rubyinterp
+NOINTERPFLAGS+=--disable-mzschemeinterp
+NOINTERPFLAGS+=--disable-tclinterp
+NOINTERPFLAGS+=--disable-perlinterp
+NOINTERPFLAGS+=--disable-pythoninterp
+NOINTERPFLAGS+=--disable-rubyinterp
 
 ALLINTERPFLAGS+=--disable-mzschemeinterp
 ALLINTERPFLAGS+=--enable-perlinterp
@@ -102,25 +81,17 @@
 # vim-basic must be the last one
 ifneq ($(DEB_HOST_GNU_SYSTEM),gnu)
 	VARIANTS+=vim-tiny
-	VARIANTS+=vim-ruby
-	VARIANTS+=vim-tcl
 	VARIANTS+=vim-gtk
+	VARIANTS+=vim-gnome
 	VARIANTS+=vim-lesstif
-	VARIANTS+=vim-perl
-	VARIANTS+=vim-python
-	VARIANTS+=vim-gnome
-	VARIANTS+=vim-full
+	VARIANTS+=vim-nox
 	VARIANTS+=vim-basic
 else
 	VARIANTS+=vim-tiny
-	VARIANTS+=vim-ruby
 	VARIANTS+=vim-gtk
-	VARIANTS+=vim-python
+	VARIANTS_SKIP+=vim-gnome
 	VARIANTS+=vim-lesstif
-	VARIANTS_SKIP+=vim-perl
-	VARIANTS_SKIP+=vim-gnome
-	VARIANTS_SKIP+=vim-tcl
-	VARIANTS_SKIP+=vim-full
+	VARIANTS+=vim-nox
 	VARIANTS+=vim-basic
 endif
 ifeq ($(origin VARIANT), command line)
@@ -128,34 +99,22 @@
 endif
 
 CFLAGS_vim-basic=$(CFLAGS)
-CFGFLAGS_vim-basic=$(CFGFLAGS) $(OPTFLAGS) --without-x --enable-gui=no
+CFGFLAGS_vim-basic=$(CFGFLAGS) $(OPTFLAGS) $(NOXFLAGS) $(NOINTERPFLAGS)
 
 CFLAGS_vim-tiny=$(CFLAGS)
 CFGFLAGS_vim-tiny=$(CFGFLAGS) $(TINYFLAGS)
 
-CFLAGS_vim-perl=$(CFLAGS)
-CFGFLAGS_vim-perl=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(PERLFLAGS) $(GTK2FLAGS)
-
-CFLAGS_vim-python=$(CFLAGS)
-CFGFLAGS_vim-python=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(PYTHONFLAGS) $(GTK2FLAGS)
-
-CFLAGS_vim-ruby=$(CFLAGS)
-CFGFLAGS_vim-ruby=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(RUBYFLAGS) $(GTK2FLAGS)
-
-CFLAGS_vim-tcl=$(CFLAGS)
-CFGFLAGS_vim-tcl=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(TCLFLAGS) $(GTK2FLAGS)
-
 CFLAGS_vim-gtk=$(CFLAGS)
-CFGFLAGS_vim-gtk=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(BASICFLAGS) $(GTK2FLAGS)
+CFGFLAGS_vim-gtk=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(GTKFLAGS) $(ALLINTERPFLAGS)
 
 CFLAGS_vim-gnome=$(CFLAGS)
-CFGFLAGS_vim-gnome=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(BASICFLAGS) $(GNOMEFLAGS)
+CFGFLAGS_vim-gnome=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(GNOMEFLAGS) $(ALLINTERPFLAGS)
 
 CFLAGS_vim-lesstif=$(CFLAGS)
-CFGFLAGS_vim-lesstif=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(BASICFLAGS) $(LESSTIFFLAGS)
-
-CFLAGS_vim-full=$(CFLAGS)
-CFGFLAGS_vim-full=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(GNOMEFLAGS) $(ALLINTERPFLAGS)
+CFGFLAGS_vim-lesstif=$(CFGFLAGS) $(OPTFLAGS) $(GUIFLAGS) $(LESSTIFFLAGS) $(ALLINTERPFLAGS)
+
+CFLAGS_vim-nox=$(CFLAGS)
+CFGFLAGS_vim-nox=$(CFGFLAGS) $(OPTFLAGS) $(NOXFLAGS) $(ALLINTERPFLAGS)
 
 NAME=vim
 VERSION=7.1
@@ -298,6 +257,8 @@
 install-stamp: $(foreach v,$(VARIANTS),install-stamp-$(v))
 	dh_testdir
 	dh_testroot
+	dh_installchangelogs -pvim-python -pvim-perl -pvim-ruby -pvim-tcl
+	dh_installdocs -pvim-python -pvim-perl -pvim-ruby -pvim-tcl
 	touch $@
 
 install-stamp-vim-basic: export DH_OPTIONS=-pvim-runtime -pvim-common -pvim-gui-common -pvim -pvim-doc
@@ -438,10 +399,10 @@
 	dh_clean -k
 	dh_installdirs
 	
-	 # variant-related installations
-	 # to be kept in sync with those in "install-stamp-vim-basic" target
+	# variant-related installations
+	# to be kept in sync with those in "install-stamp-vim-basic" target
 	for x in $(PER_VARIANT_FILES) ; do \
-	  if [ "$*" = "vim-tiny" ]; then \
+	  if [ "$*" = "vim-tiny" -o "$*" = "vim-nox" ]; then \
 	    sed -e "s:@PKG@:$*:" -e "s:@VARIANT@:$(patsubst vim-%,%,$*):" \
 	        -e "s:@DESTDIR@:$(SRCDIR)/src:" -e "s:@COMMON@:vim-common:" \
 	        debian/vim-variant.$$x > debian/$*.$$x ;\

Added: trunk/packages/vim/debian/vim-full.preinst
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/vim-full.preinst?rev=1054&op=file
==============================================================================
--- trunk/packages/vim/debian/vim-full.preinst (added)
+++ trunk/packages/vim/debian/vim-full.preinst Sun Oct  7 16:37:49 2007
@@ -1,0 +1,47 @@
+#!/bin/bash -e
+
+pkg=vim-full
+variant=full
+
+# check_and_remove_alternative cleans up stale alternatives that were left
+# behind from previous mishandling of alternatives.
+check_and_remove_alternative () {
+  if update-alternatives --list $1 | grep -q 'bin/vim$'; then
+    for f in `update-alternatives --list $1 | grep 'bin/vim$'`; do
+      update-alternatives --remove $1 $f
+    done
+  fi
+}
+
+remove_gnome_alternative () {
+  if [ -f /usr/bin/vim.$variant ]; then
+    check_and_remove_alternative gnome-text-editor
+    update-alternatives --remove gnome-text-editor /usr/bin/vim.$variant
+  fi
+}
+
+remove_variant_alternative () {
+  for i in vi view ex editor rvim rview vimdiff vim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q vim/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+  remove_gui_variant_alternative
+}
+
+remove_gui_variant_alternative () {
+  for i in eview evim gview gvimdiff rgview rgvim gvim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q vim/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+}
+
+remove_gnome_alternative
+remove_variant_alternative
+
+#DEBHELPER#
+
+exit 0

Added: trunk/packages/vim/debian/vim-perl.preinst
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/vim-perl.preinst?rev=1054&op=file
==============================================================================
--- trunk/packages/vim/debian/vim-perl.preinst (added)
+++ trunk/packages/vim/debian/vim-perl.preinst Sun Oct  7 16:37:49 2007
@@ -1,0 +1,39 @@
+#!/bin/bash -e
+
+pkg=vim-perl
+variant=perl
+
+# check_and_remove_alternative cleans up stale alternatives that were left
+# behind from previous mishandling of alternatives.
+check_and_remove_alternative () {
+  if update-alternatives --list $1 | grep -q bin/vim; then
+    for f in `update-alternatives --list $1 | grep 'bin/vim$'`; do
+      update-alternatives --remove $1 $f
+    done
+  fi
+}
+
+remove_variant_alternative () {
+  for i in vi view ex editor rvim rview vimdiff vim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q bin/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+  remove_gui_variant_alternative
+}
+
+remove_gui_variant_alternative () {
+  for i in eview evim gview gvimdiff rgview rgvim gvim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q bin/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+}
+
+remove_variant_alternative
+
+#DEBHELPER#
+
+exit 0

Added: trunk/packages/vim/debian/vim-python.preinst
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/vim-python.preinst?rev=1054&op=file
==============================================================================
--- trunk/packages/vim/debian/vim-python.preinst (added)
+++ trunk/packages/vim/debian/vim-python.preinst Sun Oct  7 16:37:49 2007
@@ -1,0 +1,39 @@
+#!/bin/bash -e
+
+pkg=vim-python
+variant=python
+
+# check_and_remove_alternative cleans up stale alternatives that were left
+# behind from previous mishandling of alternatives.
+check_and_remove_alternative () {
+  if update-alternatives --list $1 | grep -q bin/vim; then
+    for f in `update-alternatives --list $1 | grep 'bin/vim$'`; do
+      update-alternatives --remove $1 $f
+    done
+  fi
+}
+
+remove_variant_alternative () {
+  for i in vi view ex editor rvim rview vimdiff vim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q bin/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+  remove_gui_variant_alternative
+}
+
+remove_gui_variant_alternative () {
+  for i in eview evim gview gvimdiff rgview rgvim gvim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q bin/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+}
+
+remove_variant_alternative
+
+#DEBHELPER#
+
+exit 0

Added: trunk/packages/vim/debian/vim-ruby.preinst
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/vim-ruby.preinst?rev=1054&op=file
==============================================================================
--- trunk/packages/vim/debian/vim-ruby.preinst (added)
+++ trunk/packages/vim/debian/vim-ruby.preinst Sun Oct  7 16:37:49 2007
@@ -1,0 +1,39 @@
+#!/bin/bash -e
+
+pkg=vim-ruby
+variant=ruby
+
+# check_and_remove_alternative cleans up stale alternatives that were left
+# behind from previous mishandling of alternatives.
+check_and_remove_alternative () {
+  if update-alternatives --list $1 | grep -q bin/vim; then
+    for f in `update-alternatives --list $1 | grep 'bin/vim$'`; do
+      update-alternatives --remove $1 $f
+    done
+  fi
+}
+
+remove_variant_alternative () {
+  for i in vi view ex editor rvim rview vimdiff vim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q bin/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+  remove_gui_variant_alternative
+}
+
+remove_gui_variant_alternative () {
+  for i in eview evim gview gvimdiff rgview rgvim gvim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q bin/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+}
+
+remove_variant_alternative
+
+#DEBHELPER#
+
+exit 0

Added: trunk/packages/vim/debian/vim-tcl.preinst
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/vim-tcl.preinst?rev=1054&op=file
==============================================================================
--- trunk/packages/vim/debian/vim-tcl.preinst (added)
+++ trunk/packages/vim/debian/vim-tcl.preinst Sun Oct  7 16:37:49 2007
@@ -1,0 +1,39 @@
+#!/bin/bash -e
+
+pkg=vim-tcl
+variant=tcl
+
+# check_and_remove_alternative cleans up stale alternatives that were left
+# behind from previous mishandling of alternatives.
+check_and_remove_alternative () {
+  if update-alternatives --list $1 | grep -q bin/vim; then
+    for f in `update-alternatives --list $1 | grep 'bin/vim$'`; do
+      update-alternatives --remove $1 $f
+    done
+  fi
+}
+
+remove_variant_alternative () {
+  for i in vi view ex editor rvim rview vimdiff vim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q bin/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+  remove_gui_variant_alternative
+}
+
+remove_gui_variant_alternative () {
+  for i in eview evim gview gvimdiff rgview rgvim gvim; do
+    check_and_remove_alternative $i
+    if update-alternatives --list $i | grep -q bin/vim.$variant; then
+      update-alternatives --remove $i /usr/bin/vim.$variant
+    fi
+  done
+}
+
+remove_variant_alternative
+
+#DEBHELPER#
+
+exit 0

Modified: trunk/packages/vim/debian/vim-variant.postinst
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/vim-variant.postinst?rev=1054&op=diff
==============================================================================
--- trunk/packages/vim/debian/vim-variant.postinst (original)
+++ trunk/packages/vim/debian/vim-variant.postinst Sun Oct  7 16:37:49 2007
@@ -35,7 +35,7 @@
               $mandir/man1/vim.1.gz
   done
   case "$variant" in
-    gtk|lesstif|perl|python|ruby|tcl|gnome|full) # gui enabled variants
+    gtk|gnome|lesstif) # gui enabled variants
       add_gui_variant_alternative $1
       ;;
   esac
@@ -63,17 +63,13 @@
 	add_variant_alternative 30
 	replace_dir_w_symlink /usr/share/doc/vim vim-common
 	;;
-      vim-gtk|vim-lesstif)
+      vim-nox)
 	add_variant_alternative 40
 	;;
-      vim-gnome) # gnome enabled variant
-	add_variant_alternative 40
-	add_gnome_alternative 40
-	;;
-      vim-perl|vim-python|vim-ruby|vim-tcl)
+      vim-gtk|vim-lesstif)
 	add_variant_alternative 50
 	;;
-      vim-full) # gnome enabled variant
+      vim-gnome) # gnome enabled variant
 	add_variant_alternative 60
 	add_gnome_alternative 45
 	;;

Modified: trunk/packages/vim/debian/vim-variant.prerm
URL: http://svn.debian.org/wsvn/pkg-vim/trunk/packages/vim/debian/vim-variant.prerm?rev=1054&op=diff
==============================================================================
--- trunk/packages/vim/debian/vim-variant.prerm (original)
+++ trunk/packages/vim/debian/vim-variant.prerm Sun Oct  7 16:37:49 2007
@@ -31,7 +31,7 @@
     update-alternatives --remove $i /usr/bin/vim.$variant
   done
   case "$variant" in
-    gtk|lesstif|perl|python|ruby|tcl|gnome|full) # gui enabled variants
+    gtk|lesstif|gnome) # gui enabled variants
       remove_gui_variant_alternative
       ;;
   esac
@@ -47,7 +47,7 @@
 case "$1" in
   remove)
     case "$pkg" in
-      vim-gnome|vim-full) # gnome enabled variants
+      vim-gnome) # gnome enabled variants
         remove_gnome_alternative
 	;;
     esac




More information about the pkg-vim-maintainers mailing list