[arch-commits] Commit in haskell-optics-th/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Wed Apr 22 02:54:04 UTC 2020
Date: Wednesday, April 22, 2020 @ 02:54:03
Author: felixonmars
Revision: 617588
archrelease: copy trunk to community-staging-x86_64
Added:
haskell-optics-th/repos/community-staging-x86_64/
haskell-optics-th/repos/community-staging-x86_64/PKGBUILD
(from rev 617587, haskell-optics-th/trunk/PKGBUILD)
----------+
PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
Copied: haskell-optics-th/repos/community-staging-x86_64/PKGBUILD (from rev 617587, haskell-optics-th/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2020-04-22 02:54:03 UTC (rev 617588)
@@ -0,0 +1,47 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+_hkgname=optics-th
+pkgname=haskell-optics-th
+pkgver=0.3
+pkgrel=1
+pkgdesc="Optics construction using TemplateHaskell"
+url="https://github.com/well-typed/optics"
+license=('BSD')
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-optics-core' 'haskell-th-abstraction')
+makedepends=('ghc' 'haskell-tagged')
+source=(https://hackage.haskell.org/packages/archive/${_hkgname}/${pkgver}/${_hkgname}-${pkgver}.tar.gz)
+sha512sums=('ee902063b5ec9d2b268bc650e2e8c0cbdc197bc3435ee19bf1c5ebc886c4b24d89840177b7c5ea7c73f37af937b821cdd0fb06dce4fa86211c9df896e506ed98')
+
+prepare() {
+ cd $_hkgname-$pkgver
+ echo -e "import Distribution.Simple\nmain = defaultMain" > Setup.hs
+}
+
+build() {
+ cd $_hkgname-$pkgver
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname --enable-tests \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+check() {
+ cd $_hkgname-$pkgver
+ runhaskell Setup test
+}
+
+package() {
+ cd $_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
+}
More information about the arch-commits
mailing list