diff --git a/sysutils/inotify-tools/Makefile b/sysutils/inotify-tools/Makefile index 298a69f5ae68..f945d96b99d6 100644 --- a/sysutils/inotify-tools/Makefile +++ b/sysutils/inotify-tools/Makefile @@ -1,49 +1,58 @@ PORTNAME= inotify-tools DISTVERSION= 4.25.9.0 +PORTREVISION= 1 CATEGORIES= sysutils MAINTAINER= yuri@FreeBSD.org -COMMENT= Command-line utilities to watch for file events +COMMENT= Utilities to monitor and react to filesystem events in real-time WWW= https://github.com/inotify-tools/inotify-tools/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libinotify.so:devel/libinotify TEST_DEPENDS= bash:shells/bash USES= autoreconf compiler:c11 gmake libtool localbase shebangfix USE_GITHUB= yes USE_LDCONFIG= yes SHEBANG_GLOB= *.t *.sh GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-doxygen INSTALL_TARGET= install-strip OPTIONS_DEFINE= STATIC OPTIONS_SUB= yes post-patch: @${REINPLACE_CMD} \ -e 's|SHELL_PATH ?= /bin/bash|SHELL_PATH ?= ${LOCALBASE}/bin/bash|' \ ${WRKSRC}/t/Makefile post-build-STATIC-on: @cd ${WRKSRC}/src && \ ${CC} -pthread ${LDFLAGS} -static -o inotifywait.static inotifywait.o common.o ../libinotifytools/src/.libs/libinotifytools.a ${LOCALBASE}/lib/libinotify.a && \ ${CC} -pthread ${LDFLAGS} -static -o inotifywatch.static inotifywatch.o common.o ../libinotifytools/src/.libs/libinotifytools.a ${LOCALBASE}/lib/libinotify.a +post-install: + # delete fsnotify* commands because they are Linux-specific: they depend on Linux's fanotify interface + @${FIND} ${STAGEDIR}${PREFIX} -name "fsnotify*" -delete + post-install-STATIC-on: ${INSTALL_PROGRAM} ${WRKSRC}/src/inotifywait.static ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/src/inotifywatch.static ${STAGEDIR}${PREFIX}/bin do-test: # Some tests are known to fail: https://github.com/inotify-tools/inotify-tools/issues/108 - @${ECHO} "unit test" + @${ECHO} "====> Unit tests" @cd ${WRKSRC}/libinotifytools/src && ${GMAKE} test && ./test - @${ECHO} "integration test" + @${ECHO} "====> Integration tests" @cd ${WRKSRC}/t && ${GMAKE} +# tests as of 4.25.9.0: +# Unit tests: Out of 480076 tests, 480076 succeeded and 0 failed. (1-4 tests may fail due to "Too many open files", adjusting kern.maxfiles helps) +# Integration tests: some tests fail due to unreported MOVED_TO events, see https://github.com/inotify-tools/inotify-tools/issues/238 + .include diff --git a/sysutils/inotify-tools/pkg-descr b/sysutils/inotify-tools/pkg-descr index 04e30575fd3a..4b38bf1eff24 100644 --- a/sysutils/inotify-tools/pkg-descr +++ b/sysutils/inotify-tools/pkg-descr @@ -1,2 +1,11 @@ -The set of command-line programs providing a simple interface -to file system events to shell scripts. +inotify-tools is a set of command-line utilities that provides a simple +interface to the inotify kernel subsystem. It allows users to monitor and react +to changes in files and directories in real-time. + +The package includes two main utilities: +- inotifywait: for continuous monitoring and real-time output of + filesystem events. It is often used in shell scripts to trigger + actions like deployments, backups, or log monitoring. +- inotifywatch: gathers filesystem access statistics and outputs a + summary count of events received on each file or directory. It is + suitable for short-term monitoring to collect event statistics. diff --git a/sysutils/inotify-tools/pkg-plist b/sysutils/inotify-tools/pkg-plist index 54dacf82fde9..aaafdc2ef791 100644 --- a/sysutils/inotify-tools/pkg-plist +++ b/sysutils/inotify-tools/pkg-plist @@ -1,19 +1,15 @@ -bin/fsnotifywait -bin/fsnotifywatch bin/inotifywait bin/inotifywatch %%STATIC%%bin/inotifywait.static %%STATIC%%bin/inotifywatch.static include/inotifytools/fanotify-dfid-name.h include/inotifytools/fanotify.h include/inotifytools/inotify-nosys.h include/inotifytools/inotify.h include/inotifytools/inotifytools.h lib/libinotifytools.a lib/libinotifytools.so lib/libinotifytools.so.0 lib/libinotifytools.so.0.4.1 -share/man/man1/fsnotifywait.1.gz -share/man/man1/fsnotifywatch.1.gz share/man/man1/inotifywait.1.gz share/man/man1/inotifywatch.1.gz