[arch-commits] Commit in vim/trunk (PKGBUILD)

Anatol Pomozov anatolik at archlinux.org
Wed Nov 19 00:41:35 UTC 2014


    Date: Wednesday, November 19, 2014 @ 01:41:35
  Author: anatolik
Revision: 226373

upgpkg: vim 7.4.516-1

Modified:
  vim/trunk/PKGBUILD

----------+
 PKGBUILD |   87 +++++++++++++++++++++++++------------------------------------
 1 file changed, 36 insertions(+), 51 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-11-18 22:14:19 UTC (rev 226372)
+++ PKGBUILD	2014-11-19 00:41:35 UTC (rev 226373)
@@ -5,9 +5,10 @@
 
 pkgbase=vim
 pkgname=('vim-minimal' 'vim' 'vim-python3' 'gvim' 'gvim-python3' 'vim-runtime')
+# list of tags can be found at https://code.google.com/p/vim/source/list
 _topver=7.4
-_patchlevel=473
-__hgrev=48540909aba2
+_patchlevel=516
+_tag=v${_topver/./-}-${_patchlevel}
 _versiondir="vim${_topver//./}"
 pkgver=${_topver}.${_patchlevel}
 pkgrel=1
@@ -14,62 +15,44 @@
 arch=('i686' 'x86_64')
 license=('custom:vim')
 url="http://www.vim.org"
-makedepends=('gpm' 'python2' 'python' 'ruby' 'libxt' 'desktop-file-utils' 'gtk2' 'lua')
-source=("ftp://ftp.archlinux.org/other/vim/vim-${pkgver}.tar.xz"
-        "ftp://ftp.archlinux.org/other/vim/vim-${pkgver}.tar.xz.sig"
+makedepends=('gpm' 'python2' 'python' 'ruby' 'libxt' 'desktop-file-utils' 'gtk2' 'lua' 'mercurial')
+# It would be great to use downloadable archives https://vim.googlecode.com/archive/$tag.tar.gz
+# unfortunately its content changes each time you download one (files modification date is different)
+source=("${pkgbase}-repo::hg+https://vim.googlecode.com/hg#tag=${_tag}"
         'vimrc'
         'archlinux.vim'
         'gvim.desktop')
-md5sums=('f40c51bd44fa712c7922a108d1291865'
-         'SKIP'
-         'b9d4dcb9d3ee2e151dc4be1e94934f6a'
-         'f3c8931847a12949bdd14c9d48fdabb3'
-         'd90413bd21f400313a785bb4010120cd')
+sha1sums=('SKIP'
+          '15ebf3f48693f1f219fe2d8edb7643683139eb6b'
+          '94f7bb87b5d06bace86bc4b3ef1372813b4eedf2'
+          '4a579cf66590d711f49c5dfb4a25e5df116ff7ba')
 
-# source PKGBUILD && mksource
-mksource() {
-  set -e
+prepare() {
+  cd ${pkgbase}-repo
 
-  [[ -x /usr/bin/hg ]] || (echo "hg not found. Install mercurial." && return 1)
-
-  __hgroot='http://vim.googlecode.com/hg/'
-  __hgrepo='vim'
-  __hgbranch='default'
-
-  hg clone -b ${__hgbranch} -u ${__hgrev} "${__hgroot}${__hgrepo}" ${__hgrepo}
-
-  pushd ${__hgrepo}
-  if (( $(hg id -n) < $(hg id -nr ${__hgbranch}) )); then
+  _latesttag=$(hg parents --template '{latesttag}' -r default)
+  if (( $_tag != $_latesttag )); then
     printf 'You are not building the latest revision!\n'
-    printf "Consider updating __hgrev to $(hg id -r ${__hgbranch}).\n"
+    printf "Consider updating to tag $_latesttag.\n"
+    exit 1
   fi
-  popd
 
-  (cd vim/src && autoconf)
-
-  mv vim ${pkgbase}-${pkgver}
-  find ${pkgbase}-${pkgver} -depth -type d -name .hg -exec rm -rf {} \;
-  rm ${pkgbase}-${pkgver}/{.hgignore,.hgtags}
-  tar -cJf ${pkgbase}-${pkgver}.tar.xz ${pkgbase}-${pkgver}/*
-  rm -r ${pkgbase}-${pkgver}
-
-  gpg --detach-sign ${pkgbase}-${pkgver}.tar.xz
-
-  scp ${pkgbase}-${pkgver}.tar.xz* nym:/srv/ftp/other/vim/
-}
-
-build() {
   # define the place for the global (g)vimrc file (set to /etc/vimrc)
   sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' \
-    ${pkgbase}-${pkgver}/src/feature.h
+    src/feature.h
   sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' \
-    ${pkgbase}-${pkgver}/src/feature.h
+    src/feature.h
 
+  (cd src && autoconf)
+
+  cd ..
   for pkg in ${pkgname[@]}
   do
-    cp -a ${pkgbase}-${pkgver} ${pkg}-build
+    cp -a ${pkgbase}-repo ${pkg}-build
   done
+}
 
+build() {
   cd "${srcdir}"/vim-minimal-build
 
   ./configure \
@@ -195,7 +178,7 @@
 
 package_vim-minimal() {
   pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor (with a minimal set of dependencies)'
-  depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm')
+  depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'acl')
   conflicts=('vim' 'vim-python3' 'gvim' 'gvim-python3')
   provides=("vim=${pkgver}-${pkgrel}")
 
@@ -217,13 +200,13 @@
   rm -r "${pkgdir}"/usr/share/vim
 
   # license
-  install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/doc/uganda.txt \
+  install -Dm644 runtime/doc/uganda.txt \
     "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
 }
 
 package_vim() {
   pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor (with support for additional scripting languages)'
-  depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'ruby' 'lua' 'python2')
+  depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'ruby' 'lua' 'python2' 'acl')
   conflicts=('vim-minimal' 'vim-python3' 'gvim' 'gvim-python3')
 
   cd "${srcdir}"/vim-build
@@ -244,13 +227,13 @@
   rm -r "${pkgdir}"/usr/share/vim
 
   # license
-  install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/doc/uganda.txt \
+  install -Dm644 runtime/doc/uganda.txt \
     "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
 }
 
 package_vim-python3() {
   pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor (with support for additional scripting languages)'
-  depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'ruby' 'lua' 'python')
+  depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'ruby' 'lua' 'python' 'acl')
   conflicts=('vim-minimal' 'vim' 'gvim' 'gvim-python3')
   provides=("vim=${pkgver}-${pkgrel}")
 
@@ -272,7 +255,7 @@
   rm -r "${pkgdir}"/usr/share/vim
 
   # license
-  install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/doc/uganda.txt \
+  install -Dm644 runtime/doc/uganda.txt \
     "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
 }
 
@@ -306,7 +289,7 @@
   install -Dm644 runtime/vim48x48.png "${pkgdir}"/usr/share/pixmaps/gvim.png
 
   # license
-   install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/doc/uganda.txt \
+   install -Dm644 runtime/doc/uganda.txt \
     "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
 }
 
@@ -341,7 +324,7 @@
   install -Dm644 runtime/vim48x48.png "${pkgdir}"/usr/share/pixmaps/gvim.png
 
   # license
-   install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/doc/uganda.txt \
+   install -Dm644 runtime/doc/uganda.txt \
     "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
 }
 
@@ -350,6 +333,8 @@
   depends=('perl' 'gawk')
   backup=('etc/vimrc')
 
+  cd "${srcdir}"/vim-runtime-build
+
   # Install the runtime split from gvim
   install -dm755 "${pkgdir}"/usr/share
   mv "${srcdir}"/runtime-install "${pkgdir}"/usr/share/vim
@@ -374,7 +359,7 @@
     "${pkgdir}"/usr/share/vim/vimfiles/archlinux.vim
 
   # rgb.txt file
-  install -Dm644 "${srcdir}"/vim-${pkgver}/runtime/rgb.txt \
+  install -Dm644 runtime/rgb.txt \
     "${pkgdir}"/usr/share/vim/${_versiondir}/rgb.txt
 
   # license


More information about the arch-commits mailing list