diff options
author | gesh | 2021-05-26 00:56:31 +0300 |
---|---|---|
committer | gesh | 2021-10-28 00:53:20 +0300 |
commit | 5fcf1da0036f8c1c61062507cd5f86120885d588 (patch) | |
tree | 6461a11543fd90e6b335d860fe12b7de8619a524 | |
parent | ba66f4749cb353d8d1d8fb97eea696c29d4226df (diff) | |
download | aur-5fcf1da0036f8c1c61062507cd5f86120885d588.tar.gz |
Add support for unreleased pandoc versions
Sometimes `pandoc-citeproc` lags behind `pandoc` releases, so latest
`pandoc` commit to build against is provided.
This usually entails bumping some versions in `stack.yaml`, so
`verbump.patch` is included (initially empty).
-rw-r--r-- | .SRCINFO | 8 | ||||
-rw-r--r-- | PKGBUILD | 28 | ||||
-rw-r--r-- | ver-bump.patch | 0 |
3 files changed, 29 insertions, 7 deletions
@@ -1,19 +1,21 @@ pkgbase = pandoc-crossref-static-git pkgdesc = Pandoc filter for cross-references (static build) - pkgver = 0.3.12.0c + pkgver = 0.3.12.0c.r0.gfe8033c pkgrel = 1 url = https://github.com/lierdakil/pandoc-crossref arch = x86_64 license = GPL2 makedepends = stack makedepends = pandoc - depends = pandoc= - provides = pandoc-crossref=0.3.12.0c + depends = pandoc=2.14.2 + provides = pandoc-crossref=0.3.12.0c.r0.gfe8033c conflicts = pandoc-crossref replaces = pandoc-crossref-bin replaces = pandoc-crossref-static replaces = pandoc-crossref-lite source = pandoc-crossref-static-git::git+https://github.com/lierdakil/pandoc-crossref.git + source = ver-bump.patch sha256sums = SKIP + sha256sums = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 pkgname = pandoc-crossref-static-git @@ -5,8 +5,10 @@ pkgname=pandoc-crossref-static-git _pkgname="${pkgname%-static-git}" -pkgver=0.3.12.0c +pkgver=0.3.12.0c.r0.gfe8033c +_pandoc_type=stock _pandoc_ver=2.14.2 +_pandoc_commit=c909d16cccbae92add6b1e2430ce9e6d51e0c7e5 pkgrel=1 pkgdesc="Pandoc filter for cross-references (static build)" url="https://github.com/lierdakil/pandoc-crossref" @@ -17,8 +19,9 @@ provides=("$_pkgname=$pkgver") replaces=('pandoc-crossref-bin' 'pandoc-crossref-static' 'pandoc-crossref-lite') depends=("pandoc=$_pandoc_ver") makedepends=('stack' 'pandoc') -source=("$pkgname::git+$url.git") -sha256sums=('SKIP') +source=("$pkgname::git+$url.git" ver-bump.patch) +sha256sums=('SKIP' + 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855') pkgver() { cd "$pkgname" @@ -27,7 +30,24 @@ pkgver() { prepare() { cd "$pkgname" - sed -i "s/pandoc-\([1-9]\+\.\)\{3\}[1-9]\+/pandoc-$_pandoc_ver/" stack.yaml + patch --forward --strip=1 --input="${srcdir}/ver-bump.patch" + sedscript='' + case "$_pandoc_type" in + stock) return;; + commit) + sedscript='/ pandoc-\([0-9]\+\.\)\{1,3\}[0-9]\+/{' + sedscript+='s#pandoc.*#github: jgm/pandoc#;' + sedscript+="a\ commit: $_pandoc_commit"$'\n' + sedscript+='}' + ;; + version) + sedscript="s/ pandoc-\([0-9]\+\.\)\{1,3\}[0-9]\+/ pandoc-$_pandoc_ver/" + ;; + esac + sed -i "$sedscript" stack.yaml + _pandoc_bound=$(awk -F. '/[0-9]+\./{$NF++;print}' OFS=. <<<"${_pandoc_ver}") + sed -i "/, pandoc /s#<.*#<$_pandoc_bound#" \ + pandoc-crossref.cabal package.yaml } check() { diff --git a/ver-bump.patch b/ver-bump.patch new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/ver-bump.patch |