aboutsummaryrefslogtreecommitdiffstats
path: root/security/pulledpork/Makefile
blob: 45e72ec296270b21b76f1e2bf270397c9eab4d0a (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
# New ports collection makefile for:    pulledpork
# Date created:             01 Mai 2010
# Whom:                 Olli Hauer
#
# $FreeBSD$
#

PORTNAME=   pulledpork
PORTVERSION=    0.6.1
PORTREVISION=   2
CATEGORIES= security
MASTER_SITES=   ${MASTER_SITE_GOOGLE_CODE}

MAINTAINER= ohauer@FreeBSD.org
COMMENT=    Script to update snort-2.8+ rules

LICENSE=    GPLv2

RUN_DEPENDS=    p5-Crypt-SSLeay>=0.57:${PORTSDIR}/security/p5-Crypt-SSLeay \
        p5-LWP-Protocol-https>=6.00:${PORTSDIR}/www/p5-LWP-Protocol-https \
        p5-libwww>=0:${PORTSDIR}/www/p5-libwww

NO_BUILD=   yes
USE_PERL5_RUN=  yes

PLIST_DIRSTRY=  %%ETCDIR%%
PLIST_DIRS= %%DATADIR%%

PLIST_FILES=    bin/pulledpork.pl \
        %%ETCDIR%%/disablesid.conf.sample \
        %%ETCDIR%%/dropsid.conf.sample \
        %%ETCDIR%%/enablesid.conf.sample \
        %%ETCDIR%%/modifysid.conf.sample \
        %%ETCDIR%%/pulledpork.conf.sample \
        %%DATADIR%%/README.CONTRIB \
        %%DATADIR%%/oink-conv.pl

SUB_FILES=  pkg-message

.if !defined(NOPORTDOCS)
PORTDOCS=   LICENSE README README.CATEGORIES README.CHANGES README.RULESET README.SHAREDOBJECTS
.endif

post-patch:
    @${REINPLACE_CMD} -e "s|/usr/bin/perl|${PERL}|" ${WRKSRC}/pulledpork.pl
    @${REINPLACE_CMD} -e 's|snort/enablesid.conf|pulledpork/enablesid.conf|g' \
        -e 's|snort/dropsid.conf|pulledpork/dropsid.conf|g' \
        -e 's|snort/disablesid.conf|pulledpork/disablesid.conf|g' \
        -e 's|snort/modifysid.conf|pulledpork/modifysid.conf|g' \
        -e "s|/usr/local/lib/snort_dynamicrules/|${PREFIX}/etc/snort/so_rules/|g" \
        ${WRKSRC}/etc/pulledpork.conf
    @${REINPLACE_CMD} -e "s| /usr/bin/perl|${PERL}|" ${WRKSRC}/contrib/oink-conv.pl
# pulledpork bug id:110
    @${REINPLACE_CMD} -e 's|distro=FreeBSD-8.0|distro=FreeBSD-8-1|g' \
        ${WRKSRC}/etc/pulledpork.conf

do-install:
    @${INSTALL_SCRIPT} ${WRKSRC}/pulledpork.pl ${PREFIX}/bin
    @${MKDIR} -m 750 ${ETCDIR}
    # pulledpork.conf contains the snort user registration key, do not install world readable
    @${INSTALL_DATA} -m 440 ${WRKSRC}/etc/pulledpork.conf ${ETCDIR}/pulledpork.conf.sample
    @${INSTALL_DATA} ${WRKSRC}/etc/disablesid.conf ${ETCDIR}/disablesid.conf.sample
    @${INSTALL_DATA} ${WRKSRC}/etc/dropsid.conf    ${ETCDIR}/dropsid.conf.sample
    @${INSTALL_DATA} ${WRKSRC}/etc/enablesid.conf  ${ETCDIR}/enablesid.conf.sample
    @${INSTALL_DATA} ${WRKSRC}/etc/modifysid.conf  ${ETCDIR}/modifysid.conf.sample
    @${MKDIR} ${DATADIR}
    @${INSTALL_DATA} ${WRKSRC}/contrib/README.CONTRIB ${DATADIR}/
    @${INSTALL_SCRIPT} ${WRKSRC}/contrib/oink-conv.pl ${DATADIR}/

.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOCSDIR}/
    @${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
    @${INSTALL_DATA} ${WRKSRC}/doc/README.CATEGORIES ${DOCSDIR}/
    @${INSTALL_DATA} ${WRKSRC}/doc/README.CHANGES ${DOCSDIR}/
    @${INSTALL_DATA} ${WRKSRC}/doc/README.RULESET ${DOCSDIR}/
    @${INSTALL_DATA} ${WRKSRC}/doc/README.SHAREDOBJECTS ${DOCSDIR}/
.endif

post-install:
    @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>