Update sysutils/filelight to version 20.04.0
[dports.git] / sysutils / inotify-tools / Makefile
1 # Created by: Yuri Victorovich <yuri@rawbw.com>
2 # $FreeBSD$
3
4 PORTNAME=       inotify-tools # new fork https://github.com/ericcurtin/inotify-tools
5 DISTVERSION=    3.20.2.2
6 CATEGORIES=     sysutils
7
8 MAINTAINER=     yuri@FreeBSD.org
9 COMMENT=        Command-line utilities to watch for file events
10
11 LICENSE=        GPLv2
12 LICENSE_FILE=   ${WRKSRC}/COPYING
13
14 LIB_DEPENDS=    libinotify.so:devel/libinotify
15
16 USES=           autoreconf gmake libtool localbase
17 USE_GITHUB=     yes
18 GNU_CONFIGURE=  yes
19 CONFIGURE_ARGS= --disable-doxygen
20 USE_LDCONFIG=   yes
21 INSTALL_TARGET= install-strip
22
23 OPTIONS_DEFINE= STATIC
24 OPTIONS_SUB=    yes
25
26 post-patch:
27         @${REINPLACE_CMD} -e 's|stat64|stat|' \
28                 ${WRKSRC}/src/common.c \
29                 ${WRKSRC}/libinotifytools/src/inotifytools.c
30
31 post-build-STATIC-on:
32         @cd ${WRKSRC}/src && \
33                 ${CC} -pthread ${LDFLAGS} -static -o inotifywait.static inotifywait.o common.o ../libinotifytools/src/.libs/libinotifytools.a ${LOCALBASE}/lib/libinotify.a && \
34                 ${CC} -pthread ${LDFLAGS} -static -o inotifywatch.static inotifywatch.o common.o ../libinotifytools/src/.libs/libinotifytools.a ${LOCALBASE}/lib/libinotify.a
35
36 post-install-STATIC-on:
37         ${INSTALL_PROGRAM} ${WRKSRC}/src/inotifywait.static ${STAGEDIR}${PREFIX}/bin
38         ${INSTALL_PROGRAM} ${WRKSRC}/src/inotifywatch.static ${STAGEDIR}${PREFIX}/bin
39
40 do-test: # Some tests are known to fail: https://github.com/inotify-tools/inotify-tools/issues/108
41         @${ECHO} "unit test"
42         @cd ${WRKSRC}/libinotifytools/src && ${GMAKE} test && ./test
43         @${ECHO} "integration test"
44         @cd ${WRKSRC}/t && ${GMAKE}
45
46 .include <bsd.port.mk>