upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / haskell-data-accessor-template / trunk / PKGBUILD
blob1af6041468912180abcfb14b10841d5c26c47e96
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Arch Haskell Team <arch-haskell@haskell.org>
4 _hkgname=data-accessor-template
5 pkgname=haskell-data-accessor-template
6 pkgver=0.2.1.16
7 pkgrel=36
8 pkgdesc="Automate generation of Accessor's of the data-accessor package by Template Haskell functions."
9 url="https://www.haskell.org/haskellwiki/Record_access"
10 license=("BSD")
11 arch=('x86_64')
12 depends=('ghc-libs' "haskell-data-accessor" "haskell-utility-ht")
13 makedepends=('ghc')
14 source=("https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
15 sha512sums=('428b4bc9703f63e5457654c500aefb5c257ec030c0554fc31bd5b629bd281d7e4adda320e3bf22bca4a32b440d6eb3697503eafd92532791580a89cf1c196696')
17 prepare() {
18     cd $_hkgname-$pkgver
19     sed -i 's/< *2.15/<3/' $_hkgname.cabal
22 build() {
23     cd $_hkgname-$pkgver
24     
25     runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
26         --prefix=/usr --docdir=/usr/share/doc/$pkgname \
27         --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
28     runhaskell Setup build $MAKEFLAGS
29     runhaskell Setup register --gen-script
30     runhaskell Setup unregister --gen-script
31     sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
32     sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
35 package() {
36     cd $_hkgname-$pkgver
37     
38     install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
39     install -D -m744 unregister.sh "$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
40     runhaskell Setup copy --destdir="$pkgdir"
41     install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
42     rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE