archrelease: copy trunk to community-any
[ArchLinux/community.git] / haskell-clientsession / repos / community-x86_64 / PKGBUILD
blob3f5c352353b0494356fe5af5c3fcf71f02951f4c
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=clientsession
5 pkgname=haskell-clientsession
6 pkgver=0.9.1.2
7 pkgrel=335
8 pkgdesc="Securely store session data in a client-side cookie."
9 url="https://github.com/yesodweb/clientsession/tree/master"
10 license=("MIT")
11 arch=('x86_64')
12 depends=('ghc-libs' "haskell-base64-bytestring" "haskell-cereal"
13          "haskell-cipher-aes" "haskell-cprng-aes" "haskell-crypto-api"
14          "haskell-crypto-random" "haskell-entropy" "haskell-setenv"
15          "haskell-skein" "haskell-tagged")
16 makedepends=('ghc')
17 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
18 sha512sums=('27b44924843363f86b7c27aec1a73e8d74fcf42075cbe45ded4f26d690eb086bac0a4091e66bbdcb431c090aed0ddb64384ca6c555b8ba4c7372f1c42117587a')
20 build() {
21     cd $_hkgname-$pkgver
22     
23     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
24         --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname \
25         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid --ghc-option=-fllvm \
26             -f-test
27     runhaskell Setup build $MAKEFLAGS
28     runhaskell Setup register --gen-script
29     runhaskell Setup unregister --gen-script
30     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
31     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
34 package() {
35     cd $_hkgname-$pkgver
36     
37     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
38     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
39     runhaskell Setup copy --destdir="$pkgdir"
40     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
41     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE