pkgsrc-WIP-changes archive

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

Import sample configuration file for minerd



Module Name:	pkgsrc-wip
Committed By:	Pierre Pronchery <khorben%defora.org@localhost>
Pushed By:	khorben
Date:		Wed Sep 20 19:46:51 2017 +0200
Changeset:	2f203fee3c27cfdc77140218c2aaccfa6cd335b1

Modified Files:
	cpuminer/Makefile
	cpuminer/PLIST
	cpuminer/files/minerd.sh
Added Files:
	cpuminer/files/minerd.conf

Log Message:
Import sample configuration file for minerd

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

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

diffstat:
 cpuminer/Makefile          | 9 +++++++++
 cpuminer/PLIST             | 1 +
 cpuminer/files/minerd.conf | 6 ++++++
 cpuminer/files/minerd.sh   | 5 +++--
 4 files changed, 19 insertions(+), 2 deletions(-)

diffs:
diff --git a/cpuminer/Makefile b/cpuminer/Makefile
index b656005496..42e5db4d90 100644
--- a/cpuminer/Makefile
+++ b/cpuminer/Makefile
@@ -17,5 +17,14 @@ GNU_CONFIGURE=	yes
 
 RCD_SCRIPTS=	minerd
 
+CONF_FILES+=	${PREFIX}/share/examples/cpuminer/minerd.conf \
+		${PKG_SYSCONFDIR}/minerd.conf
+
+INSTALLATION_DIRS+=	share/examples/cpuminer
+
+post-install:
+	${INSTALL_DATA} ${FILESDIR}/minerd.conf \
+		${DESTDIR}${PREFIX}/share/examples/cpuminer
+
 .include "../../www/curl/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/cpuminer/PLIST b/cpuminer/PLIST
index 97d2ff38ab..098ff9e495 100644
--- a/cpuminer/PLIST
+++ b/cpuminer/PLIST
@@ -1,3 +1,4 @@
 @comment $NetBSD$
 bin/minerd
 man/man1/minerd.1
+share/examples/cpuminer/minerd.conf
diff --git a/cpuminer/files/minerd.conf b/cpuminer/files/minerd.conf
new file mode 100644
index 0000000000..fca17d8e5f
--- /dev/null
+++ b/cpuminer/files/minerd.conf
@@ -0,0 +1,6 @@
+{
+	"url": "stratum+tcp://example.com:3333",
+	"userpass": "foo:bar",
+	"retry-pause": "10",
+	"quiet": true
+}
diff --git a/cpuminer/files/minerd.sh b/cpuminer/files/minerd.sh
index 43588d0baa..5628caa95b 100644
--- a/cpuminer/files/minerd.sh
+++ b/cpuminer/files/minerd.sh
@@ -10,8 +10,9 @@
 
 name="minerd"
 rcvar=$name
-command="/usr/pkg/bin/${name}"
-minerd_flags="-B"
+command="@PREFIX@/bin/${name}"
+required_files="@PKG_SYSCONFDIR@/minerd.conf"
+minerd_flags="-B -c @PKG_SYSCONFDIR@/minerd.conf"
 
 load_rc_config $name
 run_rc_command "$1"


Home | Main Index | Thread Index | Old Index