blob: f0467b39055e2db25441a6fd097c2266cd131185 (
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
# $FreeBSD$
PORTNAME= rsyslog
PORTVERSION= 7.5.3
CATEGORIES= sysutils
MASTER_SITES= http://www.rsyslog.com/files/download/rsyslog/
MAINTAINER= brd@FreeBSD.org
COMMENT= Syslogd supporting SQL, TCP, and TLS
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
LIB_DEPENDS= ee:${PORTSDIR}/devel/libee \
estr:${PORTSDIR}/devel/libestr \
json.0:${PORTSDIR}/devel/json-c \
uuid:${PORTSDIR}/misc/e2fsprogs-libuuid
BUILD_DEPENDS= libgcrypt-config:${PORTSDIR}/security/libgcrypt
PORTSCOUT= limit:^7\.5
PORTDOCS= *
PORTEXAMPLES= *
PKGNAMESUFFIX= -devel
OPTIONS_DEFINE= DBI DOCS GNUTLS GSSAPI MYSQL PGSQL RELP RFC3195 SNMP
DBI_DESC= LibDBI output module for rsyslog
GNUTLS_DESC= GNUTLS module for rsyslog
GSSAPI_DESC= GSS API input/output module for rsyslog
MYSQL_DESC= MySQL output module for rsyslog
PGSQL_DESC= PostgreSQL output module for rsyslog
RELP_DESC= RELP input/output module for rsyslog
RFC3195_DESC= RFC3195 input support for rsyslog
SNMP_DESC= SNMP trap sender for rsyslog
USES= pkgconfig
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDBI}
LIB_DEPENDS+= dbi.1:${PORTSDIR}/databases/libdbi
CONFIGURE_ARGS+=--enable-libdbi
PLIST_FILES+= lib/rsyslog/omlibdbi.la \
lib/rsyslog/omlibdbi.so
.else
CONFIGURE_ARGS+=--disable-libdbi
.endif
.if ${PORT_OPTIONS:MGNUTLS}
LIB_DEPENDS+= gnutls.26:${PORTSDIR}/security/gnutls \
gcrypt:${PORTSDIR}/security/libgcrypt
CONFIGURE_ARGS+=--enable-gnutls
PLIST_FILES+= lib/rsyslog/lmnsd_gtls.la \
lib/rsyslog/lmnsd_gtls.so
.else
CONFIGURE_ARGS+=--disable-gnutls
.endif
.if ${PORT_OPTIONS:MGSSAPI}
CONFIGURE_ARGS+=--enable-gssapi-krb5
PLIST_FILES+= lib/rsyslog/imgssapi.la \
lib/rsyslog/imgssapi.so \
lib/rsyslog/lmgssutil.la \
lib/rsyslog/lmgssutil.so \
lib/rsyslog/omgssapi.la \
lib/rsyslog/omgssapi.so
.else
CONFIGURE_ARGS+=--disable-gssapi-krb5
.endif
.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL= yes
CONFIGURE_ARGS+=--enable-mysql
PLIST_FILES+= lib/rsyslog/ommysql.so \
lib/rsyslog/ommysql.la
.else
CONFIGURE_ARGS+=--disable-mysql
.endif
.if ${PORT_OPTIONS:MPGSQL}
USE_PGSQL= yes
CONFIGURE_ARGS+=--enable-pgsql
PLIST_FILES+= lib/rsyslog/ompgsql.so \
lib/rsyslog/ompgsql.la
.else
CONFIGURE_ARGS+=--disable-pgsql
.endif
.if ${PORT_OPTIONS:MRELP}
LIB_DEPENDS+= relp.0:${PORTSDIR}/devel/librelp
CONFIGURE_ARGS+=--enable-relp
PLIST_FILES+= lib/rsyslog/imrelp.la \
lib/rsyslog/imrelp.so \
lib/rsyslog/omrelp.la \
lib/rsyslog/omrelp.so
.else
CONFIGURE_ARGS+=--disable-relp
.endif
.if ${PORT_OPTIONS:MRFC3195}
LIB_DEPENDS+= logging.0:${PORTSDIR}/devel/liblogging
CONFIGURE_ARGS+=--enable-rfc3195
PLIST_FILES+= lib/rsyslog/im3195.la \
lib/rsyslog/im3195.so
.else
CONFIGURE_ARGS+=--disable-rfc3195
.endif
.if ${PORT_OPTIONS:MSNMP}
LIB_DEPENDS+= netsnmp.30:${PORTSDIR}/net-mgmt/net-snmp
CONFIGURE_ARGS+=--enable-snmp
PLIST_FILES+= lib/rsyslog/omsnmp.la \
lib/rsyslog/omsnmp.so
.else
CONFIGURE_ARGS+=--disable-snmp
.endif
.ifdef WITH_MYSQL_MICROSECONDS
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-mysql-microseconds
.endif
.ifdef WITH_SANE_HOSTNAME
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-sane-hostname
.endif
CONFLICTS= rsyslog6-* rsyslog-[0-9].*
CFLAGS+= -I${LOCALBASE}/include
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
.ifdef WITH_DEBUG
CONFIGURE_ARGS+=--enable-rtinst --enable-debug
.endif
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386"
CPPFLAGS+=-march=i686
.endif
CONFIGURE_ENV+= LIBESTR_CFLAGS="${CFLAGS}" LIBESTR_LIBS="${LDFLAGS} -lestr" LIBEE_CFLAGS="${CFLAGS}" LIBEE_LIBS="${LDFLAGS} -lee -lkvm"
CFLAGS+= ${CPPFLAGS}
MAN8= rsyslogd.8
MAN5= rsyslog.conf.5
USE_RC_SUBR= ${PORTNAME}d
SUB_FILES= pkg-message
CONFIGURE_ARGS+= --enable-imfile --enable-mail --enable-imdiag --enable-impstats --enable-omstdout --enable-cached-man-pages
post-patch:
@${REINPLACE_CMD} -e 's|/lib/rsyslog/|${PREFIX}/lib/rsyslog/|'\
${WRKSRC}/tools/syslogd.c
@${GREP} -rl '/etc/rsyslog.conf' ${WRKSRC}|${XARGS} ${REINPLACE_CMD} -e\
's|/etc/rsyslog.conf|${PREFIX}/etc/rsyslog.conf|'
@${REINPLACE_CMD} -e 's,/lib/rsyslog,${PREFIX}/lib/rsyslog,' ${WRKSRC}/tools/syslogd.c
@${FIND} ${WRKSRC} -name '*.bak' -delete
post-install:
.if ${PORT_OPTIONS:MDOCS}
@${INSTALL} -d ${DOCSDIR}/
@${INSTALL_DATA} ${WRKSRC}/doc/*html ${DOCSDIR}/
@${INSTALL_DATA} ${WRKSRC}/doc/*jpg ${DOCSDIR}/
.endif
.if ${PORT_OPTIONS:MEXAMPLES}
@${INSTALL} -d ${EXAMPLESDIR}
@${INSTALL_DATA} ${WRKSRC}/doc/rsyslog-example.conf ${EXAMPLESDIR}
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
|