[arch-commits] Commit in haskell-parsec/trunk (PKGBUILD)
Sergej Pupykin
spupykin at archlinux.org
Tue Jan 13 10:58:12 UTC 2015
Date: Tuesday, January 13, 2015 @ 11:58:11
Author: spupykin
Revision: 125869
upgpkg: haskell-parsec 3.1.7-4
upd
Modified:
haskell-parsec/trunk/PKGBUILD
----------+
PKGBUILD | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2015-01-13 10:58:08 UTC (rev 125868)
+++ PKGBUILD 2015-01-13 10:58:11 UTC (rev 125869)
@@ -3,13 +3,13 @@
_hkgname=parsec
pkgname=haskell-parsec
pkgver=3.1.7
-pkgrel=3
+pkgrel=4
pkgdesc="Monadic parser combinators"
url="http://hackage.haskell.org/package/${_hkgname}"
license=('custom:BSD3')
arch=('i686' 'x86_64')
options=('staticlibs')
-depends=('ghc=7.8.4-1' 'sh' 'haskell-mtl=2.1.3.1-4' 'haskell-text=1.2.0.3-2')
+depends=('ghc' 'sh' 'haskell-mtl' 'haskell-text')
source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
install=${pkgname}.install
md5sums=('752664d7762bad11b46a392119658016')
@@ -33,9 +33,22 @@
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
}
+_update_deps() {
+ _ver=`pacman -Q $1 | cut -f2 -d\ | cut -f1 -d-`
+ for i in `seq 0 $(expr ${#depends[@]} - 1)`; do
+ if [ ${depends[$i]} == $1 ]; then
+ depends[$i]="$1=${_ver}"
+ fi
+ done
+}
+
package() {
cd ${_hkgname}-${pkgver}
+ _update_deps ghc
+ _update_deps haskell-mtl
+ _update_deps haskell-text
+
install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${pkgname}/register.sh
install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${pkgname}/unregister.sh
More information about the arch-commits
mailing list