aboutsummaryrefslogtreecommitdiffstats
path: root/irc/bopm/Makefile
blob: a5347d5a5b6648c6ebfacb0aeeb266b779334d38 (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
# New ports collection makefile for:    bopm
# Date Created:             2004.08.06
# Whom:                 Evgueni V. Gavrilov <aquatique@rusunix.org>
#
# $FreeBSD$
#

PORTNAME=   bopm
PORTVERSION=    3.1.3
CATEGORIES= irc
MASTER_SITES=   http://static.blitzed.org/www.blitzed.org/bopm/files/ \
        ftp://rusunix.org/pub/FreeBSD/distfiles/

MAINTAINER= ports@FreeBSD.org
COMMENT=    Open proxy and DNSBL monitor, designed for use with ircds

LOGDIR=     /var/log/${PORTNAME}

USE_AUTOTOOLS=  libtool:22
LIBTOOLFILES=   configure src/libopm/configure
CONFIGURE_ARGS=     --sysconfdir=${PREFIX}/etc --localstatedir=${LOGDIR}

USE_LDCONFIG=   yes
USE_RC_SUBR=    bopm

SUB_FILES=  pkg-message pkg-install pkg-deinstall
PLIST_SUB=  LOGDIR=${LOGDIR}
SUB_LIST=   LOGDIR=${LOGDIR}

pre-su-install:
    @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL

post-patch:
    @${REINPLACE_CMD} \
        -e 's,data_DATA = bopm.conf.sample,data_DATA =,g' \
        -e 's,$(sysconfdir)/bopm.conf,$(sysconfdir)/bopm.conf.sample,g' \
        ${WRKSRC}/Makefile.in
    @${REINPLACE_CMD} \
        -e 's,/some/path/bopm.pid,${LOGDIR}/bopm.pid,g' \
        -e 's,/some/path/scan.log,${LOGDIR}/scan.log,g' \
        ${WRKSRC}/bopm.conf.sample

post-install:
    @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
    @${CHOWN} bopm:bopm ${LOGDIR}
    @${CHMOD} 750 ${LOGDIR}
    @${CHOWN} bopm:bopm ${PREFIX}/etc/bopm.conf.sample
    @${CHMOD} 640 ${PREFIX}/etc/bopm.conf.sample
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>