summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-02-25 18:27:11 +0000
committerAnthony G. Basile <blueness@gentoo.org>2014-02-25 18:27:11 +0000
commit9d36dff742e1dd5104792a30a55cd10d499411d3 (patch)
tree8ede9e5a33b11d07584c87595daf407e63e756c1 /net-p2p
parentAdd imrpoved initd, bug #500602 (diff)
downloadhistorical-9d36dff742e1dd5104792a30a55cd10d499411d3.tar.gz
historical-9d36dff742e1dd5104792a30a55cd10d499411d3.tar.bz2
historical-9d36dff742e1dd5104792a30a55cd10d499411d3.zip
Add improved initd, bug #500602
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/primecoind/ChangeLog8
-rw-r--r--net-p2p/primecoind/Manifest30
-rw-r--r--net-p2p/primecoind/files/primecoin.initd-r129
-rw-r--r--net-p2p/primecoind/primecoind-0.1.2-r1.ebuild124
4 files changed, 176 insertions, 15 deletions
diff --git a/net-p2p/primecoind/ChangeLog b/net-p2p/primecoind/ChangeLog
index 8c96d470e574..99280a797ff0 100644
--- a/net-p2p/primecoind/ChangeLog
+++ b/net-p2p/primecoind/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-p2p/primecoind
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-p2p/primecoind/ChangeLog,v 1.2 2014/01/08 06:27:22 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/primecoind/ChangeLog,v 1.3 2014/02/25 18:26:59 blueness Exp $
+
+*primecoind-0.1.2-r1 (25 Feb 2014)
+
+ 25 Feb 2014; Anthony G. Basile <blueness@gentoo.org>
+ +files/primecoin.initd-r1, +primecoind-0.1.2-r1.ebuild:
+ Add improved initd, bug #500602
08 Jan 2014; Mike Frysinger <vapier@gentoo.org> primecoind-0.1.2.ebuild:
Inherit the user eclass for enewuser/etc...
diff --git a/net-p2p/primecoind/Manifest b/net-p2p/primecoind/Manifest
index 9fa1c79c1a2c..569d7376a457 100644
--- a/net-p2p/primecoind/Manifest
+++ b/net-p2p/primecoind/Manifest
@@ -5,26 +5,28 @@ AUX primecoin-sys_leveldb.patch 6836 SHA256 460e6d013d897d108c8c0234dc0a5f57b114
AUX primecoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123
AUX primecoin.confd 251 SHA256 a6aed5bde7b688ccdbeff88b67e5f912f031ca65fb9cc5c0ce0ddc3d00fd7ac2 SHA512 e291ae30a35b19e29982615875003c0d9c81b70e79f023ad4ada0166ba9199df5dd17d7f72750d9fe681e2c7ccfa5696e9f34a661449fa4a1210690e4d4c0d4e WHIRLPOOL a36b5e113598c68c947b829822d5f0f4f8a1944dda2905a73268f2ec48ff47b1dd2af4833c22e7acda92de52125e671cb6d8b847c3421658d044c16170aeeb87
AUX primecoin.initd 2541 SHA256 39697a124ab6bbccb2688ffad3dcd3761020941fc5c10c2129685f57c00e8ce0 SHA512 41a6a7272701b95cf5f4fe9fac60ff0f126ce49f02cd27955d76fbc7bf630aa5c6b5dc16f15e3eba22a28ffef9430132cbdcec8150ffc6c087809843ffebb767 WHIRLPOOL d5f842d64cd6f333f710ed836ce7da9cacce5822dd28644eb7a3c8aaece52b5a0a63af7080280a60e3def35fe73167184afe0de8dd4e845d0231d3a461a5bd42
+AUX primecoin.initd-r1 956 SHA256 eee9eff97ffe848461df0b6dd5242869234cca7de1829a1efe58c55181038219 SHA512 e7c0a847cbd4679ee89ce2489c1ef98d58a4d39cb65ba7e96abbd6e76ba46e049c9693ea7e1c3b9c5befd06fa5ee89609df265e57d183d7543a78de192873b45 WHIRLPOOL b0502870636467d9c81b56efc82a61528e11d8a01692256b8945da41c2c88697164337a0a41629d71f9a9406c086e74d21e082df2688b9fdc7e28cf9b85e193b
AUX primecoin.service 889 SHA256 f38b0b67a950b1b43dce4906aeece22bd186ddc198bce0b9136edc5bf4149fd3 SHA512 5b37b776f419bf9da51952e9a4b3bc7f8879297d1e6d8d551ea4658a8daf7f2f5138bd018443a514ee7787b8c6265fadc409bbc9bdb1d58a8df34ae312dbfd0f WHIRLPOOL 503a5e730cd9cee91308d8d79a0ed59f3ef0fe7dbd1c673c82deb5f12cf3c7c07de498d31b996c9fe0523ebba50752c792f8b636896b01b04718de2e929512d9
AUX primecoind.logrotate 116 SHA256 fb78530aad1491be7c75dede40e82809020b438f272a6a8506ba74eb9af0691b SHA512 ad6873f47e73a305e3b44fc0a6e9ef430a2e82392ff6c5230f365aaa1b1d64afc8d97094006dc2b57b8b9245288f3e144ecdccb5913d98d7171fcd6a216022e9 WHIRLPOOL 0d6c4b3fcbe60de559febe9d8029de177821c0aceec31fdae3b9b907aebc24ffc4f1b7ecc2102a8ae486f25ac00fd479a1b349ce2ed39a1e6fb85a620b30a97e
DIST primecoin-0.1.2.tar.gz 16521236 SHA256 d0f3c6a91b4d505f25e9284bcca85e420cf09d0e6cf71e5a001b7e1367ef46d0 SHA512 cff71b0e6459c4e534e78acef9491090d05c0cb864a068c0a3cb289310a1ee13fd69c7b61a7d6cb9732af54fbcf1fa4e77db8c8528a09bbdafd36421fdf7aff1 WHIRLPOOL 5031efa135dcf08975a06a037179863ad180920e0c55e0ec5d1863b4b24d005ce829fa0e0f081120d3610bc0abd1d3919db477a33e32ec6d0d353b7177480eb1
+EBUILD primecoind-0.1.2-r1.ebuild 3141 SHA256 049fbc4e972ff5d03d80e9c0994684c05851e5220e56f27ee4decb5d7a5fa89f SHA512 569fdf9731cd6c3ec25c22083c7a5ec7e6758c8e524b54f1f4153809c6e23833fe2a4389e0574fa3dd80fd5090fe8ee1f7ea5412cd3778e68fe369f51e922031 WHIRLPOOL e89da4d5f96361dbf60d8a31bc1479ef06340205b1483891c3fd34104239fbee44cc9fdbfb292913a14a98282be6e28cf881dc30dfc1ffc319d4554d583b6bc8
EBUILD primecoind-0.1.2.ebuild 3133 SHA256 97e49a2b64a5138cf38ac735d5a00c3ba8be5a4ea1f801a3ec726ccba3eb7f69 SHA512 0f55542d2b0c8cb98755ca1adc40d91eaec169ed2b69c54981662906e6905eac847c5e78ae952b6c49ead372afc6ddeca0d70bd1c0d388aeba44999a21bb00fd WHIRLPOOL 734e745585ad5aaa166592269babf6bdc192d853fdee5d7ca8969248ae968a99bcf3907a0d65cbd91e6d32af35edbccb0b99a91d4bb76c0b61cee43826eb6262
-MISC ChangeLog 647 SHA256 ae5b14a3bfff3396a10bbf41b7432f514b69d3b7d26fbf6471f679ccb301fe6a SHA512 b2576aafa484e2f01b93fae2d8dcf7332324761c698292cbaf269c3f118e6cded67e08fcd4f026a3373655e74388eeb56f7f8b1c0a9532f4945535fddef2fefa WHIRLPOOL dfd2bb828f98c62c3d831b13dec624a43d2f31027a6f9052abf0db91956d90af29c2e5e8f5313cc8998d418be13b8fe55386f74842686e3163903488373c84cb
+MISC ChangeLog 833 SHA256 7037478ad4f3a6951176ede4b12d6a97d39eb62e751629fece1b584234f99c82 SHA512 2ee447e08ac2fcaa81ad8a42e1b1e859e22fe637ac794e9359172f23549eff553e26c349eb59d8198cdad7da009510739a546208e9d4482ccbbb9dd196255617 WHIRLPOOL e3e0e9a7339c7b17222d80714b74259822bffb3fd5585de418f46007ce7d8f4f7b8cc55488ffeb8737c58af90831c91f3ccc6da4aa2c429244e97cfbf5394b6f
MISC metadata.xml 327 SHA256 2009a65ac31a6a928926715ab212766020927524623581b18ee1f5026a6a689c SHA512 4d68f30b7c29aa5b6c3f7fd5c657ffbbe12706ce5d8d332cd8848906a27ae852e39d48219f6137a65c31db9c7693c2218edf8b6b1511cb1098d86bdb394cd0f9 WHIRLPOOL f7ad1bdb29423c9a88a721e77168aa35372a3411f77c775e2ac518eefc7ee39def4a307a66b4da02f80a6e9d8cdcff8fafa20da1792b7909e84bcad67598c4d9
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
-iQIcBAEBCAAGBQJSzO/SAAoJEPGu1DbS6WIAJToP/iQ7PAhEQcWRxy3ZdlmsEN6/
-nlJWScgzlg5tXXEB/gI7TLt/013/Q/ih93jFn48qMnlQSHFlaaHcJFldusZGBQCw
-tj9hbODIo00dRi65fPTlqeJBvmlRVixV8Lkvy3SblzVy1ae8FqReSUnEJevHnUbf
-rWmNG0RDtPAArKrAUgYzGT4awEAu4BTP0EddfW8p0QI9qqrlQU/Sos+me+LVdf/4
-WEMQQE8aoZ9oIBn6Z8QKn6u0ckx69YWw/Yc3w8HmqMx6mR24Mq5MCqG4haJNNP+s
-fXugq45/gxsNrh2XVuIi8AxejvmamMSvV8Xv2uHNLICaReTKQAyjxf8w0ZJGaOYT
-he1RiRb5WHIahYNaPraSq9QmnJCpxn6oJSyXLwnPvfFxzMEeYW0OJYyzoC/9ot6V
-StFxz1zkYXyssbD0K8W7SMvr3uHN+bG8CBwxeCS40ZQP/dgw7+bMSHHUtWprdJ3m
-Fao9KeJSk6okGc36013AsBXP0UHxDniWOhKplEXiFFZ6WI4kUEnLgLWCv06UBO1e
-TZcWBTOv5tVsz5B5avl1v7wvztafP6Ei+fQVIaQfBbuQxsoibl8Qn6DVmrAXYJhv
-G9zvovLilZV4LjyhCOd/zs2pCTwkli0KNLxNuQKzz2UV8JarN5BVAAUIrZjdecK7
-V6+3IjGDqZxlccLNSyQh
-=oVbA
+iQIcBAEBCAAGBQJTDODeAAoJEJOE+m71LUu6C1cP/iHp2K5WhXzNi0kZTabkz4LZ
+IYPb9EzAI5DYqWwodSNMDnL3li/gSrPnv9D4i3OdhyKGRdXe6mnlraDp4do54BlF
+VDculGHiqTlksNK8Ee6dQh8w0Hib+OceEsHKNV0a85ukmiTbhXqn0mU+3vrBof/4
+o1af/uvxdB8b1g78IpkdUdH9QwZqXBc8kGI/hMS5oxabTzXGQL7AxdpBbHDiUaUU
+KI75KBTyutI+bzAmO9Nsa5trRULYLyUru3K2Eg+rSFk7zadDSiuLZepybuxGzq29
+64yzwTLOO0Di1TEpt2x+pPsUux72WKP38isYMwoQMp3MmXvT9cBD/cZ06VIVOHRa
+m4AJjKyaICI0q+fJ3i4GKatY3Vi0N6dpJAw6TI9xQFjgczgq5y7PeJy/dJDHhv9w
+Zx1VGy36WrT7fXVPwaLuUQxRri95gxhq14QDlBLqef2Ohl/2ixxcRQPcUZ2sOsIf
+yT7W8mEbesBRCVdMdKyCiHGm/m+BMP1tEz4oileI1AGVIClu3qHk9SrHFyNSefwc
+86BjiJr7B+gTue1kxpA+biV8HKSCq4Lv0pnFAl/f6c2OuUuBTK4tsKDVlSqHRq0K
+9gYbE1A4jL3WogRawqqIEOItYQ/kwPoKzqcAd+scyNcWUyd38l+hvTIQXDUBwCvU
+NpwfASepSYxBJzElFE2T
+=Biwf
-----END PGP SIGNATURE-----
diff --git a/net-p2p/primecoind/files/primecoin.initd-r1 b/net-p2p/primecoind/files/primecoin.initd-r1
new file mode 100644
index 000000000000..6f0afea4d5b7
--- /dev/null
+++ b/net-p2p/primecoind/files/primecoin.initd-r1
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/primecoind/files/primecoin.initd-r1,v 1.1 2014/02/25 18:26:59 blueness Exp $
+
+vardir="/var/lib/primecoin"
+conffile="${vardir}/.primecoin/primecoin.conf"
+primecoind_user="${PRIMECOIN_USER:-nobody:nobody}"
+
+description="Bitcoin crypto-currency wallet for automated services"
+pidfile="/run/${SVCNAME}.pid"
+command="/usr/bin/primecoind"
+command_args="${PRIMECOIN_OPTS}"
+command_background="true"
+start_stop_daemon_args="-u ${primecoind_user} -e HOME=${vardir} -N ${NICELEVEL:-0} -w 2000"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -f -o ${primecoind_user} -m 0400 ${conffile} || return 1
+
+ if ! grep -q '^rpcpassword=' "${conffile}"; then
+ eerror "Please edit `readlink -f ${conffile}`"
+ eerror "There must be at least a line assigning rpcpassword=something-secure"
+ return 1
+ fi
+}
diff --git a/net-p2p/primecoind/primecoind-0.1.2-r1.ebuild b/net-p2p/primecoind/primecoind-0.1.2-r1.ebuild
new file mode 100644
index 000000000000..bbda88b1e0a4
--- /dev/null
+++ b/net-p2p/primecoind/primecoind-0.1.2-r1.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-p2p/primecoind/primecoind-0.1.2-r1.ebuild,v 1.1 2014/02/25 18:26:59 blueness Exp $
+
+EAPI=5
+
+DB_VER="4.8"
+
+inherit bash-completion-r1 db-use eutils systemd user
+
+MyPV="${PV/_/-}"
+MyPN="primecoin"
+MyP="${MyPN}-${MyPV}"
+
+DESCRIPTION="P2P Internet currency based on Bitcoin but easier to mine."
+HOMEPAGE="http://primecoin.org/"
+SRC_URI="mirror://sourceforge/${MyPN}/${MyP}-linux.tar.gz -> ${MyP}.tar.gz"
+
+LICENSE="MIT ISC GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bash-completion examples ipv6 logrotate upnp"
+
+RDEPEND="
+ dev-libs/boost[threads(+)]
+ dev-libs/openssl:0[-bindist]
+ logrotate? (
+ app-admin/logrotate
+ )
+ upnp? (
+ net-libs/miniupnpc
+ )
+ sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
+ <=dev-libs/leveldb-1.12.0[-snappy]
+"
+DEPEND="${RDEPEND}
+ >=app-shells/bash-4.1
+ sys-apps/sed
+"
+
+S="${WORKDIR}/${MyP}-linux/src"
+
+pkg_setup() {
+ local UG='primecoin'
+ enewgroup "${UG}"
+ enewuser "${UG}" -1 -1 /var/lib/primecoin "${UG}"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${MyPN}-sys_leveldb.patch
+ rm -r src/leveldb
+
+ if has_version '>=dev-libs/boost-1.52'; then
+ sed -i 's/\(-l db_cxx\)/-l boost_chrono$(BOOST_LIB_SUFFIX) \1/' src/makefile.unix
+ fi
+}
+
+src_configure() {
+ OPTS=()
+
+ OPTS+=("DEBUGFLAGS=")
+ OPTS+=("CXXFLAGS=${CXXFLAGS}")
+ OPTS+=("LDFLAGS=${LDFLAGS}")
+
+ if use upnp; then
+ OPTS+=("USE_UPNP=1")
+ else
+ OPTS+=("USE_UPNP=-")
+ fi
+
+ use ipv6 || OPTS+=("USE_IPV6=-")
+
+ OPTS+=("USE_SYSTEM_LEVELDB=1")
+ OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")")
+ OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}")
+
+ cd src || die
+ emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" ${PN}
+}
+
+#Tests are broken with and without our primecoin-sys_leveldb.patch.
+#When tests work, make sure to inherit toolchain-funcs
+#src_test() {
+# cd src || die
+# emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_primecoin
+# ./test_primecoin || die 'Tests failed'
+#}
+
+src_install() {
+ dobin src/${PN}
+
+ insinto /etc/primecoin
+ doins "${FILESDIR}/primecoin.conf"
+ fowners primecoin:primecoin /etc/primecoin/primecoin.conf
+ fperms 600 /etc/primecoin/primecoin.conf
+
+ newconfd "${FILESDIR}/primecoin.confd" ${PN}
+ newinitd "${FILESDIR}/primecoin.initd-r1" ${PN}
+ systemd_dounit "${FILESDIR}/primecoin.service"
+
+ keepdir /var/lib/primecoin/.primecoin
+ fperms 700 /var/lib/primecoin
+ fowners primecoin:primecoin /var/lib/primecoin/
+ fowners primecoin:primecoin /var/lib/primecoin/.primecoin
+ dosym /etc/primecoin/primecoin.conf /var/lib/primecoin/.primecoin/primecoin.conf
+
+ dodoc doc/README.md doc/release-notes.md
+ newman contrib/debian/manpages/bitcoind.1 primecoind.1
+ newman contrib/debian/manpages/bitcoin.conf.5 primecoin.conf.5
+
+ if use bash-completion; then
+ newbashcomp contrib/bitcoind.bash-completion ${PN}.bash-completion
+ fi
+
+ if use examples; then
+ docinto examples
+ dodoc -r contrib/{bitrpc,pyminer,spendfrom,tidy_datadir.sh,wallettools}
+ fi
+
+ if use logrotate; then
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}/primecoind.logrotate" primecoind
+ fi
+}