diff options
author | Kubilay Kocak <koobs@FreeBSD.org> | 2014-08-21 14:58:55 +0000 |
---|---|---|
committer | Kubilay Kocak <koobs@FreeBSD.org> | 2014-08-21 14:58:55 +0000 |
commit | 411d41c623ce4c220a13bf472408d242dea40ea7 (patch) | |
tree | ecb0a6537a902edefef93a3ce0cc6c003c88cda4 /security/libprelude | |
parent | f961065a905f5da13b51a504c8e718ae6aa6be1c (diff) | |
download | ports-411d41c623ce4c220a13bf472408d242dea40ea7.tar.gz ports-411d41c623ce4c220a13bf472408d242dea40ea7.zip |
security/libprelude: Take MAINTAINER'ship, STAGE & Modernize
- Take Maintainership
- Enable STAGE support
- Tweak MASTER_SITES https -> http (portlint)
- Add LICENSE and LICENSE_FILE
- Deprecate USE_AUTOTOOLS for libtool (-> USES)
- Sort USES and OPTIONS
- Use OPTIONS helpers as much as possible for now [1]
- Add --enable-static to CONFIGURE_ARGS to retain the static lib
- Assign and Use ETCDIR rather than hardcoding
- Use the install-strip install target
- Update pkg-plist, use @sample and other goodies
While I'm here, bump dependent ports since our SHLIB major version has
changed
[1] https://reviews.freebsd.org/D665
Approved by: portmgr (implicit, bump unstaged port)
Notes
Notes:
svn path=/head/; revision=365562
Diffstat (limited to 'security/libprelude')
-rw-r--r-- | security/libprelude/Makefile | 64 | ||||
-rw-r--r-- | security/libprelude/pkg-plist | 31 |
2 files changed, 42 insertions, 53 deletions
diff --git a/security/libprelude/Makefile b/security/libprelude/Makefile index ce115d8b38f7..b2ad8d379c1c 100644 --- a/security/libprelude/Makefile +++ b/security/libprelude/Makefile @@ -3,13 +3,16 @@ PORTNAME= libprelude PORTVERSION= 1.0.1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= security -MASTER_SITES= https://www.prelude-ids.org/attachments/download/241/ +MASTER_SITES= http://www.prelude-ids.org/attachments/download/241/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= koobs@FreeBSD.org COMMENT= Framework library for Prelude NIDS +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/LICENSE.README + LIB_DEPENDS= libgmp.so:${PORTSDIR}/math/gmp \ libgnutls.so:${PORTSDIR}/security/gnutls \ libgcrypt.so:${PORTSDIR}/security/libgcrypt \ @@ -17,40 +20,34 @@ LIB_DEPENDS= libgmp.so:${PORTSDIR}/math/gmp \ libnettle.so:${PORTSDIR}/security/nettle \ libp11-kit.so:${PORTSDIR}/security/p11-kit -OPTIONS_DEFINE= PERL PYTHON DOCS +OPTIONS_DEFINE= DOCS PERL PYTHON +OPTIONS_SUB= yes -USE_AUTOTOOLS= libtool libltdl -CONFIGURE_ARGS= --localstatedir=/var \ +USES= charsetfix gettext gmake iconv libtool pathfix pkgconfig +USE_AUTOTOOLS= libltdl +USE_LDCONFIG= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --enable-static \ + --localstatedir=/var \ --enable-gtk-doc=no \ --with-html-dir=${PREFIX}/share/doc -USES= pathfix pkgconfig gettext iconv charsetfix gmake -USE_LDCONFIG= yes CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib +INSTALL_TARGET= install-strip -MAN1= prelude-admin.1 +ETCDIR= ${PREFIX}/etc/prelude PORTDOCS= * -NO_STAGE= yes -.include <bsd.port.options.mk> +PERL_CONFIGURE_WITH= perl +PERL_USES= perl5 +PYTHON_CONFIGURE_WITH= python +PYTHON_USES= python -.if ${PORT_OPTIONS:MPERL} -USES+= perl5 -CONFIGURE_ARGS+=--with-perl -PLIST_SUB+= PERL="" -.else -CONFIGURE_ARGS+=--without-perl -PLIST_SUB+= PERL="@comment " -.endif +.include <bsd.port.options.mk> .if ${PORT_OPTIONS:MPYTHON} -USE_PYTHON= yes -CONFIGURE_ARGS+=--with-python -PLIST_SUB+= PYTHON="" PYTHON_VER="${PYTHON_VER}" VERSION="${PORTVERSION}" -.else -CONFIGURE_ARGS+=--without-python -PLIST_SUB+= PYTHON="@comment " +PLIST_SUB+= PYTHON_VER="${PYTHON_VER}" VERSION="${PORTVERSION}" .endif .include <bsd.port.pre.mk> @@ -60,27 +57,26 @@ BROKEN= Does not compile .endif post-patch: - @${REINPLACE_CMD} -e \ - '/^install-data-am:/s|install-data-local||' ${WRKSRC}/docs/api/Makefile.in @${REINPLACE_CMD} '\,gnutls/extra\.h,d' \ ${WRKSRC}/prelude-admin/prelude-admin.c \ ${WRKSRC}/prelude-admin/server.c post-install: - ${INSTALL_MAN} ${WRKSRC}/docs/manpages/*.1 ${MAN1PREFIX}/man/man1 + ${INSTALL_MAN} ${WRKSRC}/docs/manpages/*.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 + .for f in client.conf global.conf idmef-client.conf tls.conf ${INSTALL_DATA} ${WRKSRC}/${f} \ - ${PREFIX}/etc/prelude/default/${f}-dist -.if !exists(${PREFIX}/etc/prelude/default/${f}) - (cd ${PREFIX}/etc/prelude/default && ${CP} -p ${f}-dist ${f}) -.endif + ${STAGEDIR}${ETCDIR}/default/${f}.sample + ${RM} ${STAGEDIR}${ETCDIR}/default/${f} # Remove files install-data-local installs .endfor + .if ${PORT_OPTIONS:MPERL} -@${RM} -f ${PREFIX}/lib/perl5/${PERL_VER}/${PERL_ARCH}/perllocal.pod .endif + .if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/docs/api/html/* ${DOCSDIR} + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/api/html/* ${STAGEDIR}${DOCSDIR} .endif .include <bsd.port.post.mk> diff --git a/security/libprelude/pkg-plist b/security/libprelude/pkg-plist index 512ce14fdf18..6fe2bdd7c8e9 100644 --- a/security/libprelude/pkg-plist +++ b/security/libprelude/pkg-plist @@ -1,18 +1,10 @@ bin/libprelude-config bin/prelude-adduser bin/prelude-admin -@unexec if cmp -s %D/etc/prelude/default/client.conf %D/etc/prelude/default/client.conf-dist; then rm -f %D/etc/prelude/default/client.conf; fi -etc/prelude/default/client.conf-dist -@exec if [ ! -f %D/etc/prelude/default/client.conf ] ; then cp -p %D/%F %B/client.conf; fi -@unexec if cmp -s %D/etc/prelude/default/global.conf %D/etc/prelude/default/global.conf-dist; then rm -f %D/etc/prelude/default/global.conf; fi -etc/prelude/default/global.conf-dist -@exec if [ ! -f %D/etc/prelude/default/global.conf ] ; then cp -p %D/%F %B/global.conf; fi -@unexec if cmp -s %D/etc/prelude/default/idmef-client.conf %D/etc/prelude/default/idmef-client.conf-dist; then rm -f %D/etc/prelude/default/idmef-client.conf; fi -etc/prelude/default/idmef-client.conf-dist -@exec if [ ! -f %D/etc/prelude/default/idmef-client.conf ] ; then cp -p %D/%F %B/idmef-client.conf; fi -@unexec if cmp -s %D/etc/prelude/default/tls.conf %D/etc/prelude/default/tls.conf-dist; then rm -f %D/etc/prelude/default/tls.conf; fi -etc/prelude/default/tls.conf-dist -@exec if [ ! -f %D/etc/prelude/default/tls.conf ] ; then cp -p %D/%F %B/tls.conf; fi +@sample %%ETCDIR%%/default/client.conf.sample +@sample %%ETCDIR%%/default/global.conf.sample +@sample %%ETCDIR%%/default/idmef-client.conf.sample +@sample %%ETCDIR%%/default/tls.conf.sample include/libprelude/common.h include/libprelude/daemonize.h include/libprelude/idmef.h @@ -72,13 +64,14 @@ include/libprelude/prelude-string.h include/libprelude/prelude-thread.h include/libprelude/prelude-timer.h lib/libprelude.a -lib/libprelude.la lib/libprelude.so -lib/libprelude.so.21 +lib/libprelude.so.2 +lib/libprelude.so.2.19.1 lib/libpreludecpp.a -lib/libpreludecpp.la lib/libpreludecpp.so -lib/libpreludecpp.so.3 +lib/libpreludecpp.so.0 +lib/libpreludecpp.so.0.3.0 +man/man1/prelude-admin.1.gz %%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/Prelude.pm %%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Prelude/.packlist %%PERL%%%%SITE_PERL%%/%%PERL_ARCH%%/auto/Prelude/Prelude.so @@ -96,8 +89,8 @@ share/aclocal/libprelude.m4 %%PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/PreludeEasy %%PERL%%@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Prelude @dirrm include/libprelude -@dirrm etc/prelude/default -@dirrmtry etc/prelude/profile -@dirrmtry etc/prelude +@dirrmtry %%ETCDIR%%/default +@dirrmtry %%ETCDIR%%/profile +@dirrmtry %%ETCDIR%% @exec install -d -o root -g wheel -m 711 /var/spool/prelude @unexec rmdir /var/spool/prelude 2>/dev/null || true |