summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rwxr-xr-xPKGBUILD40
2 files changed, 57 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d09102c51668
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = nginx-mainline-mod-zstd-git
+ pkgdesc = Zstandard compression module for mainline nginx
+ pkgver = r27.6be764e
+ pkgrel = 1
+ url = https://github.com/tokers/zstd-nginx-module
+ arch = x86_64
+ license = BSD-2-Clause
+ makedepends = git
+ makedepends = nginx-mainline-src
+ depends = zstd>=1.4.0
+ depends = glibc
+ provides = nginx-mainline-mod-zstd
+ conflicts = nginx-mainline-mod-zstd
+ source = nginx-mainline-mod-zstd-git::git+https://github.com/tokers/zstd-nginx-module.git
+ b2sums = SKIP
+
+pkgname = nginx-mainline-mod-zstd-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..1db3ec22e523
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: William Varmus <0@var.vg>
+pkgname=nginx-mainline-mod-zstd-git
+pkgver=r27.6be764e
+pkgrel=1
+pkgdesc="Zstandard compression module for mainline nginx"
+arch=('x86_64')
+url="https://github.com/tokers/zstd-nginx-module"
+license=('BSD-2-Clause')
+depends=('zstd>=1.4.0' 'glibc')
+makedepends=('git' 'nginx-mainline-src')
+provides=('nginx-mainline-mod-zstd')
+conflicts=('nginx-mainline-mod-zstd')
+source=("$pkgname::git+https://github.com/tokers/zstd-nginx-module.git")
+b2sums=('SKIP')
+
+prepare() {
+ cp -r /usr/src/nginx .
+ cd "$srcdir"/$pkgname
+ git submodule update --init
+}
+
+pkgver() {
+ cd "$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$srcdir"/nginx
+ ./configure --with-compat --add-dynamic-module=../$pkgname
+ make modules
+}
+
+package() {
+ install -Dm644 "$srcdir"/$pkgname/LICENSE \
+ "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+ cd "$srcdir"/nginx/objs
+ for mod in ngx_*.so; do
+ install -Dm755 $mod "$pkgdir"/usr/lib/nginx/modules/$mod
+ done
+}