summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2020-05-19 00:53:08 +0300
committerCaleb Maclennan2020-05-19 00:53:08 +0300
commit81b07c6c4120717e203da05cbfffee7951330298 (patch)
tree23763618101884b5921549c3fe34a83aba134bdf
downloadaur-81b07c6c4120717e203da05cbfffee7951330298.tar.gz
Initial upload: haskell-commonmark-git 0.0.0.r743.g54ad60d-1
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD43
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
+}