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

PORTNAME=   msyslog
PORTVERSION=    1.07
CATEGORIES= sysutils
MASTER_SITES=   http://www.core-sdi.com/soft/ \
        ftp://ftp.nuug.no/pub/anders/distfiles/
DISTNAME=   ${PORTNAME}-v${PORTVERSION}
EXTRACT_SUFX=   .tgz

MAINTAINER= ports@FreeBSD.org

.if defined(WITH_MYSQL)
LIB_DEPENDS+=   mysqlclient.10:${PORTSDIR}/databases/mysql323-client
.endif
.if defined(WITH_PGSQL)
LIB_DEPENDS+=   pq.2:${PORTSDIR}/databases/postgresql7
.endif

USE_AUTOCONF=   yes
GNU_CONFIGURE=  yes
USE_GMAKE=  yes
.if !defined(WITH_MYSQL)
CONFIGURE_ARGS+=    --without-mysql
.endif
.if !defined(WITH_PGSQL)
CONFIGURE_ARGS+=    --without-pgsql
.endif

MAN5=   syslog.conf.5
MAN8=   im_bsd.8 im_tcp.8 im_udp.8 im_unix.8 om_classic.8 om_tcp.8 om_peo.8 \
    om_regex.8 peochk.8 syslogd.8
.if defined(WITH_MYSQL)
MAN8+=  om_mysql.8
.endif
.if defined(WITH_PGSQL)
MAN8+=  om_pgsql.8
.endif
MANCOMPRESSED=  yes
INSTALLS_SHLIB= yes

DOCS=   AUTHORS src/TODO README NEWS doc/HOW_TO_WRITE_A_MODULE \
    doc/HOW-TO-UPGRADE
FIXPREFIX=  README src/man/om_peo.8 src/man/syslog.conf.5 \
        src/man/syslogd.8 src/TODO src/syslogd.h

WRKSRC=     ${WRKDIR}/${DISTNAME}

pre-patch:
.for f in ${FIXPREFIX}
    ${PERL} -pi -e "s|/etc/syslog.conf|${PREFIX}/etc/syslog.conf|g" \
    ${WRKSRC}/${f}
.endfor

post-install:
    ${INSTALL} -d -o root -g wheel -m 0775 ${PREFIX}/share/examples/msyslog
    ${INSTALL_DATA} ${WRKSRC}/src/examples/* \
        ${PREFIX}/share/examples/msyslog
.if !defined(NOPORTDOCS)
    ${INSTALL} -d -o root -g wheel -m 0775 ${DOCSDIR}
.for f in ${DOCS}
    ${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
.endfor
.endif
    @if [ ! -f ${PREFIX}/etc/rc.d/msyslog.sh.sample ]; then \
        ${ECHO} "Installing ${PREFIX}/etc/rc.d/msyslog.sh.sample startup file."; \
        ${INSTALL_SCRIPT} ${FILESDIR}/msyslog.sh.sample ${PREFIX}/etc/rc.d/msyslog.sh.sample; \
    fi

.include <bsd.port.mk>