summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rawlinson2022-04-26 20:00:43 +1200
committerGeorge Rawlinson2022-04-26 20:00:43 +1200
commitac3ff166a8dae2bd93fee4bc80fa72a6765d7436 (patch)
tree9dfeea9aa90ade57bcbbaa7ab46bc0b85b37e6ba
downloadaur-ac3ff166a8dae2bd93fee4bc80fa72a6765d7436.tar.gz
addpkg: hare-specification r377-1
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD57
2 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..e6c99735bf45
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = hare-specification
+ pkgdesc = Specification for the Hare programming language
+ pkgver = r377.ef58ba1
+ pkgrel = 1
+ url = https://git.sr.ht/~sircmpwn/hare-specification
+ arch = any
+ license = custom:CC-BY-ND
+ makedepends = git
+ makedepends = texlive-core
+ makedepends = texlive-latexextra
+ makedepends = texlive-fontsextra
+ source = hare-specification::git+https://git.sr.ht/~sircmpwn/hare-specification#commit=ef58ba16be6a77fd01d4ffc19ad59b9b9cbd600b
+ md5sums = SKIP
+
+pkgname = hare-specification
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..638f6af06e24
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,57 @@
+# Maintainer: George Rawlinson <grawlinson@archlinux.org>
+
+pkgname=hare-specification
+pkgver=r377.ef58ba1
+pkgrel=1
+pkgdesc='Specification for the Hare programming language'
+arch=('any')
+url='https://git.sr.ht/~sircmpwn/hare-specification'
+license=('custom:CC-BY-ND')
+makedepends=(
+ 'git'
+ 'texlive-core'
+ 'texlive-latexextra'
+ 'texlive-fontsextra'
+)
+_commit='ef58ba16be6a77fd01d4ffc19ad59b9b9cbd600b'
+source=("$pkgname::git+$url#commit=$_commit")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$pkgname"
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$pkgname"
+
+ # generate license file
+ sed \
+ -n '/^\\section.*/,//p' \
+ introduction.tex | \
+ sed \
+ -e 's/\\section{\(.*\)}/\1/' \
+ -e 's/\\textcopyright //' \
+ -e 's/\\informative{//' \
+ -e 's/}//' \
+ > LICENSE
+
+}
+
+build() {
+ cd "$pkgname"
+
+ make
+ make # for the ToC
+}
+
+package() {
+ cd "$pkgname"
+
+ # spec
+ install -vDm644 -t "$pkgdir/usr/share/doc/hare" specification.pdf
+
+ # license
+ install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+}