Date: Thursday, June 17, 2021 @ 00:09:33 Author: felixonmars Revision: 964455
archrelease: copy trunk to community-staging-x86_64 Added: uusi/repos/community-staging-x86_64/ uusi/repos/community-staging-x86_64/PKGBUILD (from rev 964454, uusi/trunk/PKGBUILD) ----------+ PKGBUILD | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) Copied: uusi/repos/community-staging-x86_64/PKGBUILD (from rev 964454, uusi/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2021-06-17 00:09:33 UTC (rev 964455) @@ -0,0 +1,45 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgname=uusi +pkgver=0.4.1.0 +pkgrel=3 +pkgdesc="Tweak .cabal files" +url="https://github.com/berberman/uusi" +license=("MIT") +arch=('x86_64') +depends=('ghc-libs') +makedepends=('ghc') +checkdepends=('haskell-hunit') +source=("https://hackage.haskell.org/packages/archive/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz") +sha512sums=('b4b7158916fab1cb6c03d0b3830545f56a1570f1efed37fc7d92542877919449c4eb6090050c57b022bc80807c6383f93dd54d43359960420c570586975cc93b') + +build() { + cd $pkgname-$pkgver + + if (( CHECKFUNC )); then + _opts=('--enable-tests') + else + _opts=('--disable-tests') + fi + + runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ + --prefix=/usr --docdir=/usr/share/doc/$pkgname "${_opts[@]}" \ + --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ + --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ + --ghc-option='-pie' + + runhaskell Setup build $MAKEFLAGS +} + +check() { + cd $pkgname-$pkgver + runhaskell Setup test --show-details=direct +} + +package() { + cd $pkgname-$pkgver + + runhaskell Setup copy --destdir="$pkgdir" + install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +}