Tobias Kieslich wrote:
Ola;
After some time we used post_install magic to make the vim binary more
capable and some people complaining about vim not having x features
while gvim is not installed I decided to separate all packages. This
means we have a new layout of the packages:
* vi - serves vi binary only, ex, vidiff and the whole runtime. No
X-server capabilities, and it listens /etc/virc and ~/.virc only!
This is the only package that comes with base. vim moves to editors
* vim - X capabilities(can drag splits in xterms, runs as server
etc), Ruby,python and Perl-support. listens to
/etc/vimrc ~/.vimrc
* gvim - like vim but with gtk2 interface and listens to
/etc/gvimrc and ~/.gvimrc
The reason is that people complaint about missing X support in vim
sessions, and for some people the symlinks screwed
up.
-T
_______________________________________________
arch mailing list
[email protected]
http://archlinux.org/mailman/listinfo/arch
Attached is a patch with a couple of fixes...
- Change license field to 'custom:vim'
- Fix a couple of typos
- In *.install when calling pre_remove from pre_upgrade pass $2 (not $1)
- Use relative dirs in *.install (leave out the leading /)
(When using `pacman -r ...` the install script won't work or will use
the wrong copy of vim when absolute paths are used)
Andrew
diff -Naur testing/base/vi.old/PKGBUILD testing/base/vi/PKGBUILD
--- testing/base/vi.old/PKGBUILD 2007-08-01 20:43:04.000000000 +0100
+++ testing/base/vi/PKGBUILD 2007-08-04 03:24:04.000000000 +0100
@@ -8,7 +8,7 @@
pkgrel=1
pkgdesc="a highly configurable, improved version of the vi text editor (basic
version)"
arch=(i686 x86_64)
-license=(CUSTOUM)
+license=('custom:vim')
url="http://www.vim.org"
depends=('glibc' 'ncurses')
makedepends=('wget' 'sed' 'grep')
@@ -59,5 +59,5 @@
rm -f ${startdir}/pkg/usr/share/vim/gvimrc_example.vim
install -dm755 ${startdir}/pkg/usr/share/licenses/vim
cd ${startdir}/pkg/usr/share/licenses/vim
- ln -s ../../vim/doc/uganda.txt LICENSE
+ ln -s ../../vim/doc/uganda.txt license.txt
}
diff -Naur testing/base/vi.old/vi.install testing/base/vi/vi.install
--- testing/base/vi.old/vi.install 2007-07-10 01:26:29.000000000 +0100
+++ testing/base/vi/vi.install 2007-08-04 04:00:52.000000000 +0100
@@ -1,16 +1,15 @@
post_install() {
# if we have vim installed create view/rview symlinks to vim
- if [ ! -f /usr/bin/vim ] ; then
- OLDDIR=$(pwd)
- cd /usr/bin
+ if [ ! -f usr/bin/vim ] ; then
+ cd usr/bin
ln -s vi view
ln -s vi rview
- cd ${OLDDIR}
- echo "create vi relate symlinks..."
+ cd $OLDPWD
+ echo "Create vi related symlinks..."
fi
echo -n "Updating vi help tags..."
- /usr/bin/vi --noplugins -u NONE -U NONE \
- --cmd ":helptags /usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
+ usr/bin/vi --noplugins -u NONE -U NONE \
+ --cmd ":helptags usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
echo "done."
}
@@ -18,9 +17,9 @@
# if vi is a binary instead of a symlink we have an intact gvim installation
# with a different binary/symlink structure
# we recover what pacmans database knows about Vim
- if [ ! -f /usr/bin/vim ] ; then
- rm -f /usr/bin/view /usr/bin/rview
- echo "remove vi related symlinks ..."
+ if [ ! -f usr/bin/vim ] ; then
+ rm -f usr/bin/view usr/bin/rview
+ echo "Remove vi related symlinks ..."
fi
}
@@ -29,11 +28,11 @@
}
pre_upgrade() {
- pre_remove $1
+ pre_remove $2
}
-
op=$1
shift
+[ "$(type -t "$op")" = "function" ] && $op "$@"
-$op $*
+# vim:set ts=2 sw=2 et ft=sh:
diff -Naur testing/editors/vim.old/PKGBUILD testing/editors/vim/PKGBUILD
--- testing/editors/vim.old/PKGBUILD 2007-08-01 20:43:04.000000000 +0100
+++ testing/editors/vim/PKGBUILD 2007-08-04 03:29:17.000000000 +0100
@@ -8,7 +8,7 @@
pkgrel=1
pkgdesc="a highly configurable, improved version of the vi text editor"
arch=(i686 x86_64)
-license=(CUSTOUM)
+license=('custom:vim')
url="http://www.vim.org"
depends=('vi' 'perl' 'python' 'ruby' 'acl' 'gpm' 'libxt')
makedepends=('wget' 'sed' 'grep')
diff -Naur testing/editors/vim.old/vim.install testing/editors/vim/vim.install
--- testing/editors/vim.old/vim.install 2007-07-10 01:26:30.000000000 +0100
+++ testing/editors/vim/vim.install 2007-08-04 04:01:23.000000000 +0100
@@ -1,30 +1,28 @@
post_install() {
# if we have an existing gvim installation - relocate binaries and symlinks
- if [ -f /usr/bin/vim ] ; then
- OLDDIR=$(pwd)
- cd /usr/bin
+ if [ -f usr/bin/vim ] ; then
+ cd usr/bin
rm -f view rview
ln -s vim view
ln -s vim rview
- cd ${OLDDIR}
- echo "create vim related symlinks..."
+ cd $OLDPWD
+ echo "Create vim related symlinks..."
fi
echo -n "Updating vim help tags..."
- /usr/bin/vim --noplugins -u NONE -U NONE \
- --cmd ":helptags /usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
+ usr/bin/vim --noplugins -u NONE -U NONE \
+ --cmd ":helptags usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
echo "done."
}
pre_remove() {
- OLDDIR=$(pwd)
- cd /usr/bin
+ cd usr/bin
rm -f view rview
- if [ -f /usr/bin/vi ] ; then
+ if [ -f usr/bin/vi ] ; then
ln -s vi view
ln -s vi rview
- echo "create vi related symlinks..."
+ echo "Create vi related symlinks..."
fi
- cd ${OLDDIR}
+ cd $OLDPWD
}
post_upgrade() {
@@ -32,10 +30,11 @@
}
pre_upgrade() {
- pre_remove $1
+ pre_remove $2
}
op=$1
shift
+[ "$(type -t "$op")" = "function" ] && $op "$@"
-$op $*
+# vim:set ts=2 sw=2 et ft=sh:
diff -Naur testing/editors/gvim.old/PKGBUILD testing/editors/gvim/PKGBUILD
--- testing/editors/gvim.old/PKGBUILD 2007-08-01 20:43:04.000000000 +0100
+++ testing/editors/gvim/PKGBUILD 2007-08-04 03:30:00.000000000 +0100
@@ -8,7 +8,7 @@
pkgrel=1
pkgdesc="the vim text editor with advanced features enabled, such as a gui
mode"
arch=(i686 x86_64)
-license=('vim')
+license=('custom:vim')
url="http://www.vim.org"
depends=('vi>=${pkgver}' 'perl' 'python' 'ruby' 'acl' 'libxt' 'gtk2'
'desktop-file-utils')
makedepends=('pkgconfig')
diff -Naur testing/editors/gvim.old/gvim.install
testing/editors/gvim/gvim.install
--- testing/editors/gvim.old/gvim.install 2007-07-10 01:26:30.000000000
+0100
+++ testing/editors/gvim/gvim.install 2007-08-04 04:01:40.000000000 +0100
@@ -1,9 +1,9 @@
post_install() {
- echo "updating desktop and mime database..."
+ echo "Updating desktop and mime database..."
update-desktop-database -q
echo -n "Updating vim help tags..."
- /usr/bin/vim --noplugins -u NONE -U NONE \
- --cmd ":helptags /usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
+ usr/bin/vim --noplugins -u NONE -U NONE \
+ --cmd ":helptags usr/share/vim/doc" --cmd ":q" > /dev/null 2>&1
echo "done."
}
@@ -12,13 +12,13 @@
}
post_remove() {
- echo -n "update desktop and mime database..."
+ echo -n "Update desktop and mime database..."
update-desktop-database
echo "done."
}
op=$1
shift
+[ "$(type -t "$op")" = "function" ] && $op "$@"
-$op $*
-# vim: ft=sh
+# vim:set ts=2 sw=2 et ft=sh:
_______________________________________________
arch mailing list
[email protected]
http://archlinux.org/mailman/listinfo/arch