diff options
author | Caleb Maclennan | 2020-05-19 00:53:08 +0300 |
---|---|---|
committer | Caleb Maclennan | 2020-05-19 00:53:08 +0300 |
commit | 81b07c6c4120717e203da05cbfffee7951330298 (patch) | |
tree | 23763618101884b5921549c3fe34a83aba134bdf | |
download | aur-81b07c6c4120717e203da05cbfffee7951330298.tar.gz |
Initial upload: haskell-commonmark-git 0.0.0.r743.g54ad60d-1
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 43 |
2 files changed, 60 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a3dff2fdf376 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = haskell-commonmark-git + pkgdesc = Pure Haskell commonmark parsing library, designed to be flexible and extensible + pkgver = 0.0.0.r743.g54ad60d + pkgrel = 1 + url = https://github.com/jgm/commonmark-hs + arch = x86_64 + license = GPL + makedepends = stack + provides = haskell-commonmark + conflicts = haskell-commonmark + source = haskell-commonmark-git::git+https://github.com/jgm/commonmark-hs.git + sha256sums = SKIP + +pkgname = haskell-commonmark-git + +pkgname = commonmark-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2dc70e1910f6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Caleb Maclennan <caleb@alerque.com> + +_pkgname=haskell-commonmark +pkgname=($_pkgname-git ${_pkgname/haskell-}-git) +pkgver=0.0.0.r743.g54ad60d +pkgrel=1 +pkgdesc='Pure Haskell commonmark parsing library, designed to be flexible and extensible' +url='https://github.com/jgm/commonmark-hs' +license=('GPL') +arch=('x86_64') +conflicts=("$_pkgname") +provides=("$_pkgname") +makedepends=('stack') +source=("$pkgname::git+$url.git") +sha256sums=('SKIP') + +pkgver() { + cd "$pkgbase" + git tag | grep -Fq 'v0.0.0' || git tag 'v0.0.0' f0175de + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "$pkgbase" + stack setup --install-ghc +} + +build() { + cd "$pkgbase" + stack build --ghc-options='-fdiagnostics-color=always' --fast commonmark-cli +} + +package_haskell-commonmark-git() { + cd "$pkgbase" + install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" commonmark/LICENSE +} + +package_commonmark-git() { + cd "$pkgbase" + find "./.stack-work/install" -type f -name commonmark -perm /u+x \ + -execdir install -Dm755 -t "$pkgdir/usr/bin/" {} \; + install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" commonmark-cli/LICENSE +} |