summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD134
1 files changed, 111 insertions, 23 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0adf169049fb..7b34d87d68ca 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,35 +1,123 @@
-# Maintainer: Jean Lucas <jean@4ray.co>
+# Maintainer: Carl Smedstad <carsme@archlinux.org>
+# Contributor: Xuanrui Qi <me@xuanruiqi.com>
+# Contributor: Jean Lucas <jean@4ray.co>
# Contributor: José Luis Lafuente <jl@lafuente.me>
# Contributor: Michael Louis Thaler <michael.louis.thaler@gmail.com>
pkgname=watchman
-pkgver=4.7.0
+pkgver=2024.05.06.00
pkgrel=1
-pkgdesc="An inotify-based file watching and job triggering command line utility"
-url="https://facebook.github.io/watchman/"
-arch=('i686' 'x86_64')
-license=('Apache')
-depends=('pcre')
-makedepends=('glibc')
-install=$pkgname.install
-source=("$pkgname-$pkgver.tar.gz::https://github.com/facebook/watchman/archive/v$pkgver.tar.gz"
- "$pkgname.tmpfiles")
-sha256sums=('77c7174c59d6be5e17382e414db4907a298ca187747c7fcb2ceb44da3962c6bf'
- '2b061865e10578a0477b9c7991a00594bc839c846b98896e93c75743dbf6a379')
+pkgdesc="Watches files and records, or triggers actions, when they change"
+url="https://github.com/facebook/watchman"
+arch=(x86_64)
+license=(MIT)
+depends=(
+ boost-libs
+ edencommon
+ fb303
+ fbthrift
+ fmt
+ folly
+ gcc-libs
+ glibc
+ google-glog
+ libunwind
+ openssl
+ pcre2
+ python
+)
+makedepends=(
+ boost
+ cmake
+ cpptoml
+ fizz
+ gtest
+ python-setuptools
+ rust
+)
+backup=(etc/watchman.json)
+source=(
+ "$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
+ "watchman-destdir.patch::https://src.fedoraproject.org/rpms/watchman/raw/a446ccc61c73d74053792656c3832f93bf0fe262/f/watchman-destdir.patch"
+ "watchman.conf"
+ "watchman.json"
+ "watchman.service"
+ "watchman.socket"
+)
+sha256sums=(
+ '456fb61eacd9296bd452ef030b9727a1470933a31f326bdaddb52a59b2feef16'
+ 'd40feab6aa7dc6522c648660e88642fdf721ee1f9d80c23f6891a6381067a38b'
+ '3ebc93cb91ec9b9603969e222fd3ffd9baa4a1d07a7b3bd7aabf956ec2e177c8'
+ 'ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356'
+ '5b4b032b68d87d648e268c5c08b4d56993d5c1a661e3925b39f54bdef2dfbc42'
+ '853457ad70492fec9d7d020b9e067e2aec2ca419c0a5cddd5d93c5fab354c87a'
+)
+
+_archive="$pkgname-$pkgver"
+
+prepare() {
+ cd "$_archive"
+
+ patch --forward --strip=1 --ignore-whitespace --fuzz=3 --input="$srcdir/watchman-destdir.patch"
+
+ # Use system CMake config instead of bundled module, incompatible with glog
+ # v0.7.0+
+ sed -i 's/find_package(Glog REQUIRED)/find_package(Glog CONFIG REQUIRED)/' \
+ CMakeLists.txt
+}
build() {
- cd $srcdir/$pkgname-$pkgver
- ./autogen.sh
- ./configure --prefix= --exec-prefix=/usr --localstatedir=/run/$pkgname --without-python --enable-lenient
- make
+ cd "$_archive"
+
+ export RUSTUP_TOOLCHAIN=stable
+
+ cmake -S . -B build \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -Wno-dev \
+ -DBUILD_SHARED_LIBS=ON \
+ -DWATCHMAN_STATE_DIR=/var/run/watchman \
+ -DUSE_SYS_PYTHON=ON \
+ -DENABLE_EDEN_SUPPORT=ON \
+ -DWATCHMAN_VERSION_OVERRIDE="$pkgver"
+ cmake --build build
}
-package() {
- cd $srcdir/$pkgname-$pkgver
- # Docs available online only; see https://github.com/facebook/watchman/issues/30
- make DESTDIR=$pkgdir install-binPROGRAMS
+check() {
+ cd "$_archive"
+
+ local skipped_tests=(
+ # Skip failing tests - not sure why they fail
+ test_py::watchman.integration.test_capabilities.TestCapabilitiesCliJson.test_full_capability_set
+ test_py::watchman.integration.test_capabilities.TestCapabilitiesUnixBser2.test_full_capability_set
+ test_py::watchman.integration.test_capabilities.TestCapabilitiesUnixJson.test_full_capability_set
+ test_py::watchman.integration.test_fishy
+ test_py::watchman.integration.test_force_recrawl
+ test_py::watchman.integration.test_scm.TestScmUnixBser2.test_scmHg
+ test_py::watchman.integration.test_scm.TestScmUnixJson.test_scmHg
+ test_py::watchman.integration.test_since.TestSinceUnixJson.test_sinceRelativeRoot
+ test_py::watchman.integration.test_subscribe.TestSubscribeUnixBser2.test_drop_state
+ test_py::watchman.integration.test_trigger.TestTriggerUnixBser2.test_legacyTrigger
+ test_py::watchman.integration.test_trigger.TestTriggerUnixJson.test_legacyTrigger
- install -Dm 644 ../$pkgname.tmpfiles $pkgdir/usr/lib/tmpfiles.d/$pkgname.conf
+ # Skip long-running tests
+ test_py::watchman.integration.test_local_saved_state
+ test_py::watchman.integration.test_sock_perms.TestSockPerms
+ )
+ local skipped_tests_pattern="${skipped_tests[0]}$(printf "|%s" "${skipped_tests[@]:1}")"
+ ctest --test-dir build --output-on-failure -E "$skipped_tests_pattern"
}
-# vim:set ts=2 sw=2 et:
+package() {
+ cd "$_archive"
+
+ DESTDIR="$pkgdir" cmake --install build
+
+ install -Dm644 -t "$pkgdir/usr/lib/tmpfiles.d" "$srcdir/watchman.conf"
+ install -Dm644 -t "$pkgdir/etc" "$srcdir/watchman.json"
+ install -Dm644 -t "$pkgdir/usr/lib/systemd/user" \
+ "$srcdir/watchman.service" \
+ "$srcdir/watchman.socket"
+
+ install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
+}