summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD42
2 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..77f40204cbf
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = liblolhtml-git
+ pkgdesc = Low output latency streaming HTML parser/rewriter with CSS selector-based API
+ pkgver = 380.8d3c21b
+ pkgrel = 1
+ url = https://crates.io/crates/lol-html
+ arch = x86_64
+ license = BSD
+ makedepends = rust
+ makedepends = git
+ depends = gcc-libs
+ provides = liblolhtml
+ conflicts = liblolhtml
+ source = git+https://github.com/cloudflare/lol-html.git
+ sha512sums = SKIP
+
+pkgname = liblolhtml-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c6dba86ac49
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Julien Desgats <arch@mille337.net>
+
+pkgname=liblolhtml-git
+_pkgname=liblolhtml
+_dir=lol-html/c-api
+pkgver=380.8d3c21b
+pkgrel=1
+pkgdesc='Low output latency streaming HTML parser/rewriter with CSS selector-based API'
+arch=('x86_64')
+url=https://crates.io/crates/lol-html
+license=('BSD')
+provides=("$_pkgname")
+conflicts=("$_pkgname")
+depends=('gcc-libs')
+makedepends=('rust' 'git')
+source=("git+https://github.com/cloudflare/lol-html.git")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${_dir}"
+ echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
+}
+
+build() {
+ cd "${srcdir}/${_dir}"
+ cargo build --release --locked
+}
+
+# Broken as of 380.8d3c21b (2019-11-29)
+#check() {
+# cd "${srcdir}/${_dir}"
+# cargo test --release --locked
+#}
+
+package() {
+ cd "${srcdir}/${_dir}"
+ install -Dm 755 target/release/liblolhtml.so -t "${pkgdir}/usr/lib"
+ install -Dm 644 include/lol_html.h -t "${pkgdir}/usr/include"
+ install -Dm 644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+# vim:set ts=2 sw=2 et: