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

Sergej Pupykin spupykin at archlinux.org
Mon Mar 30 10:56:11 UTC 2015


    Date: Monday, March 30, 2015 @ 12:56:11
  Author: spupykin
Revision: 130246

upgpkg: haskell-mtl 2.2.1-1

upd

Modified:
  haskell-mtl/trunk/PKGBUILD

----------+
 PKGBUILD |   19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-03-30 10:30:44 UTC (rev 130245)
+++ PKGBUILD	2015-03-30 10:56:11 UTC (rev 130246)
@@ -2,17 +2,17 @@
 
 _hkgname=mtl
 pkgname=haskell-mtl
-pkgver=2.1.3.1
-pkgrel=4
+pkgver=2.2.1
+pkgrel=1
 pkgdesc="Monad classes, using functional dependencies"
 url="http://hackage.haskell.org/package/${_hkgname}"
 license=('custom:BSD3')
 arch=('i686' 'x86_64')
 options=('staticlibs')
-depends=('ghc=7.8.4-1' 'sh')
+depends=('ghc' 'sh')
 source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
 install=${pkgname}.install
-md5sums=('8f3927677bf3e0efb6fcce08b1be2eac')
+md5sums=('96a2f12b94ea8d7cb0aea999cd2e3802')
 
 build() {
   cd ${_hkgname}-${pkgver}
@@ -33,7 +33,18 @@
   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() {
+  _update_deps ghc
+
   cd ${_hkgname}-${pkgver}
 
   install -D -m744 register.sh   ${pkgdir}/usr/share/haskell/${pkgname}/register.sh



More information about the arch-commits mailing list