From 7a02bda149b07f2c4b2c02f266198f25a372e7ef Mon Sep 17 00:00:00 2001 From: Cedric Girard Date: Wed, 30 Mar 2011 10:31:39 +0200 Subject: [PATCH] Addition of git version of haskell-libmpd to support new GHC version in xmobar. Update of xmobar-git to use this new version. --- pkgbuild/haskell-libmpd-git/PKGBUILD | 54 +++++++++++++++++++ .../haskell-libmpd-git.install | 18 +++++++ pkgbuild/xmobar-git/PKGBUILD | 8 +-- 3 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 pkgbuild/haskell-libmpd-git/PKGBUILD create mode 100644 pkgbuild/haskell-libmpd-git/haskell-libmpd-git.install diff --git a/pkgbuild/haskell-libmpd-git/PKGBUILD b/pkgbuild/haskell-libmpd-git/PKGBUILD new file mode 100644 index 0000000..a025cc2 --- /dev/null +++ b/pkgbuild/haskell-libmpd-git/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: Cedric Girard +_hkgname=libmpd +pkgname=haskell-libmpd-git +pkgver=20110330 +pkgrel=1 +pkgdesc="An MPD client library, git version." +url="http://hackage.haskell.org/package/${_hkgname}" +license=('LGPL') +arch=('i686' 'x86_64') +makedepends=() +depends=('ghc' 'haskell-filepath=1.2.0.0' 'haskell-mtl=2.0.1.0' 'haskell-network=2.3.0.2' 'haskell-utf8-string<0.4') +conflicts=('haskell-libmpd') +provides=('haskell-libmpd') +options=('strip') +install=${pkgname}.install + +_gitroot="https://github.com/joachifm/libmpd-haskell.git" +_gitname="libmpd-haskell" +_archname="haskell-libmpd" + +build() { + cd ${srcdir}/ + msg "Connecting to GIT server...." + + if [ -d $_gitname ] ; then + cd $_gitname && git pull origin + msg "The local files are updated." + else + git clone $_gitroot $_gitname -b trunk + fi + + msg "GIT checkout done or server timeout" + msg "Starting make..." + + rm -rf "$srcdir/$_gitname-build" + git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" + cd "$srcdir/$_gitname-build" + + runhaskell Setup configure -O --enable-split-objs --enable-shared \ + --prefix=/usr --docdir=/usr/share/doc/${_archname} --libsubdir=\$compiler/site-local/\$pkgid + runhaskell Setup build + runhaskell Setup haddock + runhaskell Setup register --gen-script + runhaskell Setup unregister --gen-script + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh +} +package() { + cd "$srcdir/$_gitname-build" + install -D -m744 register.sh ${pkgdir}/usr/share/haskell/${_archname}/register.sh + install -m744 unregister.sh ${pkgdir}/usr/share/haskell/${_archname}/unregister.sh + install -d -m755 ${pkgdir}/usr/share/doc/ghc/html/libraries + ln -s /usr/share/doc/${_archname}/html ${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname} + runhaskell Setup copy --destdir=${pkgdir} +} diff --git a/pkgbuild/haskell-libmpd-git/haskell-libmpd-git.install b/pkgbuild/haskell-libmpd-git/haskell-libmpd-git.install new file mode 100644 index 0000000..8487668 --- /dev/null +++ b/pkgbuild/haskell-libmpd-git/haskell-libmpd-git.install @@ -0,0 +1,18 @@ +HS_DIR=usr/share/haskell/haskell-libmpd +post_install() { + ${HS_DIR}/register.sh + (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) +} +pre_upgrade() { + ${HS_DIR}/unregister.sh +} +post_upgrade() { + ${HS_DIR}/register.sh + (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) +} +pre_remove() { + ${HS_DIR}/unregister.sh +} +post_remove() { + (cd usr/share/doc/ghc/html/libraries; ./gen_contents_index) +} diff --git a/pkgbuild/xmobar-git/PKGBUILD b/pkgbuild/xmobar-git/PKGBUILD index 20996f6..0949e89 100644 --- a/pkgbuild/xmobar-git/PKGBUILD +++ b/pkgbuild/xmobar-git/PKGBUILD @@ -1,13 +1,12 @@ # Maintainer: Cedric Girard pkgname=xmobar-git -pkgver=20110314 +pkgver=20110330 pkgrel=1 pkgdesc="A minimal status bar for the XMonad Window Manager" arch=('i686' 'x86_64') url="http://projects.haskell.org/xmobar/" license=('custom:BSD3') -makedepends=('ghc' 'haskell-x11>=1.3.0' 'haskell-bytestring=0.9.1.10' 'haskell-containers=0.4.0.0' 'haskell-directory=1.1.0.0' 'haskell-filepath=1.2.0.0' 'haskell-mtl=2.0.1.0' 'haskell-old-locale=1.0.0.2' 'haskell-old-time=1.0.0.6' 'haskell-parsec=3.1.1' -'haskell-process=1.0.1.5' 'haskell-stm=2.2.0.1' 'haskell-time=1.2.0.3' 'haskell-unix=2.4.2.0' 'haskell-utf8-string' 'haskell-libmpd' 'haskell-hinotify' 'wireless_tools' 'git' 'haskell-alsa-mixer') +makedepends=('ghc' 'haskell-x11>=1.3.0' 'haskell-bytestring=0.9.1.10' 'haskell-containers=0.4.0.0' 'haskell-directory=1.1.0.0' 'haskell-filepath=1.2.0.0' 'haskell-mtl=2.0.1.0' 'haskell-old-locale=1.0.0.2' 'haskell-old-time=1.0.0.6' 'haskell-parsec=3.1.1' 'haskell-process=1.0.1.5' 'haskell-stm=2.2.0.1' 'haskell-time=1.2.0.3' 'haskell-unix=2.4.2.0' 'haskell-utf8-string' 'haskell-libmpd-git' 'haskell-hinotify' 'wireless_tools' 'git' 'haskell-alsa-mixer') depends=('wireless_tools' 'gmp' 'libxinerama' 'libxft' 'alsa-lib') conflicts=('xmobar' 'xmobar-darcs') install= @@ -34,7 +33,8 @@ build() { rm -rf "${srcdir}/$_gitname-build" git clone "${srcdir}/$_gitname" "${srcdir}/$_gitname-build" cd "${srcdir}/$_gitname-build" - + + sed -i 's!sgGet!sgGetTag!' src/Plugins/Monitors/MPD.hs runhaskell Setup configure --flags="all_extensions" --prefix=/usr runhaskell Setup build