Date: Monday, December 28, 2020 @ 09:40:57 Author: felixonmars Revision: 794489
archrelease: copy trunk to community-staging-x86_64 Added: haskell-opentelemetry/repos/community-staging-x86_64/ haskell-opentelemetry/repos/community-staging-x86_64/PKGBUILD (from rev 794488, haskell-opentelemetry/trunk/PKGBUILD) ----------+ PKGBUILD | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) Copied: haskell-opentelemetry/repos/community-staging-x86_64/PKGBUILD (from rev 794488, haskell-opentelemetry/trunk/PKGBUILD) =================================================================== --- community-staging-x86_64/PKGBUILD (rev 0) +++ community-staging-x86_64/PKGBUILD 2020-12-28 09:40:57 UTC (rev 794489) @@ -0,0 +1,44 @@ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +_hkgname=opentelemetry +pkgname=haskell-opentelemetry +pkgver=0.6.1 +pkgrel=6 +pkgdesc="The OpenTelemetry Haskell Client" +url="https://github.com/ethercrow/opentelemetry-haskell" +license=("Apache") +arch=('x86_64') +depends=('ghc-libs' 'haskell-ghc-trace-events' 'haskell-hashable') +makedepends=('ghc' 'uusi') +source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz") +sha256sums=('d38d85189edf01e3b4bd2c9b25456e4c65c190e0b824a91ea1f101f262640845') + +prepare() { + cd $_hkgname-$pkgver + gen-setup +} + +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 +} + +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" + rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE +}