aboutsummaryrefslogtreecommitdiff
path: root/devel/gamin/Makefile
blob: c5d5e942db5b3d82416931024a61cb8e04f90bd6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
PORTNAME=	gamin
PORTVERSION=	0.1.10
PORTREVISION?=	10
CATEGORIES?=	devel
MASTER_SITES=	http://people.gnome.org/~veillard/gamin/sources/

MAINTAINER?=	ports@FreeBSD.org
COMMENT?=	File and directory monitoring system

USES+=		gettext gnome libtool pathfix pkgconfig
USE_GNOME?=	glib20
USE_LDCONFIG=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ARGS?=--with-html-dir=${PREFIX}/share/doc \
		--without-python
CPPFLAGS+=	-DHAVE_LINUX -I${LOCALBASE}/include
LIBS+=		-L${LOCALBASE}/lib
INSTALL_TARGET=	install-strip

CONFLICTS=	fam

.if !defined(GAMIN_SLAVE)
OPTIONS_DEFINE=	GAM_POLLER LIBINOTIFY RUN_AS_EUID
OPTIONS_DEFAULT=RUN_AS_EUID
GAM_POLLER_DESC=Use gamin's poller instead of kqueue's
LIBINOTIFY_DESC=Use libinotify as the FAM backend
RUN_AS_EUID_DESC=Drop privileges to effective user
.endif

.include <bsd.port.options.mk>

.if !defined(GAMIN_SLAVE)
.if ${PORT_OPTIONS:MGAM_POLLER}
CPPFLAGS+=	-DUSE_GAMIN_POLLER=1
.endif

.if ${PORT_OPTIONS:MLIBINOTIFY}
CONFIGURE_ARGS+=--enable-inotify
LIBS+=		-linotify
LIB_DEPENDS+=	libinotify.so:devel/libinotify
.else
CONFIGURE_ARGS+=--disable-inotify
.endif
.endif

.if ${PORT_OPTIONS:MRUN_AS_EUID}
CPPFLAGS+=	-DRUN_AS_EUID=1
.endif

post-patch:
	@${REINPLACE_CMD} "s|/etc|${PREFIX}/etc|g" ${WRKSRC}/server/gam_conf.c

.if !defined(GAMIN_SLAVE)
regression-test: build
	@${ECHO_MSG} "===> Running gamin regression tests"
	@(cd ${WRKSRC}/tests && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
		Makefile ${MAKE_ARGS} tests)
.endif

.include <bsd.port.mk>