pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

snmp_exporter: finish package



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%gatalith.at@localhost>
Pushed By:	wiz
Date:		Sun Dec 17 23:05:18 2023 +0100
Changeset:	fe3be77ad38b4648876dc25aa8f4ed0da65e2e9d

Modified Files:
	snmp_exporter/Makefile
	snmp_exporter/PLIST
Removed Files:
	snmp_exporter/TODO

Log Message:
snmp_exporter: finish package

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=fe3be77ad38b4648876dc25aa8f4ed0da65e2e9d

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 snmp_exporter/Makefile | 15 +++++++++++----
 snmp_exporter/PLIST    |  6 +++---
 snmp_exporter/TODO     |  6 ------
 3 files changed, 14 insertions(+), 13 deletions(-)

diffs:
diff --git a/snmp_exporter/Makefile b/snmp_exporter/Makefile
index 365e338560..2446093fe8 100644
--- a/snmp_exporter/Makefile
+++ b/snmp_exporter/Makefile
@@ -10,10 +10,17 @@ HOMEPAGE=	https://github.com/prometheus/snmp_exporter/
 COMMENT=	SNMP Exporter for Prometheus
 LICENSE=	apache-2.0
 
-# go link -r?
-# go link -extldflags?
-#GO_BUILD_PATTERN+=	-ldflags '-r ${PREFIX}/lib'
-#GO_BUILD_PATTERN+=	./...
+SUBST_CLASSES+=		path
+SUBST_SED.path+=	-e 's|-L/usr/local/lib|-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib|'
+SUBST_SED.path+=	-e 's,/usr/local,${PREFIX},'
+SUBST_FILES.path+=	generator/net_snmp.go
+SUBST_MESSAGE.path=	Fixing path to includes and libraries.
+SUBST_STAGE.path=	pre-configure
+
+INSTALLATION_DIRS+=	share/doc/snmp_exporter
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/README.md ${DESTDIR}${PREFIX}/share/doc/snmp_exporter
 
 .include "go-modules.mk"
 .include "../../lang/go/go-module.mk"
diff --git a/snmp_exporter/PLIST b/snmp_exporter/PLIST
index 92ba51a2d7..8d29186a71 100644
--- a/snmp_exporter/PLIST
+++ b/snmp_exporter/PLIST
@@ -1,4 +1,4 @@
 @comment $NetBSD$
-@comment TODO: to fill this file with the file listing:
-@comment TODO: 1. run "/usr/bin/make package"
-@comment TODO: 2. run "/usr/bin/make print-PLIST"
+bin/generator
+bin/snmp_exporter
+share/doc/snmp_exporter/README.md
diff --git a/snmp_exporter/TODO b/snmp_exporter/TODO
deleted file mode 100644
index 8028846080..0000000000
--- a/snmp_exporter/TODO
+++ /dev/null
@@ -1,6 +0,0 @@
-Fails to link against libnetsnmp, and I can't find the magic values
-to pass to GO_BUILD_PATTERN:
-
-# github.com/prometheus/snmp_exporter/generator
-/usr/pkg/go121/pkg/tool/netbsd_amd64/link: running gcc failed: exit status 1
-ld: cannot find -lnetsnmp: No such file or directory


Home | Main Index | Thread Index | Old Index