summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorberberman2020-09-09 10:13:05 +0800
committerberberman2020-09-09 10:13:05 +0800
commit4a4801c34c3a7c80e8064d2b3886fc9141baa77d (patch)
tree1b6d9c5b1e05020a90bc3fa5a43913fc6d396d6c
parentfb8ddea6089526a73a9fc8e5cea43e9c8b034391 (diff)
downloadaur-4a4801c34c3a7c80e8064d2b3886fc9141baa77d.tar.gz
Use ghc to packaging.
-rw-r--r--.SRCINFO24
-rw-r--r--PKGBUILD31
2 files changed, 41 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d69084b01375..006576781c71 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,28 @@
pkgbase = arch-hs-git
pkgdesc = Generating PKGBUILD for hackage packages.
- pkgver = r17.2ea4a7b
- pkgrel = 1
+ pkgver = r35.8920302
+ pkgrel = 2
url = https://github.com/berberman/arch-hs
arch = x86_64
license = MIT
- makedepends = stack
+ makedepends = ghc
makedepends = git
- depends = zlib
- depends = gmp
+ depends = ghc-libs
+ depends = haskell-aeson
+ depends = haskell-req
+ depends = haskell-hackage-db
+ depends = haskell-megaparsec
+ depends = haskell-algebraic-graphs
+ depends = haskell-conduit
+ depends = haskell-tar-conduit
+ depends = haskell-conduit-extra
+ depends = haskell-split
+ depends = haskell-neat-interpolation
+ depends = haskell-microlens
+ depends = haskell-microlens-th
+ depends = haskell-polysemy
+ depends = haskell-colourista
+ depends = haskell-optparse-applicative
provides = arch-hs
conflicts = arch-hs
source = arch-hs::git+https://github.com/berberman/arch-hs.git
diff --git a/PKGBUILD b/PKGBUILD
index e367ce4578c0..21c3326e4a30 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,14 +1,14 @@
# Maintainer: berberman <hatsue@typed.icu>
pkgname=arch-hs-git
-pkgver=r17.2ea4a7b
-pkgrel=1
+pkgver=r35.8920302
+pkgrel=2
pkgdesc="Generating PKGBUILD for hackage packages."
arch=('x86_64')
url="https://github.com/berberman/arch-hs"
license=('MIT')
-depends=('zlib' 'gmp')
-makedepends=('stack' 'git')
+depends=('ghc-libs' 'haskell-aeson' 'haskell-req' 'haskell-hackage-db' 'haskell-megaparsec' 'haskell-algebraic-graphs' 'haskell-conduit' 'haskell-tar-conduit' 'haskell-conduit-extra' 'haskell-split' 'haskell-neat-interpolation' 'haskell-microlens' 'haskell-microlens-th' 'haskell-polysemy' 'haskell-colourista' 'haskell-optparse-applicative')
+makedepends=('ghc' 'git')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=(${pkgname%-git}::git+https://github.com/berberman/arch-hs.git)
@@ -21,12 +21,25 @@ pkgver() {
}
build() {
- cd "$srcdir/${pkgname%-git}"
- stack build
+ cd "$srcdir/${pkgname%-git}"
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+ --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+ --ghc-option='-pie'
+
+ 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
}
package() {
- cd "$srcdir/${pkgname%-git}"
- install -D -m 644 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
- stack --local-bin-path "$pkgdir/usr/bin/" install
+ cd "$srcdir/${pkgname%-git}"
+ 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"
}