source: build-files/ports-overlay/security/ossec-hids-server/Makefile @ 1e102bd

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 1e102bd was 1e102bd, checked in by Kris Moore <kris@…>, 11 months ago

Add a bunch of modified ports for 10.0, so we can fix the building

  • Property mode set to 100644
File size: 3.3 KB
Line 
1# Created by: Valerio Daelli <valerio.daelli@gmail.com>
2# $FreeBSD: security/ossec-hids-server/Makefile 327769 2013-09-20 22:55:24Z bapt $
3
4PORTNAME=       ossec-hids
5PORTVERSION=    2.7
6PORTREVISION?=  0
7CATEGORIES=     security
8MASTER_SITES=   http://www.ossec.net/files/ \
9                http://www.ossec.net/files/old/
10PKGNAMESUFFIX=  -server
11
12MAINTAINER=     glarkin@FreeBSD.org
13COMMENT?=       A security tool to monitor and check logs and intrusions
14
15USE_GCC=        yes
16USE_RC_SUBR=    ossec-hids
17
18.if defined(MAINTAINER_MODE)
19UID_FILES+=     ../../UIDs
20GID_FILES+=     ../../GIDs
21.endif
22USERS=          ossec ossecm ossecr
23GROUPS=         ossec
24
25.if !defined(CLIENT_ONLY)
26OPTIONS_DEFINE= MYSQL PGSQL
27.endif
28OPTIONS_DEFINE+=        DOCS
29
30SUB_LIST=       PORTNAME=${PORTNAME}
31SUB_FILES=      pkg-message
32PLIST_SUB=      PORTNAME=${PORTNAME}
33PORTDOCS=       BUGS CONFIG CONTRIBUTORS INSTALL LICENSE README
34
35NO_STAGE=       yes
36.include <bsd.port.pre.mk>
37.if ${OSVERSION} < 800067
38# Add string function that didn't exist until 8.x
39EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src__os_csyslogd__csyslogd.c
40.endif
41
42.if !defined(CLIENT_ONLY)
43.if ${PORT_OPTIONS:MMYSQL}
44WITH_DB=        yes
45USE_MYSQL=      client
46.endif
47
48.if ${PORT_OPTIONS:MPGSQL}
49WITH_DB=        yes
50USE_PGSQL=      yes
51.endif
52.endif
53
54.if defined(CLIENT_ONLY)
55SUB_LIST+=      PRECMD=:
56PKGNAMESUFFIX=  -client
57CONFLICTS=      ossec-hids-server-[0-9]* ossec-hids-local-[0-9]*
58.elif defined(LOCAL_ONLY)
59SUB_LIST+=      PRECMD=ossechids_start_precmd
60PKGNAMESUFFIX=  -local
61CONFLICTS=      ossec-hids-client-[0-9]* ossec-hids-server-[0-9]*
62.else
63SUB_LIST+=      PRECMD=ossechids_start_precmd
64CONFLICTS=      ossec-hids-client-[0-9]* ossec-hids-local-[0-9]*
65.endif
66
67post-patch:
68        @${REINPLACE_CMD} 's|PREFIX|${PREFIX}/${PORTNAME}|' ${WRKSRC}/src/LOCATION
69        @${REINPLACE_CMD} 's|PREFIX|${PREFIX}/${PORTNAME}|' ${WRKSRC}/src/headers/defs.h
70
71do-build:
72.if defined(WITH_DB)
73.if defined(CLIENT_ONLY)
74        @cd ${WRKSRC}/src;${MAKE} setagent;${MAKE} all;${MAKE} build
75.elif defined(LOCAL_ONLY)
76        @cd ${WRKSRC}/src;${MAKE} setlocal;${MAKE} all;${MAKE} build
77.else
78        @cd ${WRKSRC}/src;${MAKE} setdb;${MAKE} all;${MAKE} build
79.endif
80.else
81.if defined(CLIENT_ONLY)
82        @cd ${WRKSRC}/src;${MAKE} setagent;${MAKE} all;${MAKE} build; \
83                ${MAKE} unsetdb
84.elif defined(LOCAL_ONLY)
85        @cd ${WRKSRC}/src;${MAKE} setlocal;${MAKE} all;${MAKE} build; \
86                ${MAKE} unsetdb
87.else
88        @cd ${WRKSRC}/src;${MAKE} all;${MAKE} build;${MAKE} unsetdb
89.endif
90.endif
91
92do-install:
93.if defined(CLIENT_ONLY)
94        @cd ${WRKSRC}/src; ${MAKE} agent
95.elif defined(LOCAL_ONLY)
96        @cd ${WRKSRC}/src; ${MAKE} local
97.else
98        @cd ${WRKSRC}/src; ${MAKE} server
99.endif
100
101post-install:
102        @${MKDIR} ${PREFIX}/${PORTNAME}/etc
103
104.if defined(CLIENT_ONLY)
105        @${CP} ${WRKSRC}/etc/ossec-agent.conf ${PREFIX}/${PORTNAME}/etc/ossec.conf.sample
106        @if [ ! -f ${PREFIX}/${PORTNAME}/etc/ossec.conf ]; then \
107        ${CP} ${WRKSRC}/etc/ossec-agent.conf ${PREFIX}/${PORTNAME}/etc/ossec.conf; \
108        fi
109.elif defined(LOCAL_ONLY)
110        ${CP} ${WRKSRC}/etc/ossec-local.conf ${PREFIX}/${PORTNAME}/etc/ossec.conf.sample
111        @if [ ! -f ${PREFIX}/${PORTNAME}/etc/ossec.conf ]; then \
112        ${CP} ${WRKSRC}/etc/ossec-local.conf ${PREFIX}/${PORTNAME}/etc/ossec.conf; \
113        fi
114.else
115        @if [ ! -f ${PREFIX}/${PORTNAME}/etc/ossec.conf ]; then \
116        ${CP} ${WRKSRC}/etc/ossec-server.conf ${PREFIX}/${PORTNAME}/etc/ossec.conf; \
117        fi
118.endif
119
120.if ${PORT_OPTIONS:MDOCS}
121        @${MKDIR} ${DOCSDIR}
122        @cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
123.endif
124
125        @${CAT} ${PKGMESSAGE}
126
127.include <bsd.port.post.mk>
Note: See TracBrowser for help on using the repository browser.