aboutsummaryrefslogtreecommitdiffstats
path: root/security/osiris/Makefile
blob: fc285bbfb7ae22cf538d84cc7d6d61c0752e1fb8 (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
# $FreeBSD$

PORTNAME=   osiris
PORTVERSION=    4.2.3
PORTREVISION=   1
CATEGORIES= security
MASTER_SITES=   http://osiris.shmoo.com/data/ \
        http://redundancy.redundancy.org/mirror/

MAINTAINER= lx@FreeBSD.org
COMMENT=    The Shmoo client/server host integrity checker

OPTIONS=    OSIRISMD "Enable to build the management daemon" off \
        OSIRISD "Enable to build the osirisd scan agent" on \
        PRINTDB "Build database print tool" off \
        CLI "Enable to build the management CLI" off

GNU_CONFIGURE=  yes
USE_RC_SUBR=    yes

.include <bsd.port.pre.mk>

.if exists(${LOCALBASE}/lib/libreadline.so.6)
LIB_DEPENDS+=   readline.6:${PORTSDIR}/devel/readline
.endif

.if defined(WITH_OSIRISMD)
PLIST_SUB+= OSIRISMD=""
.else
PLIST_SUB+= OSIRISMD="@comment "
.endif
.if defined(WITHOUT_OSIRISD)
PLIST_SUB+= OSIRISD="@comment "
.else
PLIST_SUB+= OSIRISD=""
.endif
.if defined(WITH_CLI)
PLIST_SUB+= CLI=""
.else
PLIST_SUB+= CLI="@comment "
.endif
.if defined(WITH_PRINTDB)
PLIST_SUB+= PRINTDB=""
.else
PLIST_SUB+= PRINTDB="@comment "
.endif

post-build:
.if defined(WITH_PRINTDB)
    cd ${WRKSRC}/src/tools && ${MAKE}
.endif

do-install:
    ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
    @${MKDIR} ${PREFIX}/osiris
.if defined(WITH_CLI)
    ${INSTALL_PROGRAM} ${WRKSRC}/src/cli/osiris ${PREFIX}/sbin
.endif
.if defined(WITH_PRINTDB)
    ${INSTALL_PROGRAM} ${WRKSRC}/src/tools/printdb ${PREFIX}/bin
.endif
.if !defined(WITHOUT_OSIRISD)
    ${SED} -e 's|@INSTALLDIR@|${PREFIX}/sbin|g' \
        -e 's|@OSIRISDIR@|${PREFIX}/osiris|g' \
        ${WRKSRC}/src/install/freebsd/osirisd.in > \
        ${WRKSRC}/src/install/freebsd/osirisd.sh
    ${INSTALL_PROGRAM} ${WRKSRC}/src/osirisd/osirisd ${PREFIX}/sbin
    ${INSTALL_SCRIPT} ${WRKSRC}/src/install/freebsd/osirisd.sh \
        ${PREFIX}/etc/rc.d
.endif
.if defined(WITH_OSIRISMD)
    ${SED} -e 's|@INSTALLDIR@|${PREFIX}/sbin|g' \
        -e 's|@OSIRISDIR@|${PREFIX}/osiris|g' \
        ${WRKSRC}/src/install/freebsd/osirismd.in > \
        ${WRKSRC}/src/install/freebsd/osirismd.sh
    @${MKDIR} ${PREFIX}/osiris/configs
.for os in aix bsdos darwin freebsd irix linux netbsd openbsd sunos \
    unix-generic windows2000 windowsnt windowsserver2003 windowsxp \
    wrt54g
    ${INSTALL_DATA} ${WRKSRC}/src/configs/default.${os} \
        ${PREFIX}/osiris/configs
.endfor
    ${INSTALL_PROGRAM} -m 4755 -o osiris -g osiris \
        ${WRKSRC}/src/osirismd/osirismd ${PREFIX}/sbin
    ${INSTALL_SCRIPT} ${WRKSRC}/src/install/freebsd/osirismd.sh \
        ${PREFIX}/etc/rc.d
.endif
    ${CHOWN} -R osiris:osiris ${PREFIX}/osiris

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>