libsmi: do not install smicache by default

According to comments in the script itself:
# NOTE, that smicache has just been an experiment. It is NOT suggested
# to use it in a production environment.

Add option to install it for those that want it anyway.

Bump PKGREVISION.
This commit is contained in:
wiz 2022-01-08 14:50:59 +00:00
parent 16b24ab6d3
commit 3fe9975823
3 changed files with 23 additions and 5 deletions

View file

@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.20 2020/01/26 17:30:59 rillig Exp $
# $NetBSD: Makefile,v 1.21 2022/01/08 14:50:59 wiz Exp $
DISTNAME= libsmi-0.5.0
PKGREVISION= 1
CATEGORIES= devel net
MASTER_SITES= http://www.ibr.cs.tu-bs.de/projects/libsmi/download/
@ -12,8 +13,6 @@ LICENSE= esdl-license
MIBDIR= ${PREFIX}/share/libsmi/mibs
PIBDIR= ${PREFIX}/share/libsmi/pibs
DEPENDS+= wget-[0-9]*:../../net/wget
USE_LIBTOOL= yes
USE_TOOLS+= gmake
GNU_CONFIGURE= yes
@ -27,6 +26,8 @@ REPLACE_SH+= test/*.test.in
TEST_TARGET= check
.include "options.mk"
post-extract:
rm -f ${WRKSRC}/test/smilint-smiv2.test

View file

@ -1,5 +1,5 @@
@comment $NetBSD: PLIST,v 1.8 2015/11/06 17:07:23 adam Exp $
bin/smicache
@comment $NetBSD: PLIST,v 1.9 2022/01/08 14:50:59 wiz Exp $
${PLIST.smicache}bin/smicache
bin/smidiff
bin/smidump
bin/smilint

17
devel/libsmi/options.mk Normal file
View file

@ -0,0 +1,17 @@
# $NetBSD: options.mk,v 1.1 2022/01/08 14:50:59 wiz Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.libsmi
PKG_SUPPORTED_OPTIONS= wget
.include "../../mk/bsd.options.mk"
PLIST_VARS+= smicache
.if !empty(PKG_OPTIONS:Mwget)
DEPENDS+= wget-[0-9]*:../../net/wget
PLIST.smicache= yes
.else
post-install: remove-smicache
.PHONY: remove-smicache
remove-smicache:
rm ${DESTDIR}${PREFIX}/bin/smicache
.endif