Date: Monday, September 14, 2020 @ 19:54:11 Author: felixonmars Revision: 706477
archrelease: copy trunk to community-staging-x86_64 Added: haskell-shellmet/repos/community-staging-x86_64/ haskell-shellmet/repos/community-staging-x86_64/PKGBUILD (from rev 706476, haskell-shellmet/trunk/PKGBUILD) ----------+ PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) Copied: haskell-shellmet/repos/community-staging-x86_64/PKGBUILD (from rev 706476, haskell-shellmet/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-09-14 19:54:11 UTC (rev 706477) @@ -0,0 +1,52 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> +# Contributor: berberman <hat...@typed.icu> + +_hkgname=shellmet +pkgname=haskell-shellmet +pkgver=0.0.3.1 +pkgrel=11 +pkgdesc="Shellmet provides easy and convenient way to call shell commands from Haskell programs." +url="https://github.com/kowainik/shellmet" +license=('MPL2') +arch=('x86_64') +depends=('ghc-libs') +makedepends=('ghc' 'haskell-doctest' 'haskell-glob') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('b9f084f47a6ae711b1e505e2f90d8d202d94f62950be98ceafc668b306473b25') + +prepare(){ + cd $_hkgname-$pkgver + echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs + sed -i '/executable readme/a\ buildable: False' $_hkgname.cabal +} + +build() { + cd $_hkgname-$pkgver + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ + --ghc-option='-pie' + + runhaskell Setup build $MAKEFLAGS + 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 +} + +check() { + cd $_hkgname-$pkgver + runhaskell Setup test +} + +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 +}