# This file was generated by https://github.com/berberman/arch-hs, please check it manually. _hkgname=autodocodec pkgname=haskell-autodocodec pkgver=0.2.0.0 pkgrel=1 pkgdesc="Self-documenting encoder and decoder" url="https://github.com/NorfairKing/autodocodec#readme" license=("MIT") arch=('x86_64') depends=('ghc-libs' 'haskell-aeson' 'haskell-hashable' 'haskell-scientific' 'haskell-unordered-containers' 'haskell-validity' 'haskell-validity-scientific' 'haskell-vector') makedepends=('ghc') source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz" 'Setup.hs') sha256sums=('af3abe177924979cfe7ca734a4ddc27966ca563974e50450f577e191c145b637' 'f2a37c4a254ff8eb780133ca568ae5f4f4dcdee5219982154e6faef749b8327c') prepare() { cp Setup.hs "$_hkgname-$pkgver/" } build() { cd $_hkgname-$pkgver runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \ --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=haskell-autodocodec --enable-tests \ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \ --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \ --ghc-option='-pie' 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 -t "$pkgdir"/usr/share/licenses/$pkgname/ rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE }