diff --git a/srcpkgs/vim/template b/srcpkgs/vim/template index 7ca03b6cb49..7331fff4d09 100644 --- a/srcpkgs/vim/template +++ b/srcpkgs/vim/template @@ -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 " 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 } } diff --git a/srcpkgs/xxd b/srcpkgs/xxd new file mode 120000 index 00000000000..7923f59d710 --- /dev/null +++ b/srcpkgs/xxd @@ -0,0 +1 @@ +vim \ No newline at end of file