-
Notifications
You must be signed in to change notification settings - Fork 14
/
PKGBUILD-haskell
46 lines (35 loc) · 1.17 KB
/
PKGBUILD-haskell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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"
}