summaryrefslogtreecommitdiff
path: root/sysutils/syslog-ng/Makefile
blob: f69ddede6bced8c6b806d2b8c4dbd4140f6101f4 (plain)
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
# $NetBSD: Makefile,v 1.35 2019/11/04 21:28:52 rillig Exp $

.include "../../sysutils/syslog-ng/Makefile.common"

PKGREVISION=		1

CONFIGURE_ARGS+=	--enable-ssl
CONFIGURE_ARGS+=	--enable-stomp
CONFIGURE_ARGS+=	--enable-tcp-wrapper
CONFIGURE_ARGS+=	--with-jsonc=system

CONFIGURE_ARGS.SunOS+=	--enable-dynamic-linking
CONFIGURE_ARGS.SunOS+=	--enable-sun-streams
CPPFLAGS.SunOS+=	-D_XOPEN_SOURCE=600 -D__EXTENSIONS__

.include "options.mk"

BUILD_DEFS+=		VARBASE

PKG_SYSCONFSUBDIR=	syslog-ng
EGDIR=			${PREFIX}/share/examples/syslog-ng
DOCDIR=			${PREFIX}/share/doc/syslog-ng

OWN_DIRS+=		${VARBASE}/db/syslog-ng
CONF_FILES+=		${EGDIR}/scl.conf ${PKG_SYSCONFDIR}/scl.conf
CONF_FILES+=		${EGDIR}/syslog-ng.conf ${PKG_SYSCONFDIR}/syslog-ng.conf

RCD_SCRIPTS=		syslogng

INSTALL_MAKE_FLAGS+=	sysconfdir=${EGDIR}
INSTALL_TARGET=		install
INSTALLATION_DIRS=	bin ${DOCDIR} ${EGDIR}

PLIST_VARS+=		systemd

.if exists(/bin/systemd)
PLIST.systemd=		yes
.endif

PKGCONFIG_OVERRIDE=	libtest/syslog-ng-test.pc.in			\
			syslog-ng-add-contextual-data.pc.in		\
			syslog-ng-native-connector.pc.in		\
			syslog-ng.pc.in

post-install:
	${INSTALL_DATA} ${WRKSRC}/contrib/syslog-ng.conf.doc ${DESTDIR}${DOCDIR}
.for f in syslog-ng.conf.HP-UX syslog-ng.conf.RedHat syslog-ng.conf.SunOS
	${INSTALL_DATA} ${WRKSRC}/contrib/${f} ${DESTDIR}${EGDIR}
.endfor
	${INSTALL_SCRIPT} ${WRKSRC}/contrib/syslog2ng ${DESTDIR}${PREFIX}/bin

.include "../../security/tcp_wrappers/buildlink3.mk"
.include "../../textproc/json-c/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"