Created
May 16, 2010 20:59
-
-
Save heftig/403163 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /var/abs/extra/vim/PKGBUILD 2010-05-16 06:07:08.000000000 +0200 | |
+++ PKGBUILD 2010-05-16 22:31:54.481261805 +0200 | |
@@ -4,9 +4,8 @@ | |
pkgbase=vim | |
pkgname=(vim gvim vim-runtime) | |
-_srcver=7.2 | |
-__hgrev=2150 | |
-pkgver=${_srcver}.${__hgrev} | |
+pkgver=7.2 | |
+__hgrev=e12b9d992389 | |
pkgrel=1 | |
arch=('i686' 'x86_64') | |
license=('custom:vim') | |
@@ -17,11 +16,13 @@ | |
vimrc archlinux.vim gvim.desktop) | |
md5sums=('6e7adfbd5d26c1d161030ec203a7f243' 'e57777374891063b9ca48a1fe392ac05' | |
'10353a61aadc3f276692d0e17db1478e' '2be104c0372dd6dae19cb7968c03cd4f') | |
+options=(force) | |
__hgroot='http://vim.googlecode.com/hg/' | |
__hgrepo='vim' | |
+__hgbranch='default' | |
-_versiondir="vim${_srcver//./}" | |
+_versiondir="vim${pkgver//./}" | |
##### Build ##### | |
@@ -31,11 +32,21 @@ | |
msg2 'Checking out source from Mercurial...' | |
if [[ -d ${__hgrepo} ]]; then | |
- ( cd ${__hgrepo}; hg pull; hg update -r ${__hgrev}) || return 1 | |
+ cd ${__hgrepo} | |
+ hg pull -b ${__hgbranch} || warning "hg pull failed!" | |
+ hg update -r ${__hgrev} || return 1 | |
else | |
- hg clone -u ${__hgrev} "${__hgroot}${__hgrepo}" ${__hgrepo} || return 1 | |
+ hg clone -b ${__hgbranch} -u ${__hgrev} "${__hgroot}${__hgrepo}" ${__hgrepo} || return 1 | |
+ cd ${__hgrepo} | |
fi | |
+ if (( $(hg id -n) < $(hg id -nr ${__hgbranch}) )); then | |
+ warning "You are not building the latest revision! | |
+ Consider updating: __hgrev=$(hg id -r ${__hgbranch})" | |
+ sleep 10 | |
+ fi | |
+ | |
+ cd .. | |
rm -rf vim-build gvim-build | |
rsync -a --exclude='.hg/' ${__hgrepo}/ vim-build || return 1 | |
@@ -78,7 +89,7 @@ | |
package_vim() { | |
pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor' | |
- depends=("vim-runtime=${pkgver}" 'gpm' 'perl') | |
+ depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'perl') | |
conflicts=('gvim') | |
cd ${srcdir}/vim-build | |
@@ -106,9 +117,9 @@ | |
package_gvim() { | |
pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor (with advanced features, such as a GUI)' | |
- depends=("vim-runtime=${pkgver}" 'gpm' 'perl' 'python' 'ruby' 'libxt' | |
+ depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'perl' 'python' 'ruby' 'libxt' | |
'desktop-file-utils' 'gtk2') | |
- provides=("vim=${pkgver}") | |
+ provides=("vim=${pkgver}-${pkgrel}") | |
conflicts=('vim') | |
install=gvim.install | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment