47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
|
|
# See COPYING for license details.
|
|
|
|
pkgname=NAME
|
|
pkgver=VERSION
|
|
pkgrel=1
|
|
pkgdesc=''
|
|
arch=('x86_64' 'aarch64')
|
|
groups=('blackarch' MORE_BLACKARCH_GROUPS_HERE)
|
|
url='URL pointing to download section of package'
|
|
license=('WHATEVER' OR 'custom:unknown')
|
|
depends=()
|
|
makedepends=('ghc')
|
|
source=("https://foo.bar/downloads/$pkgname-$pkgver.tar.gz")
|
|
sha512sums=()
|
|
install="$pkgname.install"
|
|
|
|
build() {
|
|
cd $pkgname
|
|
|
|
runhaskell Setup configure -O -p --enable-split-objs --enable-shared \
|
|
--prefix=/usr --docdir="/usr/share/doc/NAME" \
|
|
--libsubdir=\$compiler/site-local/\$pkgid
|
|
|
|
runhaskell Setup build
|
|
runhaskell Setup haddock
|
|
runhaskell Setup register --gen-script
|
|
runhaskell Setup unregister --gen-script
|
|
|
|
sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
|
|
}
|
|
|
|
package() {
|
|
cd "$pkgname"
|
|
|
|
install -dm 755 "$pkgdir/usr/share/doc/ghc/html/libraries"
|
|
|
|
install -Dm 744 -t "$pkgdir/usr/share/haskell/$pkgname/" register.sh \
|
|
unregister.sh
|
|
|
|
ln -s "/usr/share/doc/$pkgname/html" \
|
|
"$pkgdir/usr/share/doc/$pkgname/html/libraries/HKNAME"
|
|
|
|
runhaskell Setup copy --destdir="$pkgdir"
|
|
}
|
|
|