diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 43 |
1 files changed, 38 insertions, 5 deletions
@@ -1,6 +1,6 @@ pkgname=watchman-bin -pkgver=2021.05.10.00 -pkgrel=3 +pkgver=2021.05.24.00 +pkgrel=1 pkgdesc="An inotify-based file watching and job triggering command line utility" url="https://facebook.github.io/watchman/" arch=(x86_64) @@ -10,9 +10,11 @@ makedepends=(patchelf python) provides=("watchman=$pkgver") conflicts=(watchman) options=(!strip) +install=watchman.install + # https://github.com/facebook/watchman/releases source=("https://github.com/facebook/watchman/releases/download/v$pkgver/watchman-v$pkgver-linux.zip") -sha256sums=('dd286b57b2f3c837aeea0ff67b646f247cd8e4c13c2199f321964a1cc7359355') +sha256sums=('75e63ac81703f06815db99a4e33d23b0ad87f907bd592796d7eef679e9123e81') prepare() { cd watchman-v$pkgver-linux @@ -45,11 +47,42 @@ package() { 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 + 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 + echo '{}' | install -Dm644 /dev/stdin "$pkgdir/etc/watchman.json.default" + + install -Dm644 /dev/stdin "$pkgdir/usr/lib/systemd/user/watchman.socket" <<END +[Unit] +Description=File watching service socket +Documentation=$url + +[Socket] +ListenStream=/run/watchman/%u-state/sock +SocketMode=0600 +DirectoryMode=0700 + +[Install] +WantedBy=sockets.target +END + + install -Dm644 /dev/stdin "$pkgdir/usr/lib/systemd/user/watchman.service" <<END +[Unit] +Description=File watching service +Documentation=$url +Requires=watchman.socket + +[Service] +ExecStart=/usr/bin/watchman --foreground --inetd --logfile=/ +Restart=on-failure +StandardInput=socket +StandardOutput=journal +StandardError=inherit + +[Install] +WantedBy=default.target +END } # vim:set sw=2 et: |