summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD44
1 files changed, 44 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b5df6ba3924e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Ranieri Althoff <ranisalt+aur at gmail dot com>
+# Contributor: Sébastien Luttringer
+
+_pkgname=lz4
+pkgname=${_pkgname}-static-musl
+epoch=1
+pkgver=1.9.1
+pkgrel=1
+pkgdesc='Extremely fast compression algorithm'
+arch=('x86_64')
+url='http://www.lz4.org/'
+license=('GPL2')
+makedepends=('git' 'musl')
+checkdepends=('diffutils')
+provides=("${_pkgname}=${pkgver}")
+conflicts=('lz4')
+source=("git+https://github.com/lz4/lz4.git#tag=v$pkgver")
+md5sums=('SKIP')
+
+build() {
+ export CC="musl-gcc"
+ export CFLAGS="$CFLAGS -fPIC -static"
+
+ # do not use the main makefile, it calls sub make with -e
+ # exported CLFAGS by makepkg break the version. see FS#50071
+ cd $_pkgname
+ make -C lib PREFIX=/usr
+ make -C programs PREFIX=/usr lz4 lz4c
+}
+
+check() {
+ rm -f passwd.lz4
+ $_pkgname/programs/lz4 /etc/passwd passwd.lz4
+ $_pkgname/programs/lz4 -d passwd.lz4 passwd
+ diff -q /etc/passwd passwd
+ rm passwd
+}
+
+package() {
+ cd $_pkgname
+ make install PREFIX=/usr DESTDIR="$pkgdir"
+}
+
+# vim:set ts=2 sw=2 et: