summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorLeif Warner2018-04-14 19:18:58 -0700
committerLeif Warner2018-04-14 19:18:58 -0700
commitb9b7c1c642c2187646f459ebd35e8ed7ec54a5b3 (patch)
tree12397cf579d157467f48812d4832d5033fa20a10 /PKGBUILD
downloadaur-haskell-time-units.tar.gz
Initial commit v1.0.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD44
1 files changed, 44 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9ce9bb68a5e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Leif Warner <abimelech@gmail.com>
+
+# custom variables
+_hkgname=time-units
+
+pkgname=haskell-${_hkgname}
+pkgver=1.0.0
+pkgrel=1
+license=(BSD-3-Clause)
+pkgdesc="Basic library for type-described units of time."
+url="http://hackage.haskell.org/package/${_hkgname}"
+arch=('x86_64')
+makedepends=("ghc")
+depends=("haskell-base")
+source=("http://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz")
+
+sha256sums=('e181997dd05321f09b21c5e0bf38524ccab51ecc588a6017253cc96db289e099')
+
+# PKGBUILD functions
+
+build() {
+ cd "${srcdir}/${_hkgname}-${pkgver}"
+
+ runhaskell Setup configure -O --enable-executable-dynamic --disable-library-vanilla --enable-shared \
+ --prefix=/usr --docdir="/usr/share/doc/${pkgname}" --datasubdir="$pkgname" \
+ --libsubdir=\$compiler/site-local/\$pkgid --dynlibdir=/usr/lib
+ runhaskell Setup build
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+}
+
+package() {
+ cd "${srcdir}/${_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 "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}