aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/msyslog/Makefile
blob: e1721dc30451b15dca20a71f2754279d96db62fb (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
# New ports collection makefile for:    msyslog
# Date created:             14 May 2001
# Whom:                 Anders Nordby <anders@fix.no>
#
# $FreeBSD$
#

PORTNAME=   msyslog
PORTVERSION=    1.08g
PORTREVISION=   1
CATEGORIES= sysutils
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE} \
        http://www1.corest.com/download/msyslog/
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME=   ${PORTNAME}-v${PORTVERSION}-src

MAINTAINER= az@FreeBSD.org
COMMENT=    Flexible and easy to integrate syslog daemon

OPTIONS=    MYSQL   "With MySQL Support"    off \
        PSSQL   "With Postfres Support" off \

WRKSRC=     ${WRKDIR}/${DISTNAME:S/-src//}

GNU_CONFIGURE=  yes
CONFIGURE_TARGET=   --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
USE_GMAKE=  yes
USE_REINPLACE=  yes
USE_RC_SUBR=    msyslogd.sh
PKGMESSAGE= ${WRKDIR}/pkg-message
INSTALLS_SHLIB= yes
MANCOMPRESSED=  yes

.include <bsd.port.pre.mk>

.if defined(WITH_MYSQL)
USE_MYSQL=  yes
MAN8+=  om_mysql.8
.else
CONFIGURE_ARGS+=    --without-mysql
.endif

.if defined(WITH_PSSQL)
USE_PGSQL=  yes
MAN8+=  om_pgsql.8
.else
CONFIGURE_ARGS+=    --without-pgsql
.endif

post-patch:
    @${FIND} ${WRKSRC}/src/modules -name "*.c" | \
        ${XARGS} ${REINPLACE_CMD} -e "s|typedef int socklen_t;||g"
    @${FIND} ${WRKSRC}/src/peo -name "*.h" | \
        ${XARGS} ${REINPLACE_CMD} -e 's|"typedefs.h"|<sys/types.h>|g'
    @${FIND} ${WRKSRC}/src/ -name "*.*" | \
        ${XARGS} ${REINPLACE_CMD} -e 's|/dev/log|/var/run/log|g' \
        -e "s|/etc/syslog.conf|${PREFIX}/etc/syslog.conf|g"
    @${FIND} ${WRKSRC}/src/ -name "*.bak" -delete

post-install:
    @${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/src/examples/* ${EXAMPLESDIR}
    @${CAT} ${PKGDIR}/pkg-message | ${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
        > ${PKGMESSAGE}
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>