vim: update to 7.4.909. refactor to use alternatives.

- vim-* packages and gvim only provide the binary (via vim alternative)
- scripts, links and manpages are provided by vim-common (which
  provides vi alternative)
- xxd is split into its own package
- install custom LICENSE
- clarify vim-x11 description
This commit is contained in:
Christian Neukirchen 2015-11-05 14:34:45 +01:00
parent 7c485698eb
commit f8961cca62
2 changed files with 43 additions and 23 deletions

View file

@ -1,6 +1,6 @@
# Template file for 'vim'
pkgname=vim
version=7.4.889
version=7.4.909
revision=1
hostmakedepends="pkg-config"
makedepends="ncurses-devel acl-devel libXt-devel gtk+-devel perl
@ -9,16 +9,18 @@ depends="vim-common>=$version"
short_desc="Vim editor (vi clone)"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.vim.org"
license="GPL-2"
license="Vim"
distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=b4247eb470e965a5fc08989b26ad30998b7f3efce1d5a5001b85666ee26ee4f3
checksum=28700a535f36a89be8b0c8ca430b022a8047c52c0cb1b7655d4250dc1ba57472
subpackages="vim-common vim-x11 gvim"
subpackages="xxd vim-common vim-x11 gvim"
# XXX vim-huge cannot be cross compiled for now.
if [ -z "$CROSS_BUILD" ]; then
subpackages+=" vim-huge vim-huge-python3"
fi
alternatives="vim:vim:/usr/bin/vim-normal"
pre_configure() {
for f in ${subpackages/vim-common/}; do
mkdir -p /tmp/${f}
@ -85,19 +87,36 @@ do_build() {
do_install() {
make DESTDIR=$DESTDIR install
vlicense runtime/doc/uganda.txt LICENSE
mv ${DESTDIR}/usr/bin/vim ${DESTDIR}/usr/bin/vim-normal
# Create vim-ex symlink.
cd ${DESTDIR}/usr/bin
ln -sf vim vim-ex
rm -f ${DESTDIR}/usr/bin/{ex,view}
find ${DESTDIR}/usr/share/man -type f -name evim.1 -delete
}
vim-common_package() {
short_desc+=" - common files"
depends="xxd"
noarch=yes
replaces="vim<=7.2_2"
alternatives="
vi:ex:/usr/bin/vim
vi:ex.1:/usr/share/man/man1/vim.1
vi:vi:/usr/bin/vim
vi:vi.1:/usr/share/man/man1/vim.1
vi:view:/usr/bin/vim
vi:view.1:/usr/share/man/man1/vim.1
"
pkg_install() {
vmove usr/bin/rvim
vmove usr/bin/vim-ex
vmove usr/bin/vimdiff
vmove usr/bin/vimtutor
vmove usr/bin/*view
vmove "usr/share/man/man1/*vim*"
vmove usr/share/licenses
vmove usr/share/vim
vinstall ${FILESDIR}/vimrc 644 usr/share/vim
}
@ -105,18 +124,17 @@ vim-common_package() {
vim-x11_package() {
depends="vim-common-${version}_${revision}"
provides="vim-${version}_${revision}"
replaces="vim>=0"
short_desc+=" - X11 version"
short_desc+=" - with access to X11 selection"
alternatives="vim:vim:/usr/bin/vim-x11"
pkg_install() {
cd $wrksrc/vim-x11
make DESTDIR=$PKGDESTDIR install
rm -f $PKGDESTDIR/usr/bin/{ex,view}
rm -rf $PKGDESTDIR/usr/share/vim
vbin $wrksrc/vim-x11/src/vim vim-x11
}
}
gvim_package() {
depends="vim-common-${version}_${revision} desktop-file-utils hicolor-icon-theme"
provides="vim-${version}_${revision}"
short_desc+=" - GTK+ GUI"
alternatives="vim:vim:/usr/bin/gvim"
pkg_install() {
cd $wrksrc/gvim
sed -i "s|/locolor|/hicolor|g" src/Makefile
@ -131,23 +149,24 @@ vim-huge_package() {
depends="python vim-common-${version}_${revision}"
short_desc+=" - Huge (all features enabled, using Python 2)"
provides="vim-${version}_${revision}"
replaces="vim>=0"
alternatives="vim:vim:/usr/bin/vim-huge"
pkg_install() {
cd $wrksrc/vim-huge
make DESTDIR=$PKGDESTDIR install
rm -f $PKGDESTDIR/usr/bin/{ex,view}
rm -rf $PKGDESTDIR/usr/share/vim
vbin $wrksrc/vim-huge/src/vim vim-huge
}
}
vim-huge-python3_package() {
depends="python3.4 vim-common-${version}_${revision}"
short_desc+=" - Huge (all features enabled, using Python 3)"
provides="vim-${version}_${revision}"
replaces="vim>=0"
alternatives="vim:vim:/usr/bin/vim-huge-python3"
pkg_install() {
cd $wrksrc/vim-huge-python3
make DESTDIR=$PKGDESTDIR install
rm -f $PKGDESTDIR/usr/bin/{ex,view}
rm -rf $PKGDESTDIR/usr/share/vim
vbin $wrksrc/vim-huge-python3/src/vim vim-huge-python3
}
}
xxd_package() {
short_desc="Make a hexdump or do the reverse"
pkg_install() {
vmove usr/bin/xxd
vmove usr/share/man/man1/xxd.1
}
}

1
srcpkgs/xxd Symbolic link
View file

@ -0,0 +1 @@
vim