summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Alexander Steffens (heftig)2021-05-12 00:50:06 +0200
committerJan Alexander Steffens (heftig)2021-05-12 00:55:05 +0200
commitd4e4e03ee72b3929a46f2c3ba9f6becec7eb6bd7 (patch)
tree56a01008fa723ebb7ca6fce0f620d43219a65a52
parent3057264cabdef11a186af296fa14b4accace9fcc (diff)
downloadaur-d4e4e03ee72b3929a46f2c3ba9f6becec7eb6bd7.tar.gz
2021.05.10.00-2: Use shipped libraries; google-glog 0.5.0 is incompatible
-rw-r--r--.SRCINFO5
-rw-r--r--PKGBUILD21
2 files changed, 17 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1ea183abf950..c0e5e204ec1f 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
pkgbase = watchman-bin
pkgdesc = An inotify-based file watching and job triggering command line utility
pkgver = 2021.05.10.00
- pkgrel = 1
+ pkgrel = 2
url = https://facebook.github.io/watchman/
arch = x86_64
license = Apache
makedepends = patchelf
makedepends = python
depends = openssl
- depends = google-glog
- depends = gflags
+ depends = gcc-libs
provides = watchman=2021.05.10.00
conflicts = watchman
source = https://github.com/facebook/watchman/releases/download/v2021.05.10.00/watchman-v2021.05.10.00-linux.zip
diff --git a/PKGBUILD b/PKGBUILD
index 37272606b778..0ab5aa25ad40 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,11 @@
pkgname=watchman-bin
pkgver=2021.05.10.00
-pkgrel=1
+pkgrel=2
pkgdesc="An inotify-based file watching and job triggering command line utility"
url="https://facebook.github.io/watchman/"
arch=(x86_64)
license=(Apache)
-depends=(openssl google-glog gflags)
+depends=(openssl gcc-libs)
makedepends=(patchelf python)
provides=("watchman=$pkgver")
conflicts=(watchman)
@@ -14,10 +14,12 @@ source=("https://github.com/facebook/watchman/releases/download/v$pkgver/watchma
sha256sums=('dd286b57b2f3c837aeea0ff67b646f247cd8e4c13c2199f321964a1cc7359355')
prepare() {
+ cd watchman-v$pkgver-linux
+
python <<END
from pathlib import Path
-data = Path("watchman-v$pkgver-linux/bin/watchman").read_bytes()
+data = Path("bin/watchman").read_bytes()
badpath = b"/usr/local/var/run/watchman\\x00"
goodpath = b"/run/watchman\\x00"
@@ -25,20 +27,27 @@ goodpath = b"/run/watchman\\x00"
goodpath = goodpath.ljust(len(badpath), b"\\x00")
data = data.replace(badpath, goodpath)
-Path("watchman").write_bytes(data)
+Path("bin/watchman").write_bytes(data)
END
patchelf \
--replace-needed /usr/local/lib/libgflags.so.2.2 libgflags.so.2.2 \
--replace-needed /usr/local/lib/libglog.so.0 libglog.so.0 \
- watchman
+ bin/* lib/*
+
+ patchelf --set-rpath /usr/lib/watchman bin/* lib/*
}
package() {
- install -Dt "$pkgdir/usr/bin" watchman
+ cd watchman-v$pkgver-linux
+
+ install -Dt "$pkgdir/usr/bin" bin/*
+ install -Dt "$pkgdir/usr/lib/watchman" lib/*
+
install -Dm644 /dev/stdin "$pkgdir"/usr/lib/tmpfiles.d/watchman.conf <<END
d /run/watchman 1777 root root
END
+
echo '{}' | install -Dm644 /dev/stdin "$pkgdir"/etc/watchman.json.default
}