pkgsrc-WIP-changes archive

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

bitcoin: Switch to upstream's install target



Module Name:	pkgsrc-wip
Committed By:	Greg Troxel <gdt%ir.bbn.com@localhost>
Pushed By:	gdt
Date:		Tue Nov 29 13:04:16 2016 -0500
Changeset:	e7cbdb95eb45836bf919a2e208f75c716cd01591

Modified Files:
	bitcoin/Makefile
	bitcoin/PLIST
	bitcoin/files/bitcoind.sh

Log Message:
bitcoin: Switch to upstream's install target

This commit removes large amounts of special-case code surrounding
secp256k1, and replaces it with running the install target in the
secp256k1 source directory.  It remains to understand why upstream's
main install target does not do this, should this issue survive
version upgrades.

Move bitcoind to bin from sbin, because that's where upstream puts it.

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

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

diffstat:
 bitcoin/Makefile          | 20 +++++---------------
 bitcoin/PLIST             | 13 +++++++++----
 bitcoin/files/bitcoind.sh |  2 +-
 3 files changed, 15 insertions(+), 20 deletions(-)

diffs:
diff --git a/bitcoin/Makefile b/bitcoin/Makefile
index 752fe0b..1c44cf6 100644
--- a/bitcoin/Makefile
+++ b/bitcoin/Makefile
@@ -2,7 +2,7 @@
 
 # TODO: update to latest release
 DISTNAME=       bitcoin-0.11.2
-PKGREVISION=    5
+PKGREVISION=    6
 CATEGORIES=	finance
 MASTER_SITES=   ${MASTER_SITE_GITHUB:=bitcoin/}
 GITHUB_TAG=     v${PKGVERSION_NOREV}
@@ -38,10 +38,6 @@ CONFIGURE_ARGS+=  --enable-hardening
 # pkgsrc's db4 package installs as db4_, but bitcoin looks for db_.
 BUILDLINK_TRANSFORM+=   l:db_cxx:db4_cxx
 
-# TODO: (After updating,) file bug with bitcoin about not having
-# proper RPATH to its own libary.
-LDFLAGS+=	${COMPILER_RPATH_FLAG}${PREFIX}/lib/bitcoin -L${PREFIX}/lib/bitcoin
-
 RCD_SCRIPTS=	bitcoind
 BUILD_DEFS+=	VARBASE
 OWN_DIRS=	${VARBASE}/bitcoin
@@ -62,18 +58,12 @@ SUBST_MESSAGE.pkg=	Fixing /usr references to ${PREFIX}.
 pre-configure:
 	cd ${WRKSRC} && ./autogen.sh
 
-# TODO: bitcoin appears to have a functioning install target, so this should
-# not be necessary.
-# TODO: bitcoind is a bin_PROGRAM, not sbin_PROGRAM, per upstream.
-do-install:
-	${INSTALL_PROGRAM} ${WRKSRC}/src/bitcoin-cli ${DESTDIR}${PREFIX}/bin
-	${INSTALL_PROGRAM} ${WRKSRC}/src/.libs/bitcoind ${DESTDIR}${PREFIX}/sbin
-	${INSTALL_LIB} -m 644 ${WRKSRC}/src/secp256k1/libsecp256k1.la ${DESTDIR}${PREFIX}/lib/bitcoin
-	${INSTALL_LIB} ${WRKSRC}/src/secp256k1/.libs/libsecp256k1.so.0 ${DESTDIR}${PREFIX}/lib/bitcoin
-	${LN} -fs ${DESTDIR}${PREFIX}/lib/bitcoin/libsecp256k1.so.0 ${DESTDIR}${PREFIX}/lib/bitcoin/libsecp256k1.so
+# TODO: Decide if secp256k1 is supposed to be installed, and if so
+# where, or it if should be linked with privately.
+INSTALL_DIRS=	${BUILD_DIRS} src/secp256k1
 
-# Use the Debian example config file.
 post-install:
+	# Install the Debian example config file.
 	${INSTALL_DATA} -m 600 ${WRKSRC}/contrib/debian/examples/bitcoin.conf ${DESTDIR}${EGDIR}
 
 .include "options.mk"
diff --git a/bitcoin/PLIST b/bitcoin/PLIST
index 957d202..353e514 100644
--- a/bitcoin/PLIST
+++ b/bitcoin/PLIST
@@ -1,7 +1,12 @@
 @comment $NetBSD$
 bin/bitcoin-cli
-lib/bitcoin/libsecp256k1.la
-lib/bitcoin/libsecp256k1.so
-lib/bitcoin/libsecp256k1.so.0
-sbin/bitcoind
+bin/bitcoin-tx
+bin/bitcoind
+bin/test_bitcoin
+include/bitcoinconsensus.h
+include/secp256k1.h
+lib/libbitcoinconsensus.la
+lib/libsecp256k1.la
+lib/pkgconfig/libbitcoinconsensus.pc
+lib/pkgconfig/libsecp256k1.pc
 share/examples/bitcoin/bitcoin.conf
diff --git a/bitcoin/files/bitcoind.sh b/bitcoin/files/bitcoind.sh
index 9b1eb0a..ff1dc1b 100644
--- a/bitcoin/files/bitcoind.sh
+++ b/bitcoin/files/bitcoind.sh
@@ -13,7 +13,7 @@ fi
 
 name="bitcoind"
 rcvar=$name
-command="@PREFIX@/sbin/bitcoind"
+command="@PREFIX@/bin/bitcoind"
 pidfile="@VARBASE@/run/bitcoind.pid"
 required_directory="@VARBASE@/bitcoin"
 command_args="-daemon -conf=@PREFIX@/etc/bitcoin.conf -pid=${pidfile} -datadir=${required_directory}"


Home | Main Index | Thread Index | Old Index