aboutsummaryrefslogtreecommitdiffstats
path: root/security/aide/Makefile
blob: 241a77983e938d3b4e4dc767fdc0d9c41d9e45bd (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
# Created by: Cy Schubert (Cy.Schubert@uumail.gov.bc.ca)
# $FreeBSD$

PORTNAME=   aide
PORTVERSION=    0.15.1
PORTREVISION=   1
CATEGORIES= security
MASTER_SITES=   SF \
        http://www.cs.tut.fi/~rammer/


MAINTAINER= cy@FreeBSD.org
COMMENT=    Replacement and extension for Tripwire

LIB_DEPENDS=    mhash.2:${PORTSDIR}/security/mhash
USES=       bison

NO_STAGE=   yes
.include <bsd.port.pre.mk>

USE_GMAKE=  yes
USE_AUTOTOOLS=  autoconf
GNU_CONFIGURE=  yes
CONFIGURE_ARGS+=--with-mhash \
        --with-zlib \
        --mandir=${MANPREFIX}/man \
        --with-config_file=${PREFIX}/etc/aide.conf

LDFLAGS+=   -L${LOCALBASE}/lib ${PTHREAD_LIBS}
CFLAGS+=    -I${LOCALBASE}/include

MAN1=       aide.1
MAN5=       aide.conf.5

SUB_FILES=  pkg-message

post-install:
    @${INSTALL_DATA} ${FILESDIR}/aide.conf.freebsd ${PREFIX}/etc/aide.conf.sample
    @if [ ! -f ${PREFIX}/etc/aide.conf ]; then \
        ${INSTALL_DATA} ${FILESDIR}/aide.conf.freebsd ${PREFIX}/etc/aide.conf ; \
    fi
    @if [ ! -d /var/db/aide/databases ]; then \
        ${MKDIR} /var/db/aide/databases; \
        ${CHOWN} root:wheel /var/db/aide ; \
        ${CHOWN} root:wheel /var/db/aide/databases ; \
        ${CHMOD} 0700 /var/db/aide ; \
        ${CHMOD} 0700 /var/db/aide/databases ; \
    fi
    @${ECHO}
    @${CAT} ${PKGMESSAGE}
    @${ECHO}
.if defined(AIDE_FLOPPY)
    @disklabel -w -B /dev/rfd0c fd1440
    @newfs -u 0 -t 0 -i 196608 -m 0 -T minimum -o space /dev/rfd0c
    @mount /dev/fd0c /mnt
    @${CP} ${PREFIX}/bin/aide /mnt/aide
    @${CP} -p /var/db/aide/aide.conf /mnt/aide.conf
    @${CP} < /var/db/aide/databases/aide.db /mnt/aide.db
    @${CHMOD} 555 /mnt/aide
    @umount /mnt
    @${ECHO} Do not forget to remove and write-protect the floppy.
.endif

.include <bsd.port.post.mk>