diff options
author | layman <layman@localhost> | 2013-11-30 13:45:23 -0500 |
---|---|---|
committer | layman <layman@localhost> | 2013-11-30 13:45:23 -0500 |
commit | a783543c96ed52202f5e7d8b6e05c34ce3816854 (patch) | |
tree | f44fae8cce714cfcb465b4b83d5bc55fb36b5fa7 | |
parent | net-p2p/ppcoin-qt: initial commit (diff) | |
download | blueness-a783543c96ed52202f5e7d8b6e05c34ce3816854.tar.gz blueness-a783543c96ed52202f5e7d8b6e05c34ce3816854.tar.bz2 blueness-a783543c96ed52202f5e7d8b6e05c34ce3816854.zip |
net-p2p/ppcoind: initial commit
Package-Manager: portage-2.2.7
Manifest-Sign-Key: 0xF52D4BBA
-rw-r--r-- | net-p2p/ppcoind/Manifest | 28 | ||||
-rw-r--r-- | net-p2p/ppcoind/files/ppcoin.conf | 8 | ||||
-rw-r--r-- | net-p2p/ppcoind/files/ppcoin.confd | 10 | ||||
-rw-r--r-- | net-p2p/ppcoind/files/ppcoin.initd | 104 | ||||
-rw-r--r-- | net-p2p/ppcoind/files/ppcoin.service | 30 | ||||
-rw-r--r-- | net-p2p/ppcoind/files/ppcoind.logrotate | 7 | ||||
-rw-r--r-- | net-p2p/ppcoind/metadata.xml | 11 | ||||
-rw-r--r-- | net-p2p/ppcoind/ppcoind-0.3.0.ebuild | 116 |
8 files changed, 314 insertions, 0 deletions
diff --git a/net-p2p/ppcoind/Manifest b/net-p2p/ppcoind/Manifest new file mode 100644 index 0000000..9375613 --- /dev/null +++ b/net-p2p/ppcoind/Manifest @@ -0,0 +1,28 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX ppcoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123 +AUX ppcoin.confd 233 SHA256 fb877ae7608b5c2aaae29e522d8cfb42e51e064831c64b228b64da2b11aac64d SHA512 efb8f210143d993e922668e3daffc8bb74406be2f912729f68ebfcbcb3d44e10e0fed495963c4273a95099d37f3afc66b49616724bd827e6b4359b2e3a27d9c3 WHIRLPOOL 12e7a8e82d33b023be054c6c019cc61a5783e32e108e54358c76789e1e89ce441a095561e1a4750cb341350ef7da7a97b6ebfb06f8ec3a7fcd2809e27d5eb110 +AUX ppcoin.initd 2451 SHA256 36146630912dcf0468f0ec8311baa3eb5150e596c8a5963f293610804ba818dc SHA512 ed289b877653b42132a3c9b85832a7248da2c2956adffadfe71523b7d01feafd7738ebf050c0dee974237ea015b46610221ecb1d706ea4593e53ee6cb6c02448 WHIRLPOOL 5460640f1aed58cca4e1b3a45d0e93f8997a16df21c75beb1972dd4371bdf166a6d3b067acd1167a850e97794abd2943bebd12b8cac7cfd8ee9252cbdc0968e5 +AUX ppcoin.service 859 SHA256 df6e7f616816a07efb4d3d627d1ee80699f541bdcbafce7ba7aef2640291bce9 SHA512 8395ef4f5b026757f4202c78eb55b6978d2cdec49f6db801bb6daddea8d8a524afacf53368a78c3a7055ce5cc4ada53ac6c88567b02951fa7a722e5dd9ebd3c1 WHIRLPOOL bbd546e3d7043132f65117e567fe0f0b756f60093184e67316398cc8589f46a5029d9118431a4fa2d5e9e834c1f2beb180f0e5e20f8d7a8ae1fa96273b278076 +AUX ppcoind.logrotate 107 SHA256 5aefed737e73b6393e2f004318b34429616a35187131bade4743a1c8aa7e7d91 SHA512 bf36d07a6dcebcc50ac7e0b74433333902df6ef22396a876b96289cca90882720ed95ef0cc8fbf3abeea6800cbe2386e56b27bb798922f3be98134dee1caed69 WHIRLPOOL 68521503b26df24b66dd20a9ef3174ffc1427abf483185b709d46fc54d148250e4a85ee887e292398063205737640b7accd7365cd707ea5c3e80b72b503e3880 +DIST ppcoin-0.3.0.tar.gz 12233878 SHA256 919bb1c60eeebdd173ddcd4c83264f745bbf2af29410ded062f6c6bfce44f694 SHA512 c5f505a162e5044b3173c301d52b4851a6e3fbb4dbc2742c7204d583f534e235b1c8942b1afc5d9613d6a37009da83e1a9708fe4edfb68cb9717b76666bf029f WHIRLPOOL ab23d64672cfa9882d1dd23aad6a7448c9f4d7669557ddadabf80a1733682a46d4b5becc4605b40fbd2e943203897edfc4ba8904dee284bde055d81769404246 +EBUILD ppcoind-0.3.0.ebuild 2594 SHA256 d780ca7cccd02de0a5f98ed7dba31f11ee5a755e7e68f710ccf855d5de9f6eb6 SHA512 374e31345de23a6646d9d986c464cb7acfa85a3553e7276686a30dff71b5b5c251cb65b55b5687fa5f1519d5e9bdf0286bebb6d8156e5fb11cfa0f842de42931 WHIRLPOOL b1e7aa7c21ff651f8724078c46872c1ce46eb2842eb03fdcaa4a2f5890a7d3024ee707ced3268e56b0e051233e9b3fae27725c3b938adebb117dd6fac595a743 +MISC metadata.xml 327 SHA256 2009a65ac31a6a928926715ab212766020927524623581b18ee1f5026a6a689c SHA512 4d68f30b7c29aa5b6c3f7fd5c657ffbbe12706ce5d8d332cd8848906a27ae852e39d48219f6137a65c31db9c7693c2218edf8b6b1511cb1098d86bdb394cd0f9 WHIRLPOOL f7ad1bdb29423c9a88a721e77168aa35372a3411f77c775e2ac518eefc7ee39def4a307a66b4da02f80a6e9d8cdcff8fafa20da1792b7909e84bcad67598c4d9 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (GNU/Linux) + +iQIcBAEBCAAGBQJSmjJDAAoJEJOE+m71LUu61KwP/18OIC7AbiXAUxUunB+bRk87 +C5vW+VneqnltEVo/N6ts8BtNPp+PlwPiZ4smwN1h2+GSbkqyMK6mTFdKFqEbKh+U +r3v7VWbY8EBSJ5Xh+xMGM8WZlqFjazAI7inj2q8YtIYPwz5UgYiqTorHVNQBg7c5 +1wvSZGbTNRcW3KTnjNZ1vaXK0EebkyL0jHOrFFUo0POHunQYz8vkq2ojgaYjEGuD +o1kl8grsAsu2h6WSOlNkx51B98PYy3AV/AaZu4QzNF5lM67NntC4FCNu1NG5Gpbs +GJ3UR0/rRjPIwbnuodBnMepMB+H3Q6/hIlHO4GumGpsdJyesK1MKB9jr1noYf90D +DJW7Ae5WriVB5gHr9jfrEZ0uZA8bpc2zawIVnYzqwNv8SdKCKWRihdxEOOab3pWI +01gAjEBtmKspB6UScXDBdw3tQbf9UD9rgrDleriw0NIQQRXMcsnj3rHbLLTUkjsY +XkHJKzb+yEnKcvXhqV65MPFn5fnJvfmM4+FMPPKrzanU00LlsLHyuHuAiYPmWBUY +8fvmvihUGjcn0h+96oH87yfWH47Ju5vLyeWhgPcJVI5YO7AIo7MMrRuF9Z34dQwg +nI1YokOAqvc/WMicKpwCT8QB5dtJaGmirA7pes9kknD7fYXEoFk7RNkVWkHSZedz +t6Ye6Vu+iSgR0hLIHrWD +=wdKy +-----END PGP SIGNATURE----- diff --git a/net-p2p/ppcoind/files/ppcoin.conf b/net-p2p/ppcoind/files/ppcoin.conf new file mode 100644 index 0000000..c6a55f3 --- /dev/null +++ b/net-p2p/ppcoind/files/ppcoin.conf @@ -0,0 +1,8 @@ +# http://www.bitcoin.org/smf/index.php?topic=644.0 +#rpcuser= +#rpcpassword= + + + + + diff --git a/net-p2p/ppcoind/files/ppcoin.confd b/net-p2p/ppcoind/files/ppcoin.confd new file mode 100644 index 0000000..81fbf49 --- /dev/null +++ b/net-p2p/ppcoind/files/ppcoin.confd @@ -0,0 +1,10 @@ +# Config file for /etc/init.d/ppcoind + +# owner of ppciond process (don't change, must be existing) +PPCOIN_USER="ppcoin" + +# See http://www.bitcoin.org/smf/index.php?topic=1063 +PPCOIN_OPTS="${PPCOIN_OPTS}" + +# nice level +NICELEVEL="19" diff --git a/net-p2p/ppcoind/files/ppcoin.initd b/net-p2p/ppcoind/files/ppcoin.initd new file mode 100644 index 0000000..1c73731 --- /dev/null +++ b/net-p2p/ppcoind/files/ppcoin.initd @@ -0,0 +1,104 @@ +#!/sbin/runscript +# Distributed under the terms of the GNU General Public License, v2 or later + +VARDIR="/var/lib/ppcoin" +CONFFILE="${VARDIR}/.ppcoin/ppcoin.conf" + +depend() { + need net +} + +checkconfig() { + if [[ "${PPCOIN_USER}" == "" ]] ; then + eerror "Please edit /etc/conf.d/ppcoind" + eerror "A user must be specified to run ppcoind as that user." + eerror "Modify USER to your needs (you may also add a group after a colon)" + return 1 + fi + if ! `getent passwd | cut -d ':' -f 1 | grep $( echo "${PPCOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then + eerror "Please edit /etc/conf.d/ppcoind" + eerror "Specified user must exist!" + return 1 + fi + if `echo "${PPCOIN_USER}" | grep ':' -sq` ; then + if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${PPCOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then + eerror "Please edit /etc/conf.d/ppcoind" + eerror "Specified group must exist!" + return 1 + fi + fi + 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 + if ! stat -Lc '%a' "${CONFFILE}" | grep -q '^[4567]00$'; then + eerror "`readlink -f ${CONFFILE}` should not be readable by other users" + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + ebegin "Starting PPcoind daemon" + + pkg-config openrc + if [ $? = 0 ]; then + start_openrc + else + start_baselayout + fi +} + +stop() { + ebegin "Stopping PPcoin daemon" + + pkg-config openrc + if [ $? = 0 ]; then + stop_openrc + else + stop_baselayout + fi +} + +start_openrc() { + start-stop-daemon \ + --start --user "${PPCOIN_USER}" --name ppcoind \ + --pidfile /var/run/ppcoind.pid --make-pidfile \ + --env HOME="${VARDIR}" --exec /usr/bin/ppcoind \ + --nicelevel "${NICELEVEL}" \ + --background \ + --wait 2000 \ + -- ${PPCOIN_OPTS} + eend $? +} + +stop_openrc() { + start-stop-daemon --stop --user "${PPCOIN_USER}" \ + --name ppcoind --pidfile /var/run/ppcoind.pid \ + --wait 30000 \ + --progress + eend $? +} + +start_baselayout() { + start-stop-daemon \ + --start --user "${PPCOIN_USER}" --name ppcoind \ + --pidfile /var/run/ppcoind.pid --make-pidfile \ + --env HOME="${VARDIR}" --exec /usr/bin/ppcoind \ + --chuid "${PPCOIN_USER}" \ + --nicelevel "${NICELEVEL}" \ + --background \ + -- ${PPCOIN_OPTS} + eend $? +} + +stop_baselayout() { + start-stop-daemon \ + --stop \ + --user "${PPCOIN_USER}" \ + --name ppcoind \ + --pidfile /var/run/ppcoind.pid + eend $? +} diff --git a/net-p2p/ppcoind/files/ppcoin.service b/net-p2p/ppcoind/files/ppcoin.service new file mode 100644 index 0000000..3a83178 --- /dev/null +++ b/net-p2p/ppcoind/files/ppcoin.service @@ -0,0 +1,30 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to create file +# "/etc/systemd/system/ppcoind.service.d/*.conf" +# containing your changes + +# For example, if you want to change some daemon and/or unit options, +# create a file named +# "/etc/systemd/system/ppcoind.service.d/myopts.conf" +# containing: +# [Service] +# Environment="PPCOIN_OPTS=-debug -logtimestamps" +# Nice=10 +# This will override the setting appearing below. + +# Note that almost all daemon options could be specified in +# /etc/ppcoin/ppcoin.conf + +[Unit] +Description=PPcoin Daemon +After=network.target + +[Service] +User=ppcoin +Environment=PPCOIN_OPTS= +ExecStart=/usr/bin/ppcoind -daemon=0 $PPCOIN_OPTS +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/net-p2p/ppcoind/files/ppcoind.logrotate b/net-p2p/ppcoind/files/ppcoind.logrotate new file mode 100644 index 0000000..4ea060b --- /dev/null +++ b/net-p2p/ppcoind/files/ppcoind.logrotate @@ -0,0 +1,7 @@ +/var/lib/ppcoin/.ppcoin/debug.log { + weekly + sharedscripts + postrotate + killall -HUP ppcoind + endscript +} diff --git a/net-p2p/ppcoind/metadata.xml b/net-p2p/ppcoind/metadata.xml new file mode 100644 index 0000000..5c226ba --- /dev/null +++ b/net-p2p/ppcoind/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> + </maintainer> + <use> + <flag name='logrotate'>Use app-admin/logrotate for rotating logs</flag> + </use> +</pkgmetadata> diff --git a/net-p2p/ppcoind/ppcoind-0.3.0.ebuild b/net-p2p/ppcoind/ppcoind-0.3.0.ebuild new file mode 100644 index 0000000..993e061 --- /dev/null +++ b/net-p2p/ppcoind/ppcoind-0.3.0.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +DB_VER="4.8" + +inherit bash-completion-r1 db-use eutils systemd + +MyPV="${PV/_/-}" +MyPN="ppcoin" +MyP="${MyPN}-${MyPV}" + +DESCRIPTION="Cryptocurrency forked from Bitcoin which aims to be energy efficiency." +HOMEPAGE="http://peercoin.net/" +SRC_URI="mirror://sourceforge/${MyPN}/${MyP}-linux.tar.gz -> ${MyP}.tar.gz" + +LICENSE="MIT ISC GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples ipv6 logrotate upnp" + +RDEPEND=" + >=dev-libs/boost-1.41.0[threads(+)] + dev-libs/openssl:0[-bindist] + logrotate? ( + app-admin/logrotate + ) + upnp? ( + net-libs/miniupnpc + ) + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx] +" +DEPEND="${RDEPEND} + >=app-shells/bash-4.1 + sys-apps/sed +" + +S="${WORKDIR}/${MyP}-linux/src" + +pkg_setup() { + local UG='ppcoin' + enewgroup "${UG}" + enewuser "${UG}" -1 -1 /var/lib/ppcoin "${UG}" +} + +src_prepare() { + 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 +#src_test() { +# cd src || die +# emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" -f makefile.unix "${OPTS[@]}" test_ppcoin +# ./test_ppcoin || die 'Tests failed' +#} + +src_install() { + dobin src/${PN} + + insinto /etc/ppcoin + doins "${FILESDIR}/ppcoin.conf" + fowners ppcoin:ppcoin /etc/ppcoin/ppcoin.conf + fperms 600 /etc/ppcoin/ppcoin.conf + + newconfd "${FILESDIR}/ppcoin.confd" ${PN} + newinitd "${FILESDIR}/ppcoin.initd" ${PN} + systemd_dounit "${FILESDIR}/ppcoin.service" + + keepdir /var/lib/ppcoin/.ppcoin + fperms 700 /var/lib/ppcoin + fowners ppcoin:ppcoin /var/lib/ppcoin/ + fowners ppcoin:ppcoin /var/lib/ppcoin/.ppcoin + dosym /etc/ppcoin/ppcoin.conf /var/lib/ppcoin/.ppcoin/ppcoin.conf + + dodoc README + newman contrib/debian/manpages/bitcoind.1 ppcoind.1 + newman contrib/debian/manpages/bitcoin.conf.5 ppcoin.conf.5 + + if use examples; then + docinto examples + dodoc -r contrib/{bitrpc,gitian-descriptors,gitian-downloader,pyminer,wallettools} + + fi + + if use logrotate; then + insinto /etc/logrotate.d + newins "${FILESDIR}/ppcoind.logrotate" ppcoind + fi +} |