From 6c5c865fa6674610732dd8427bf8f09f3c166299 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 19 Oct 2011 23:14:52 +0000 Subject: Wed Oct 19 23:14:52 UTC 2011 --- extra/vim/PKGBUILD | 72 +++++++++++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 39 deletions(-) (limited to 'extra/vim/PKGBUILD') diff --git a/extra/vim/PKGBUILD b/extra/vim/PKGBUILD index 3976d4666..4de38ffec 100644 --- a/extra/vim/PKGBUILD +++ b/extra/vim/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 139129 2011-09-30 05:59:05Z eric $ +# $Id: PKGBUILD 140768 2011-10-18 23:20:38Z eric $ # Contributor: Jan "heftig" Steffens # Maintainer: tobias [ tobias at archlinux org ] # Maintainer: Daniel J Griffiths @@ -6,55 +6,53 @@ pkgbase=vim pkgname=('vim' 'gvim' 'vim-runtime') _topver=7.3 -_patchlevel=322 +_patchlevel=338 +__hgrev=f530aef0d959 +_versiondir="vim${_topver//./}" pkgver=${_topver}.${_patchlevel} -__hgrev=5e84f6567623 pkgrel=1 arch=('i686' 'x86_64') license=('custom:vim') url="http://www.vim.org" -makedepends=('gawk' 'gpm' 'python2' 'python' 'ruby' 'libxt' 'desktop-file-utils' 'gtk2' - 'mercurial' 'rsync') -source=(pythoncomplete.vim::http://www.vim.org/scripts/download_script.php\?src_id=10872 +makedepends=('gpm' 'python2' 'python' 'ruby' 'libxt' 'desktop-file-utils' 'gtk2') +source=(ftp://ftp.archlinux.org/other/vim/${pkgname}-${pkgver}.tar.xz + pythoncomplete.vim::http://www.vim.org/scripts/download_script.php\?src_id=10872 vimrc archlinux.vim gvim.desktop) -md5sums=('6e7adfbd5d26c1d161030ec203a7f243' +md5sums=('fc83d6580fd8441793fccfd26487aadb' + '6e7adfbd5d26c1d161030ec203a7f243' 'e57777374891063b9ca48a1fe392ac05' '10353a61aadc3f276692d0e17db1478e' 'd90413bd21f400313a785bb4010120cd') -__hgroot='http://vim.googlecode.com/hg/' -__hgrepo='vim' -__hgbranch='default' +# source PKGBUILD && mksource +mksource() { -_versiondir="vim${_topver//./}" + [[ -x /usr/bin/hg ]] || (echo "hg not found. Install mercurial." && return 1) -##### Build ##### + __hgroot='http://vim.googlecode.com/hg/' + __hgrepo='vim' + __hgbranch='default' -build() { - cd "${srcdir}" - - msg2 'Checking out source from Mercurial...' - - if [[ -d ${__hgrepo} ]]; then - cd ${__hgrepo} - hg pull -b ${__hgbranch}|| warning 'hg pull failed!' - hg update -r ${__hgrev} - else - hg clone -b ${__hgbranch} -u ${__hgrev} "${__hgroot}${__hgrepo}" ${__hgrepo} - cd ${__hgrepo} - fi + hg clone -b ${__hgbranch} -u ${__hgrev} "${__hgroot}${__hgrepo}" ${__hgrepo} + pushd ${__hgrepo} if (( $(hg id -n) < $(hg id -nr ${__hgbranch}) )); then - warning 'You are not building the latest revision!' - warning "Consider updating __hgrev to $(hg id -r ${__hgbranch})." - sleep 10 + printf 'You are not building the latest revision!\n' + printf "Consider updating __hgrev to $(hg id -r ${__hgbranch}).\n" fi + popd - cd .. - rm -rf vim-build gvim-build - rsync -a --exclude='.hg/' ${__hgrepo}/ vim-build + mv vim ${pkgname}-${pkgver} + find ${pkgname}-${pkgver} -depth -type d -name .hg -exec rm -rf {} \; + rm ${pkgname}-${pkgver}/{.hgignore,.hgtags} + tar -cJf ${pkgname}-${pkgver}.tar.xz ${pkgname}-${pkgver}/* + rm -r ${pkgname}-${pkgver} +} + +build() { + cd "${srcdir}" - msg2 'Patching...' + cp -a ${pkgname}-${pkgver} vim-build # define the place for the global (g)vimrc file (set to /etc/vimrc) sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' \ @@ -66,8 +64,6 @@ build() { vim-build/src/configure.in (cd vim-build/src && autoconf) - msg2 'Building...' - cp -a vim-build gvim-build cd "${srcdir}"/vim-build @@ -93,8 +89,6 @@ build() { make } -##### Packaging ##### - package_vim() { pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor' depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm') @@ -118,7 +112,7 @@ package_vim() { rm -r "${pkgdir}"/usr/share/vim # license - install -Dm644 "${srcdir}"/vim/runtime/doc/uganda.txt \ + install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/doc/uganda.txt \ "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt } @@ -152,7 +146,7 @@ package_gvim() { install -Dm644 runtime/vim48x48.png "${pkgdir}"/usr/share/pixmaps/gvim.png # license - install -Dm644 "${srcdir}"/vim/runtime/doc/uganda.txt \ + install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/doc/uganda.txt \ "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt } @@ -189,7 +183,7 @@ package_vim-runtime() { "${pkgdir}"/usr/share/vim/vimfiles/archlinux.vim # rgb.txt file - install -Dm644 "${srcdir}"/vim/runtime/rgb.txt \ + install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/rgb.txt \ "${pkgdir}"/usr/share/vim/${_versiondir}/rgb.txt # license -- cgit v1.2.3-54-g00ecf