Fix make package when BRO_PREFIX is defined and PYTHON is

enabled.

PR:		ports/185814
Submitted by:	Craig Leres <leres@ee.lbl.gov> (maintainer)
MFH:		2014Q1
This commit is contained in:
Carlo Strub 2014-01-31 21:19:16 +00:00
parent dce5efdcbf
commit 94d35aed87
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=342076
2 changed files with 13 additions and 4 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= broccoli
PORTVERSION= 2.2
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= http://www.bro.org/downloads/release/
DISTNAME= bro-${PORTVERSION}
@ -11,10 +11,10 @@ DISTNAME= bro-${PORTVERSION}
MAINTAINER= leres@ee.lbl.gov
COMMENT= The Bro Client Communications Library
LICENSE= BSD
LICENSE= BSD3CLAUSE
BUILD_DEPENDS= bison:${PORTSDIR}/devel/bison \
swig:${PORTSDIR}/devel/swig13
BUILD_DEPENDS= ${LOCALBASE}/bin/bison:${PORTSDIR}/devel/bison \
${LOCALBASE}/bin/swig:${PORTSDIR}/devel/swig13
LIB_DEPENDS= libGeoIP.so:${PORTSDIR}/net/GeoIP
EXTRACT_AFTER_ARGS= ${DISTNAME}/aux/broccoli
@ -56,6 +56,10 @@ post-install::
.if defined(BRO_PREFIX) && ! defined(WITH_PKGNG) && ! exists(${BRO_PREFIX})
# pkg_install needs PREFIX in order to make a package from STAGEDIR/PREFIX.
@${MKDIR} ${PREFIX}
.endif
.if defined(BRO_PREFIX) && empty(${PORT_OPTIONS:MPYTHON})
# Move lib/pythonX.X tree into BRO_PREFIX
${MV} ${STAGEDIR}${PYTHON_LIBDIR} ${STAGEDIR}${PREFIX}/lib
.endif
@${MKDIR} ${STAGEDIR}${PREFIX}/etc
@${MV} ${STAGEDIR}${PREFIX}/etc/broccoli.conf ${STAGEDIR}${PREFIX}/etc/broccoli.conf.example

View file

@ -8,7 +8,12 @@ lib/libbroccoli.so
lib/libbroccoli.so.5
lib/libbroccoli.so.5.1.0
%%PYTHON%%%%PYTHON_SITELIBDIR%%/_broccoli_intern.so
%%PYTHON%%@exec ln -f %%PREFIX%%/%%PYTHON_SITELIBDIR%%/_broccoli_intern.so %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/_broccoli_intern.so
%%PYTHON%%@unexec rm -f %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/_broccoli_intern.so
%%PYTHON%%%%PYTHON_SITELIBDIR%%/broccoli.py
%%PYTHON%%@exec ln -f %%PREFIX%%/%%PYTHON_SITELIBDIR%%/broccoli.py %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/broccoli.py
%%PYTHON%%@unexec rm -f %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/broccoli.py
%%PYTHON%%@unexec rm -f %%LOCALBASE%%/%%PYTHON_SITELIBDIR%%/broccoli.pyc
%%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/connection.rb
%%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/event.rb
%%RUBY%%%%RUBY_SITELIBDIR%%/Broccoli/record.rb