- Fix build with clang (overzealous -Werror)

- Add staging support
- Convert to new LIB_DEPENDS, options helpers, USES=libtool
- Use @sample for config file

MFH:		2014Q3
This commit is contained in:
Pawel Pekala 2014-07-11 17:00:13 +00:00
parent 076ccbcf0f
commit ed9d1b9baf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=361571
2 changed files with 14 additions and 26 deletions

View file

@ -3,47 +3,39 @@
PORTNAME= yaraNugget
PORTVERSION= 0.5.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= SF/razorbacktm/Nuggets
PKGNAMEPREFIX= razorback-
DIST_SUBDIR= razorback
MAINTAINER= ports@FreeBSD.org
MAINTAINER= ports@FreeBSD.org
COMMENT= Framework for an intelligence driven security - Yara Detection
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= razorback_api:${PORTSDIR}/security/razorback-api \
pcre:${PORTSDIR}/devel/pcre
LIB_DEPENDS= librazorback_api.so:${PORTSDIR}/security/razorback-api \
libpcre.so:${PORTSDIR}/devel/pcre
BUILD_DEPENDS= razorback-masterNugget>=0.5.0:${PORTSDIR}/security/razorback-masterNugget
RUN_DEPENDS= razorback-masterNugget>=0.5.0:${PORTSDIR}/security/razorback-masterNugget
OPTIONS_DEFINE= DEBUG ASSERT
ASSERT_DESC= Enable Asserts
RB_LIBDIR?= ${PREFIX}/lib/razorback
GNU_CONFIGURE= yes
USES= pkgconfig
USE_AUTOTOOLS= libtool
USES= libtool pkgconfig
USE_LDCONFIG= ${RB_LIBDIR}
NO_STAGE= yes
.include <bsd.port.options.mk>
OPTIONS_DEFINE= DEBUG ASSERT
.if ${PORT_OPTIONS:MDEBUG}
CONFIGURE_ARGS+=--enable-debug
.endif
ASSERT_DESC= Enable Asserts
ASSERT_CONFIGURE_ENABLE= assert
DEBUG_CONFIGURE_ENABLE= debug
.if ${PORT_OPTIONS:MASSERT}
CONFIGURE_ARGS+=--enable-assert
.endif
post-patch:
@${REINPLACE_CMD} '/CWARNINGS/ s|-Werror||' ${WRKSRC}/configure
post-install:
${LN} -sf ${RB_LIBDIR}/yaraNugget.so.2 ${RB_LIBDIR}/yaraNugget.so.2.0.0
@if [ ! -f ${PREFIX}/etc/razorback/yara.conf ]; then \
${CP} -p ${PREFIX}/etc/razorback/yara.conf.sample ${PREFIX}/etc/razorback/yara.conf ; \
fi
${LN} -sf ${RB_LIBDIR}/yaraNugget.so.2 \
${STAGEDIR}${RB_LIBDIR}/yaraNugget.so.2.0.0
.include <bsd.port.mk>

View file

@ -1,13 +1,9 @@
@unexec if cmp -s %D/etc/razorback/yara.conf %D/etc/razorback/yara.conf.sample; then rm -f %D/etc/razorback/yara.conf; fi
etc/razorback/yara.conf.sample
@exec if [ ! -f %D/etc/razorback/yara.conf ]; then cp -p %D/%F %B/yara.conf; fi
@sample etc/razorback/yara.conf.sample
etc/razorback/yara/banker.rules
etc/razorback/yara/packer.rules
@dirrmtry etc/razorback/yara
@dirrmtry etc/razorback
lib/razorback/yaraNugget.so.2.0.0
lib/razorback/yaraNugget.so.2
lib/razorback/yaraNugget.so
lib/razorback/yaraNugget.la
lib/razorback/yaraNugget.a
@dirrmtry lib/razorback