Merge from vendor branch TNF:
[pkgsrc.git] / security / portsentry / Makefile
1 # $NetBSD: Makefile,v 1.18 2007/12/28 11:51:42 obache Exp $
2 #
3
4 DISTNAME=       portsentry-1.2
5 CATEGORIES=     security
6 MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE:=sentrytools/}
7
8 MAINTAINER=     pkgsrc-users@NetBSD.org
9 HOMEPAGE=       http://sourceforge.net/projects/sentrytools/
10 COMMENT=        Detects and respond to port scans against a target host in real-time
11
12 PKG_DESTDIR_SUPPORT=    user-destdir
13
14 WRKSRC=         ${WRKDIR}/portsentry_beta
15
16 BUILD_TARGET=   ${LOWER_OPSYS}
17
18 EGDIR=          ${PREFIX}/share/examples/portsentry
19 CONF_FILES=     ${EGDIR}/portsentry.conf ${PKG_SYSCONFDIR}/portsentry.conf
20 CONF_FILES+=    ${EGDIR}/portsentry.ignore ${PKG_SYSCONFDIR}/portsentry.ignore
21
22 INSTALLATION_DIRS=      sbin share/doc/portsentry share/examples/portsentry
23 INSTALL_MAKE_FLAGS=     INSTALLDIR=${DESTDIR}${PREFIX}
24
25 post-patch:
26         @cd ${WRKSRC};                                                  \
27         case ${OPSYS} in                                                \
28         NetBSD) netbsd=""; solaris="#" ;;                               \
29         SunOS)  netbsd="#"; solaris="" ;;                               \
30         esac;                                                           \
31         for f in portsentry.conf portsentry_config.h; do                \
32                 ${MV} $$f $$f.prefix;                                   \
33                 ${SED} -e 's|@PREFIX@|${PREFIX}|g'                      \
34                         -e 's|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g'     \
35                         -e 's|@netbsd@|'$$netbsd'|g'                    \
36                         -e 's|@solaris@|'$$solaris'|g'                  \
37                                                 $$f.prefix > $$f;       \
38         done
39
40 post-install:
41         ${INSTALL_DATA} ${WRKSRC}/README.install ${DESTDIR}${PREFIX}/share/doc/portsentry
42         ${INSTALL_DATA} ${WRKSRC}/README.methods ${DESTDIR}${PREFIX}/share/doc/portsentry
43
44 .include "../../mk/bsd.pkg.mk"