Date: Saturday, May 4, 2019 @ 17:05:38 Author: felixonmars Revision: 459042
archrelease: copy trunk to community-staging-x86_64 Added: haskell-xcffib/repos/community-staging-x86_64/ haskell-xcffib/repos/community-staging-x86_64/PKGBUILD (from rev 459041, haskell-xcffib/trunk/PKGBUILD) ----------+ PKGBUILD | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) Copied: haskell-xcffib/repos/community-staging-x86_64/PKGBUILD (from rev 459041, haskell-xcffib/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2019-05-04 17:05:38 UTC (rev 459042) @@ -0,0 +1,44 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=xcffib +pkgname=haskell-xcffib +pkgver=0.7.0 +pkgrel=12 +pkgdesc="A cffi-based python binding for X" +url="https://github.com/tych0/xcffib" +license=('Apache') +arch=('x86_64') +depends=('ghc-libs' 'haskell-attoparsec' 'haskell-either' 'haskell-filemanip' 'haskell-language-python' + 'haskell-optparse-applicative' 'haskell-split' 'haskell-xcb-types') +makedepends=('ghc') +source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz") +sha512sums=('661e45b1e84b42a850c0dd9a6c0bd26497a0807a501d8596f1431787795d2bd31ee930335dbd4d2a2d2223dde6c379d396a07542afc3ac594a0e31bef87defcd') + +prepare() { + cd $_hkgname-$pkgver + sed -i '/semigroups/d' $_hkgname.cabal + echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid + runhaskell Setup build + runhaskell Setup register --gen-script + runhaskell Setup unregister --gen-script + sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh + sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh +} + +package() { + cd $_hkgname-$pkgver + + install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh + install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh + runhaskell Setup copy --destdir="$pkgdir" + install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE" +}