diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2013-12-01 13:20:48 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2013-12-01 13:20:48 +0000 |
commit | 494cf8819f06aeea85dfca62ad7c5d616b97d515 (patch) | |
tree | eef0f803d0abaf1dfa221004b880526e479fb202 /net-p2p | |
parent | x86 stable, bug #491588 (diff) | |
download | historical-494cf8819f06aeea85dfca62ad7c5d616b97d515.tar.gz historical-494cf8819f06aeea85dfca62ad7c5d616b97d515.tar.bz2 historical-494cf8819f06aeea85dfca62ad7c5d616b97d515.zip |
Initial commit
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/litecoin-qt/ChangeLog | 11 | ||||
-rw-r--r-- | net-p2p/litecoin-qt/Manifest | 25 | ||||
-rw-r--r-- | net-p2p/litecoin-qt/files/litecoin-sys_leveldb.patch | 193 | ||||
-rw-r--r-- | net-p2p/litecoin-qt/litecoin-qt-0.8.5.3_rc3.ebuild | 143 | ||||
-rw-r--r-- | net-p2p/litecoin-qt/metadata.xml | 11 | ||||
-rw-r--r-- | net-p2p/litecoind/ChangeLog | 12 | ||||
-rw-r--r-- | net-p2p/litecoind/Manifest | 30 | ||||
-rw-r--r-- | net-p2p/litecoind/files/litecoin-sys_leveldb.patch | 193 | ||||
-rw-r--r-- | net-p2p/litecoind/files/litecoin.conf | 8 | ||||
-rw-r--r-- | net-p2p/litecoind/files/litecoin.confd | 10 | ||||
-rw-r--r-- | net-p2p/litecoind/files/litecoin.initd | 104 | ||||
-rw-r--r-- | net-p2p/litecoind/files/litecoin.service | 30 | ||||
-rw-r--r-- | net-p2p/litecoind/files/litecoind.logrotate | 7 | ||||
-rw-r--r-- | net-p2p/litecoind/litecoind-0.8.5.3_rc3.ebuild | 124 | ||||
-rw-r--r-- | net-p2p/litecoind/metadata.xml | 11 |
15 files changed, 912 insertions, 0 deletions
diff --git a/net-p2p/litecoin-qt/ChangeLog b/net-p2p/litecoin-qt/ChangeLog new file mode 100644 index 000000000000..19aa5701e1e1 --- /dev/null +++ b/net-p2p/litecoin-qt/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for net-p2p/litecoin-qt +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/litecoin-qt/ChangeLog,v 1.1 2013/12/01 13:18:01 blueness Exp $ + +*litecoin-qt-0.8.5.3_rc3 (01 Dec 2013) + + 01 Dec 2013; Anthony G. Basile <blueness@gentoo.org> + +litecoin-qt-0.8.5.3_rc3.ebuild, +files/litecoin-sys_leveldb.patch, + +metadata.xml: + Initial commit + diff --git a/net-p2p/litecoin-qt/Manifest b/net-p2p/litecoin-qt/Manifest new file mode 100644 index 000000000000..009bdd33ec0c --- /dev/null +++ b/net-p2p/litecoin-qt/Manifest @@ -0,0 +1,25 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX litecoin-sys_leveldb.patch 7264 SHA256 61e2f69923572903fe7a7f23b38eb6b4c71f19f09ca7881da085174688d3d684 SHA512 96030e7ce3062facf9231b9ae99945c5eb5f5989cb274e9249ebe444b07970d17ed46ec721ad89cf9c607ca8bb86c0a41024e25ab6859df80029b3f03fad0038 WHIRLPOOL 742c70b2a55b3f45862b09717737415f8ff69c5b2700153fb9df810e3a4665df82112e01d30d089403ff5cc21c7b3c25fb13b0ba6f718bfb82c364a546615124 +DIST litecoin-0.8.5.3-rc3.tar.gz 4804918 SHA256 67d2f14ab654825bf21abbb4d2c4681a6af4c3b074a2a1813d6da63fea3a8afc SHA512 640cd8a60122cc26889c81bddd20057c20557ae9a9eea431b68421f5ee37f7938ca2776196649b553b05977278242c4d1bab520671cae549227c1f69835a72b5 WHIRLPOOL f327423e13a1d8e092c54f6201362a8c32acff87a71fd17a737c22e57e09472f579dfdbedcd398fabab75e8f5f7a5559ff566df737fec410baf8dfe80fb3bb6d +EBUILD litecoin-qt-0.8.5.3_rc3.ebuild 3287 SHA256 c0042698d48cb307501683c164ae6cd84f9a012cb19e9afcdc7b1bd360661cae SHA512 1fa660f40885a326fe9ee25da15a921c9194a8931d7738646617d009d4326cf806e7f6fc64d4fbfe2255bf364c839c2f7ed8d5c95abd4e201680e0e9520a1084 WHIRLPOOL 4b18352a288aab7e254edfe2b1760c33da94d03210ce1a790b098fe6a26d527116d98fe7f3228e9ac98ea4147d12df74e1d2fa06a41a63a8147fa2054f24e84b +MISC ChangeLog 413 SHA256 cd61b95653b900131adf7ab5aeb11f47ee87fba3b8a2d5e2dda91b6a81be3bec SHA512 d575fe0309aa7f8667f4c9f2eb28627130aab60f75c02d2ce97817ea8305a1b74dd18904a2b2c0e29ae82ff36ade1a042de24f36cc76ddade29815638989e996 WHIRLPOOL d4bd9cacb0de5d290ad5134ca6facae4a808ac564f916926685235fa9fba3579c9f56b52c6a7811c2f42650e40886ae2da54dea13dd96b5db03efcbb1aeff3a8 +MISC metadata.xml 335 SHA256 fd617e5b5cdf18a293d584d24d15a4cf35d3626106804f2424bd2d55143cf804 SHA512 80c5870e0ef0fdb6e4ffc9a7877aeca9269684e1bc42e2dd1ce6ea10214710dc70b4dcf848f581b439ae50d5dac32614c292ca943d023f4d53b773f1af851565 WHIRLPOOL d64f49a82dd2e8107c4dee45b3f56de370064b5303b912be29a9307167b7e0b78659e468647fe370b83d94881121c476acf80cefd943cde67c02ceff38696edc +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (GNU/Linux) + +iQIcBAEBCAAGBQJSmzdVAAoJEJOE+m71LUu6rxQP/j4QfeI0fB7VNHrLc16tX8L1 +uzgaR80stx6aTDQhEzy+40vpcOn1s9LFApjk47Rh5hZ9QBLTCi1AN9dht+OGYRtO +V+oGd7PRVzZbNSck1jawiVn9sYk8N0/8LUhmFaFZUObVZH8JD0TF0Fkdi5kdrD/E +BCXxxroJrZeiXEQC2sqA5aM1bPMaxywLZcoAEEyKsGuvdkZKmZPvLE6vqPjPoonj +xQ1Guv1JOgfgqM0MKBbyLcoDKVY63KagWDiNjWWPUQG2or/9BMKmvXCDWbcNKywx +LVZb99JV+3d4EaLpuFRKMFZuFJ8UmmWhjBmInoXoOWSYsZuM+V7H1Tj4kkjz7D61 +oox3XXLfNcdZz8F7puWAqP/1cHRWd9ZPRMMnxCD6k2mz3JeZ4z/LxCd6kKL8JunS +XQ5o3kFJIwSgYxWI2zjAj7/zY8tRbWAl/Xd28OJLRH7Gp0/sjMxfcejvXEVtdwFE +vFVwx+M9pnUzz8h3aglrFQ1QuM4GX1Jx0diC0R/KHz+SwGy+TqTxKz9xJG8uuEpy +fPdxzo/twEcfUg/pvkrePXp/qQBMUgrffw65tiKnqavgeoJkhV49ebA5qApPpZAX +atwmrFD4MR8+grmOOPUkwNGiuyHwrn7R4enzEZlRNAmfhS+83MTyqICzs5c2pZ8g +gW2c+Rwx0wPdjz0fE2tp +=biFU +-----END PGP SIGNATURE----- diff --git a/net-p2p/litecoin-qt/files/litecoin-sys_leveldb.patch b/net-p2p/litecoin-qt/files/litecoin-sys_leveldb.patch new file mode 100644 index 000000000000..a4ae56aeabbb --- /dev/null +++ b/net-p2p/litecoin-qt/files/litecoin-sys_leveldb.patch @@ -0,0 +1,193 @@ +diff -Naur litecoin-0.8.5.3-rc3.orig/bitcoin-qt.pro litecoin-0.8.5.3-rc3/bitcoin-qt.pro +--- litecoin-0.8.5.3-rc3.orig/bitcoin-qt.pro 2013-11-28 21:17:05.000000000 -0500 ++++ litecoin-0.8.5.3-rc3/bitcoin-qt.pro 2013-11-29 14:53:00.960537685 -0500 +@@ -5,7 +5,7 @@ + INCLUDEPATH += src src/json src/qt + QT += core gui network + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +-DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE ++DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV + CONFIG += no_include_pwd + CONFIG += thread + +@@ -101,25 +101,30 @@ + QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets + } + ++contains(USE_SYSTEM_LEVELDB, 1) { ++ LIBS += -lleveldb ++} else { + INCLUDEPATH += src/leveldb/include src/leveldb/helpers +-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a ++LIBS += $$PWD/src/leveldb/libleveldb.a + !win32 { + # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences +- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a ++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a + } else { + # make an educated guess about what the ranlib command is called + isEmpty(QMAKE_RANLIB) { + QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib) + } + LIBS += -lshlwapi +- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a ++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a + } + genleveldb.target = $$PWD/src/leveldb/libleveldb.a + genleveldb.depends = FORCE + PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a + QMAKE_EXTRA_TARGETS += genleveldb ++} + # Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it. +-QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean ++QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true ++ + + # regenerate src/build.h + !win32|contains(USE_BUILD_INFO, 1) { +diff -Naur litecoin-0.8.5.3-rc3.orig/src/leveldb.cpp litecoin-0.8.5.3-rc3/src/leveldb.cpp +--- litecoin-0.8.5.3-rc3.orig/src/leveldb.cpp 2013-11-28 21:17:05.000000000 -0500 ++++ litecoin-0.8.5.3-rc3/src/leveldb.cpp 2013-11-29 14:55:33.760543008 -0500 +@@ -8,7 +8,9 @@ + #include <leveldb/env.h> + #include <leveldb/cache.h> + #include <leveldb/filter_policy.h> +-#include <memenv/memenv.h> ++#ifndef LEVELDB_WITHOUT_MEMENV ++#include <memenv.h> ++#endif + + #include <boost/filesystem.hpp> + +@@ -43,8 +45,12 @@ + options = GetOptions(nCacheSize); + options.create_if_missing = true; + if (fMemory) { ++#ifndef LEVELDB_WITHOUT_MEMENV + penv = leveldb::NewMemEnv(leveldb::Env::Default()); + options.env = penv; ++#else ++ throw std::runtime_error("CLevelDB(): compiled without memenv support"); ++#endif + } else { + if (fWipe) { + printf("Wiping LevelDB in %s\n", path.string().c_str()); +diff -Naur litecoin-0.8.5.3-rc3.orig/src/makefile.unix litecoin-0.8.5.3-rc3/src/makefile.unix +--- litecoin-0.8.5.3-rc3.orig/src/makefile.unix 2013-11-28 21:17:05.000000000 -0500 ++++ litecoin-0.8.5.3-rc3/src/makefile.unix 2013-11-29 15:08:58.337571033 -0500 +@@ -110,8 +110,7 @@ + # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work. + xLDFLAGS=$(LDHARDENING) $(LDFLAGS) + +-OBJS= \ +- leveldb/libleveldb.a \ ++BASEOBJS := \ + obj/alert.o \ + obj/version.o \ + obj/checkpoints.o \ +@@ -120,7 +119,6 @@ + obj/crypter.o \ + obj/key.o \ + obj/db.o \ +- obj/init.o \ + obj/keystore.o \ + obj/main.o \ + obj/net.o \ +@@ -141,9 +139,17 @@ + obj/hash.o \ + obj/bloom.o \ + obj/noui.o \ +- obj/leveldb.o \ + obj/txdb.o + ++OBJS := \ ++ obj/leveldb.o \ ++ obj/init.o \ ++ $(BASEOBJS) ++ ++TESTOBJS := \ ++ obj-test/leveldb.o \ ++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \ ++ $(BASEOBJS) + + ifdef USE_SSE2 + DEFS += -DUSE_SSE2 +@@ -156,15 +162,25 @@ + test check: test_litecoin FORCE + ./test_litecoin + ++ifdef USE_SYSTEM_LEVELDB ++ LIBS += -lleveldb ++ TESTLIBS += -lmemenv ++else + # + # LevelDB support + # + MAKEOVERRIDES = +-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a ++LIBS += $(CURDIR)/leveldb/libleveldb.a ++TESTLIBS += $(CURDIR)/leveldb/libmemenv.a + DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) + DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) + leveldb/libleveldb.a: +- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd .. ++ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a && cd .. ++leveldb/libmemenv.a: ++ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libmemenv.a && cd .. ++OBJS += leveldb/libleveldb.a ++TESTOBJS += leveldb/libmemenv.a ++endif + + # auto-generated dependencies: + -include obj/*.P +@@ -175,33 +191,34 @@ + version.cpp: obj/build.h + DEFS += -DHAVE_BUILD_INFO + +-obj/%-sse2.o: %-sse2.cpp +- $(CXX) -c $(xCXXFLAGS) -msse2 -MMD -MF $(@:%.o=%.d) -o $@ $< ++P_TO_D = \ + @cp $(@:%.o=%.d) $(@:%.o=%.P); \ +- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ ++ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ + rm -f $(@:%.o=%.d) + ++obj/%-sse2.o: %-sse2.cpp ++ $(CXX) -c $(xCXXFLAGS) -msse2 -MMD -MF $(@:%.o=%.d) -o $@ $< ++ $(P_TO_D) ++ + obj/%.o: %.cpp +- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< +- @cp $(@:%.o=%.d) $(@:%.o=%.P); \ +- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ +- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ +- rm -f $(@:%.o=%.d) ++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $< ++ $(P_TO_D) + +-litecoind: $(OBJS:obj/%=obj/%) ++litecoind: $(OBJS) + $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) + +-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) +- + obj-test/%.o: test/%.cpp + $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< +- @cp $(@:%.o=%.d) $(@:%.o=%.P); \ +- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ +- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ +- rm -f $(@:%.o=%.d) ++ $(P_TO_D) ++ ++obj-test/leveldb.o: leveldb.cpp ++ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< ++ $(P_TO_D) ++ ++TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) + +-test_litecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) ++test_litecoin: $(TESTOBJS) + $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS) + + clean: diff --git a/net-p2p/litecoin-qt/litecoin-qt-0.8.5.3_rc3.ebuild b/net-p2p/litecoin-qt/litecoin-qt-0.8.5.3_rc3.ebuild new file mode 100644 index 000000000000..9c3e7783c45e --- /dev/null +++ b/net-p2p/litecoin-qt/litecoin-qt-0.8.5.3_rc3.ebuild @@ -0,0 +1,143 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/litecoin-qt/litecoin-qt-0.8.5.3_rc3.ebuild,v 1.1 2013/12/01 13:18:01 blueness Exp $ + +EAPI=5 + +DB_VER="4.8" + +LANGS="af_ZA ar bg bs ca ca_ES cs cy da de el_GR en eo es es_CL et eu_ES fa fa_IR fi fr fr_CA gu_IN he hi_IN hr hu it ja la lt lv_LV nb nl pl pt_BR pt_PT ro_RO ru sk sr sv th_TH tr uk zh_CN zh_TW" +inherit db-use eutils fdo-mime gnome2-utils kde4-functions qt4-r2 + +MyPV="${PV/_/-}" +MyPN="litecoin" +MyP="${MyPN}-${MyPV}" + +DESCRIPTION="P2P Internet currency based on Bitcoin but easier to mine." +HOMEPAGE="https://litecoin.org/" +SRC_URI="https://github.com/${MyPN}-project/${MyPN}/archive/v${MyPV}.tar.gz -> ${MyP}.tar.gz" + +LICENSE="MIT ISC GPL-3 LGPL-2.1 public-domain || ( CC-BY-SA-3.0 LGPL-2.1 )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="dbus ipv6 kde +qrcode upnp" + +RDEPEND=" + dev-libs/boost[threads(+)] + dev-libs/openssl:0[-bindist] + qrcode? ( + media-gfx/qrencode + ) + upnp? ( + net-libs/miniupnpc + ) + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx] + <=dev-libs/leveldb-1.12.0[-snappy] + dev-qt/qtgui:4 + dbus? ( + dev-qt/qtdbus:4 + ) +" +DEPEND="${RDEPEND} + >=app-shells/bash-4.1 +" + +DOCS="doc/README.md doc/release-notes.md" + +S="${WORKDIR}/${MyP}" + +src_prepare() { + epatch "${FILESDIR}"/${MyPN}-sys_leveldb.patch + rm -r src/leveldb + + cd src || die + + local filt= yeslang= nolang= + + for lan in $LANGS; do + if [ ! -e qt/locale/bitcoin_$lan.ts ]; then + ewarn "Language '$lan' no longer supported. Ebuild needs update." + fi + done + + for ts in $(ls qt/locale/*.ts) + do + x="${ts/*bitcoin_/}" + x="${x/.ts/}" + if ! use "linguas_$x"; then + nolang="$nolang $x" + rm "$ts" + filt="$filt\\|$x" + else + yeslang="$yeslang $x" + fi + done + + filt="bitcoin_\\(${filt:2}\\)\\.\(qm\|ts\)" + sed "/${filt}/d" -i 'qt/bitcoin.qrc' + einfo "Languages -- Enabled:$yeslang -- Disabled:$nolang" +} + +src_configure() { + OPTS=() + + use dbus && OPTS+=("USE_DBUS=1") + if use upnp; then + OPTS+=("USE_UPNP=1") + else + OPTS+=("USE_UPNP=-") + fi + + use qrcode && OPTS+=("USE_QRCODE=1") + use ipv6 || OPTS+=("USE_IPV6=-") + + OPTS+=("USE_SYSTEM_LEVELDB=1") + OPTS+=("BDB_INCLUDE_PATH=$(db_includedir "${DB_VER}")") + OPTS+=("BDB_LIB_SUFFIX=-${DB_VER}") + + if has_version '>=dev-libs/boost-1.52'; then + OPTS+=("LIBS+=-lboost_chrono\$\$BOOST_LIB_SUFFIX") + fi + + #The litecoin codebase is mostly taken from bitcoin-qt + eqmake4 bitcoin-qt.pro "${OPTS[@]}" +} + +#Tests are broken with and without our litecoin-sys_leveldb.patch +#src_test() { +# cd src || die +# emake -f makefile.unix "${OPTS[@]}" test_litecoin +# ./test_litecoin || die 'Tests failed' +#} + +src_install() { + qt4-r2_src_install + + dobin ${PN} + + insinto /usr/share/pixmaps + newins "share/pixmaps/bitcoin.ico" "${PN}.ico" + + make_desktop_entry "${PN} %u" "Litecoin-Qt" "/usr/share/pixmaps/${PN}.ico" "Qt;Network;P2P;Office;Finance;" "MimeType=x-scheme-handler/litecoin;\nTerminal=false" + + newman contrib/debian/manpages/bitcoin-qt.1 ${PN}.1 + + if use kde; then + insinto /usr/share/kde4/services + newins contrib/debian/bitcoin-qt.protocol ${PN}.protocol + fi +} + +update_caches() { + gnome2_icon_cache_update + fdo-mime_desktop_database_update + buildsycoca +} + +pkg_postinst() { + update_caches +} + +pkg_postrm() { + update_caches +} diff --git a/net-p2p/litecoin-qt/metadata.xml b/net-p2p/litecoin-qt/metadata.xml new file mode 100644 index 000000000000..6365b7b7bfbb --- /dev/null +++ b/net-p2p/litecoin-qt/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='qrcode'>Enable generation of QR Codes for receiving payments</flag> + </use> +</pkgmetadata> diff --git a/net-p2p/litecoind/ChangeLog b/net-p2p/litecoind/ChangeLog new file mode 100644 index 000000000000..c744987b14b3 --- /dev/null +++ b/net-p2p/litecoind/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for net-p2p/litecoind +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/litecoind/ChangeLog,v 1.1 2013/12/01 13:20:37 blueness Exp $ + +*litecoind-0.8.5.3_rc3 (01 Dec 2013) + + 01 Dec 2013; Anthony G. Basile <blueness@gentoo.org> + +litecoind-0.8.5.3_rc3.ebuild, +files/litecoin.conf, +files/litecoin.confd, + +files/litecoin.initd, +files/litecoin.service, + +files/litecoin-sys_leveldb.patch, +files/litecoind.logrotate, +metadata.xml: + Initial commit + diff --git a/net-p2p/litecoind/Manifest b/net-p2p/litecoind/Manifest new file mode 100644 index 000000000000..90848db72a5a --- /dev/null +++ b/net-p2p/litecoind/Manifest @@ -0,0 +1,30 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + +AUX litecoin-sys_leveldb.patch 7264 SHA256 61e2f69923572903fe7a7f23b38eb6b4c71f19f09ca7881da085174688d3d684 SHA512 96030e7ce3062facf9231b9ae99945c5eb5f5989cb274e9249ebe444b07970d17ed46ec721ad89cf9c607ca8bb86c0a41024e25ab6859df80029b3f03fad0038 WHIRLPOOL 742c70b2a55b3f45862b09717737415f8ff69c5b2700153fb9df810e3a4665df82112e01d30d089403ff5cc21c7b3c25fb13b0ba6f718bfb82c364a546615124 +AUX litecoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123 +AUX litecoin.confd 245 SHA256 32f96a43c8c2aa049151a0fbc27b290e863d1b1a3c78eef5cb054fe5bad21011 SHA512 57de4657db4f0a3873b6aac700bc78fe8ecdfacdc0acb3fee13866389fc02b7100f4e7252ceb19f76e03d1ca9353008a9ccf40fc48a1a612c6b8fa4a35bae150 WHIRLPOOL 9c54b91df1225d812011af2fe27059262a70754e8a396f91a598479a76193d36203f8825af2a8e30f21d8b91c6df5ba734217f32f33c23bf6ca7a16498f43f28 +AUX litecoin.initd 2511 SHA256 0c7e6671312e43d3f0373489ee93ee4dab379d53f38f724b38a3727d2f1480c8 SHA512 3ae65555aba11d8e4d292021e5b4b45ebb4b65a1fda81ed3836c5528319e5268391732f44be1e2b80a1f3d189729c29b40c1705fbd52b8588021cdac1f36f5d0 WHIRLPOOL e81d79e24f53c4d0ae1b5d9da9ee8e4726fe15d76f992c5cf6a9816d70675177934f8b00937e777c037f3d496c2af923f15292faea765f7d5d5f4c261de860a1 +AUX litecoin.service 879 SHA256 be344624575e7e69203bd7e17abc930847e27d95217b65b74ebfcf2e59a4bbca SHA512 f05009fdf4c38d78867588d84a6031d6bed81ad74c08d97a8fae16706f04ce61926dbde775183e0219a33e3a84e5fdad92acaab62e15156f3d07c15677e0f148 WHIRLPOOL def62eeef8c032a372c0624860369a32ff27b4099fa3ff720ac908139fb2c23e1aab4f4b4e623d890d309a5114352f2feb59ae105563b462e82667a52804c17f +AUX litecoind.logrotate 113 SHA256 dce250c9f27ed9b36fa9376d92fedf89bf6f7f523360dc5baaa65179fd1d504b SHA512 eaa9f462be8dc755b675e4d5cb3ad271e3b1053edfa06df7862fa887160c849c768d2a268a7c8b52d1cfc834c186780b71435ee65475ea6c6692c18bded48dec WHIRLPOOL 3e771d6c2dfddd291386a1ed98009f1778e561a1b8ac43507f3ca709d1c389c3b8d6db5128ade485a0b92ba56b2388727935149af391fe3ef6f9e18ec432c04e +DIST litecoin-0.8.5.3-rc3.tar.gz 4804918 SHA256 67d2f14ab654825bf21abbb4d2c4681a6af4c3b074a2a1813d6da63fea3a8afc SHA512 640cd8a60122cc26889c81bddd20057c20557ae9a9eea431b68421f5ee37f7938ca2776196649b553b05977278242c4d1bab520671cae549227c1f69835a72b5 WHIRLPOOL f327423e13a1d8e092c54f6201362a8c32acff87a71fd17a737c22e57e09472f579dfdbedcd398fabab75e8f5f7a5559ff566df737fec410baf8dfe80fb3bb6d +EBUILD litecoind-0.8.5.3_rc3.ebuild 3106 SHA256 faa307024c4032e3ff6ef7cb67436486194b94f85ecc1c67a4511f446ce894a3 SHA512 f82785bd2bf02c02af82a516c78c25778b0784be3dcba31ee14785281ce6bdb2dad00f98d2110cf3996172b6e1b904fc4493bc04feaf3be8539a764704ae3e72 WHIRLPOOL 1df363ffcd33caa3791466cc8c97bf5bf7835822ef9ea90d4fb24ce03120af3d5c2b349a486a6f9a3ee3c563cf6a4e52fc60d1b358e00f9ab2bab93eafacbbc4 +MISC ChangeLog 528 SHA256 79b38d76adef5ae92fa5e47d1774feeb97e638a1cc66b181ebd446453bf7619b SHA512 19e589b73f4ce83d1e66f0dafffaeb973d7f4cd48da1eed08a6da90b98d9948f7ebb425332fffea2006c376a4becab988e4ab788c0c7d4d86b4111e35edbdfb2 WHIRLPOOL 458af8645c366d053f03388977e839ff4c3ebfd923ebf101818fdb45e627514f4d76ab0628be37dcd89a6a65ee3bbe4313b9ca957b1fc167c90172c6ec30587d +MISC metadata.xml 327 SHA256 2009a65ac31a6a928926715ab212766020927524623581b18ee1f5026a6a689c SHA512 4d68f30b7c29aa5b6c3f7fd5c657ffbbe12706ce5d8d332cd8848906a27ae852e39d48219f6137a65c31db9c7693c2218edf8b6b1511cb1098d86bdb394cd0f9 WHIRLPOOL f7ad1bdb29423c9a88a721e77168aa35372a3411f77c775e2ac518eefc7ee39def4a307a66b4da02f80a6e9d8cdcff8fafa20da1792b7909e84bcad67598c4d9 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (GNU/Linux) + +iQIcBAEBCAAGBQJSmzfwAAoJEJOE+m71LUu6kegQAIhh8l6SqNkXzOc00p9B1EyZ +i/vKzc48J6KJ6tS8Yvj4p2cWaYyTOvhxWmXcmJNGmkHFsUZJ8RST+3uezLGAdXzy +wDOhENdFB32bjYbd2F40gWmTEoe+4o2ql8/967zwRG0vUKkewavFdIoC3IYJ5OxO +UPvJd3mjcpyskug2mlwzIH5N8T1O5OHVXNZb9hHs09vXg872qiWzCefd0Ketm3KA +0kJqTOrHtlgOq9y1TWjXwmc18uA99UtgbNxabxw6JtbOJ9DgFPS/w1vZo8ixlv37 +VrXiBo6QmO71YRs4+8nqIO+DNixGrizMs131l6k+x+vSpvjlp151A2tjPrzMu7Sn +csNOfkkkRzJ1wZ09D6zm5xwCSQuBX/GEwRJA0kJ8eYs/IggwzWAe2dPopyYVOKHR +WxM505bsYb0Kd0OAAOweLpn0LZlmFpmkvpke/VP3fIoQE+7S8kHyQy5nDN355dgM +m1km5xPUpQTrSMkdNj6tDF+4OcaNewx+BTg+adBD4KjUy02u/ujeDrfwCwSLK6bB +5bP6SfXaiFl09uYk0M2bhf8K5ZYFsdSbPv6HbOhpH6mF+iRz0cxhvz+PIqmGSDZP +XsD/A1SbyXiQ7BjrvCIyzq2yplzMFxyIxWA1ELS6ZbjV9U5Cz1Fn7Wrd8ESyemi6 +Op1W0RzTV6rGlKhmbqoH +=MVf0 +-----END PGP SIGNATURE----- diff --git a/net-p2p/litecoind/files/litecoin-sys_leveldb.patch b/net-p2p/litecoind/files/litecoin-sys_leveldb.patch new file mode 100644 index 000000000000..a4ae56aeabbb --- /dev/null +++ b/net-p2p/litecoind/files/litecoin-sys_leveldb.patch @@ -0,0 +1,193 @@ +diff -Naur litecoin-0.8.5.3-rc3.orig/bitcoin-qt.pro litecoin-0.8.5.3-rc3/bitcoin-qt.pro +--- litecoin-0.8.5.3-rc3.orig/bitcoin-qt.pro 2013-11-28 21:17:05.000000000 -0500 ++++ litecoin-0.8.5.3-rc3/bitcoin-qt.pro 2013-11-29 14:53:00.960537685 -0500 +@@ -5,7 +5,7 @@ + INCLUDEPATH += src src/json src/qt + QT += core gui network + greaterThan(QT_MAJOR_VERSION, 4): QT += widgets +-DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE ++DEFINES += QT_GUI BOOST_THREAD_USE_LIB BOOST_SPIRIT_THREADSAFE LEVELDB_WITHOUT_MEMENV + CONFIG += no_include_pwd + CONFIG += thread + +@@ -101,25 +101,30 @@ + QTPLUGIN += qcncodecs qjpcodecs qtwcodecs qkrcodecs qtaccessiblewidgets + } + ++contains(USE_SYSTEM_LEVELDB, 1) { ++ LIBS += -lleveldb ++} else { + INCLUDEPATH += src/leveldb/include src/leveldb/helpers +-LIBS += $$PWD/src/leveldb/libleveldb.a $$PWD/src/leveldb/libmemenv.a ++LIBS += $$PWD/src/leveldb/libleveldb.a + !win32 { + # we use QMAKE_CXXFLAGS_RELEASE even without RELEASE=1 because we use RELEASE to indicate linking preferences not -O preferences +- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a ++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a + } else { + # make an educated guess about what the ranlib command is called + isEmpty(QMAKE_RANLIB) { + QMAKE_RANLIB = $$replace(QMAKE_STRIP, strip, ranlib) + } + LIBS += -lshlwapi +- genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a libmemenv.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libmemenv.a ++ genleveldb.commands = cd $$PWD/src/leveldb && CC=$$QMAKE_CC CXX=$$QMAKE_CXX TARGET_OS=OS_WINDOWS_CROSSCOMPILE $(MAKE) OPT=\"$$QMAKE_CXXFLAGS $$QMAKE_CXXFLAGS_RELEASE\" libleveldb.a && $$QMAKE_RANLIB $$PWD/src/leveldb/libleveldb.a + } + genleveldb.target = $$PWD/src/leveldb/libleveldb.a + genleveldb.depends = FORCE + PRE_TARGETDEPS += $$PWD/src/leveldb/libleveldb.a + QMAKE_EXTRA_TARGETS += genleveldb ++} + # Gross ugly hack that depends on qmake internals, unfortunately there is no other way to do it. +-QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb ; $(MAKE) clean ++QMAKE_CLEAN += $$PWD/src/leveldb/libleveldb.a; cd $$PWD/src/leveldb && $(MAKE) clean || true ++ + + # regenerate src/build.h + !win32|contains(USE_BUILD_INFO, 1) { +diff -Naur litecoin-0.8.5.3-rc3.orig/src/leveldb.cpp litecoin-0.8.5.3-rc3/src/leveldb.cpp +--- litecoin-0.8.5.3-rc3.orig/src/leveldb.cpp 2013-11-28 21:17:05.000000000 -0500 ++++ litecoin-0.8.5.3-rc3/src/leveldb.cpp 2013-11-29 14:55:33.760543008 -0500 +@@ -8,7 +8,9 @@ + #include <leveldb/env.h> + #include <leveldb/cache.h> + #include <leveldb/filter_policy.h> +-#include <memenv/memenv.h> ++#ifndef LEVELDB_WITHOUT_MEMENV ++#include <memenv.h> ++#endif + + #include <boost/filesystem.hpp> + +@@ -43,8 +45,12 @@ + options = GetOptions(nCacheSize); + options.create_if_missing = true; + if (fMemory) { ++#ifndef LEVELDB_WITHOUT_MEMENV + penv = leveldb::NewMemEnv(leveldb::Env::Default()); + options.env = penv; ++#else ++ throw std::runtime_error("CLevelDB(): compiled without memenv support"); ++#endif + } else { + if (fWipe) { + printf("Wiping LevelDB in %s\n", path.string().c_str()); +diff -Naur litecoin-0.8.5.3-rc3.orig/src/makefile.unix litecoin-0.8.5.3-rc3/src/makefile.unix +--- litecoin-0.8.5.3-rc3.orig/src/makefile.unix 2013-11-28 21:17:05.000000000 -0500 ++++ litecoin-0.8.5.3-rc3/src/makefile.unix 2013-11-29 15:08:58.337571033 -0500 +@@ -110,8 +110,7 @@ + # adds some defaults in front. Unfortunately, LDFLAGS=... $(LDFLAGS) does not work. + xLDFLAGS=$(LDHARDENING) $(LDFLAGS) + +-OBJS= \ +- leveldb/libleveldb.a \ ++BASEOBJS := \ + obj/alert.o \ + obj/version.o \ + obj/checkpoints.o \ +@@ -120,7 +119,6 @@ + obj/crypter.o \ + obj/key.o \ + obj/db.o \ +- obj/init.o \ + obj/keystore.o \ + obj/main.o \ + obj/net.o \ +@@ -141,9 +139,17 @@ + obj/hash.o \ + obj/bloom.o \ + obj/noui.o \ +- obj/leveldb.o \ + obj/txdb.o + ++OBJS := \ ++ obj/leveldb.o \ ++ obj/init.o \ ++ $(BASEOBJS) ++ ++TESTOBJS := \ ++ obj-test/leveldb.o \ ++ $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) \ ++ $(BASEOBJS) + + ifdef USE_SSE2 + DEFS += -DUSE_SSE2 +@@ -156,15 +162,25 @@ + test check: test_litecoin FORCE + ./test_litecoin + ++ifdef USE_SYSTEM_LEVELDB ++ LIBS += -lleveldb ++ TESTLIBS += -lmemenv ++else + # + # LevelDB support + # + MAKEOVERRIDES = +-LIBS += $(CURDIR)/leveldb/libleveldb.a $(CURDIR)/leveldb/libmemenv.a ++LIBS += $(CURDIR)/leveldb/libleveldb.a ++TESTLIBS += $(CURDIR)/leveldb/libmemenv.a + DEFS += $(addprefix -I,$(CURDIR)/leveldb/include) + DEFS += $(addprefix -I,$(CURDIR)/leveldb/helpers) + leveldb/libleveldb.a: +- @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a libmemenv.a && cd .. ++ @echo "Building LevelDB ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libleveldb.a && cd .. ++leveldb/libmemenv.a: ++ @echo "Building LevelDB memenv ..." && cd leveldb && $(MAKE) CC=$(CC) CXX=$(CXX) OPT="$(xCXXFLAGS)" libmemenv.a && cd .. ++OBJS += leveldb/libleveldb.a ++TESTOBJS += leveldb/libmemenv.a ++endif + + # auto-generated dependencies: + -include obj/*.P +@@ -175,33 +191,34 @@ + version.cpp: obj/build.h + DEFS += -DHAVE_BUILD_INFO + +-obj/%-sse2.o: %-sse2.cpp +- $(CXX) -c $(xCXXFLAGS) -msse2 -MMD -MF $(@:%.o=%.d) -o $@ $< ++P_TO_D = \ + @cp $(@:%.o=%.d) $(@:%.o=%.P); \ +- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ ++ sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ + -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ + rm -f $(@:%.o=%.d) + ++obj/%-sse2.o: %-sse2.cpp ++ $(CXX) -c $(xCXXFLAGS) -msse2 -MMD -MF $(@:%.o=%.d) -o $@ $< ++ $(P_TO_D) ++ + obj/%.o: %.cpp +- $(CXX) -c $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< +- @cp $(@:%.o=%.d) $(@:%.o=%.P); \ +- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ +- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ +- rm -f $(@:%.o=%.d) ++ $(CXX) -c $(xCXXFLAGS) -DLEVELDB_WITHOUT_MEMENV -MMD -MF $(@:%.o=%.d) -o $@ $< ++ $(P_TO_D) + +-litecoind: $(OBJS:obj/%=obj/%) ++litecoind: $(OBJS) + $(LINK) $(xCXXFLAGS) -o $@ $^ $(xLDFLAGS) $(LIBS) + +-TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) +- + obj-test/%.o: test/%.cpp + $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< +- @cp $(@:%.o=%.d) $(@:%.o=%.P); \ +- sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \ +- -e '/^$$/ d' -e 's/$$/ :/' < $(@:%.o=%.d) >> $(@:%.o=%.P); \ +- rm -f $(@:%.o=%.d) ++ $(P_TO_D) ++ ++obj-test/leveldb.o: leveldb.cpp ++ $(CXX) -c $(TESTDEFS) $(xCXXFLAGS) -MMD -MF $(@:%.o=%.d) -o $@ $< ++ $(P_TO_D) ++ ++TESTOBJS := $(patsubst test/%.cpp,obj-test/%.o,$(wildcard test/*.cpp)) + +-test_litecoin: $(TESTOBJS) $(filter-out obj/init.o,$(OBJS:obj/%=obj/%)) ++test_litecoin: $(TESTOBJS) + $(LINK) $(xCXXFLAGS) -o $@ $(LIBPATHS) $^ $(TESTLIBS) $(xLDFLAGS) $(LIBS) + + clean: diff --git a/net-p2p/litecoind/files/litecoin.conf b/net-p2p/litecoind/files/litecoin.conf new file mode 100644 index 000000000000..c6a55f3d9133 --- /dev/null +++ b/net-p2p/litecoind/files/litecoin.conf @@ -0,0 +1,8 @@ +# http://www.bitcoin.org/smf/index.php?topic=644.0 +#rpcuser= +#rpcpassword= + + + + + diff --git a/net-p2p/litecoind/files/litecoin.confd b/net-p2p/litecoind/files/litecoin.confd new file mode 100644 index 000000000000..4261f6e25fe2 --- /dev/null +++ b/net-p2p/litecoind/files/litecoin.confd @@ -0,0 +1,10 @@ +# Config file for /etc/init.d/litecoind + +# owner of liteciond process (don't change, must be existing) +LITECOIN_USER="litecoin" + +# See http://www.bitcoin.org/smf/index.php?topic=1063 +LITECOIN_OPTS="${LITECOIN_OPTS}" + +# nice level +NICELEVEL="19" diff --git a/net-p2p/litecoind/files/litecoin.initd b/net-p2p/litecoind/files/litecoin.initd new file mode 100644 index 000000000000..036ab8c577a9 --- /dev/null +++ b/net-p2p/litecoind/files/litecoin.initd @@ -0,0 +1,104 @@ +#!/sbin/runscript +# Distributed under the terms of the GNU General Public License, v2 or later + +VARDIR="/var/lib/litecoin" +CONFFILE="${VARDIR}/.litecoin/litecoin.conf" + +depend() { + need net +} + +checkconfig() { + if [[ "${LITECOIN_USER}" == "" ]] ; then + eerror "Please edit /etc/conf.d/litecoind" + eerror "A user must be specified to run litecoind 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 "${LITECOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then + eerror "Please edit /etc/conf.d/litecoind" + eerror "Specified user must exist!" + return 1 + fi + if `echo "${LITECOIN_USER}" | grep ':' -sq` ; then + if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${LITECOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then + eerror "Please edit /etc/conf.d/litecoind" + 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 Litecoind daemon" + + pkg-config openrc + if [ $? = 0 ]; then + start_openrc + else + start_baselayout + fi +} + +stop() { + ebegin "Stopping Litecoin daemon" + + pkg-config openrc + if [ $? = 0 ]; then + stop_openrc + else + stop_baselayout + fi +} + +start_openrc() { + start-stop-daemon \ + --start --user "${LITECOIN_USER}" --name litecoind \ + --pidfile /var/run/litecoind.pid --make-pidfile \ + --env HOME="${VARDIR}" --exec /usr/bin/litecoind \ + --nicelevel "${NICELEVEL}" \ + --background \ + --wait 2000 \ + -- ${LITECOIN_OPTS} + eend $? +} + +stop_openrc() { + start-stop-daemon --stop --user "${LITECOIN_USER}" \ + --name litecoind --pidfile /var/run/litecoind.pid \ + --wait 30000 \ + --progress + eend $? +} + +start_baselayout() { + start-stop-daemon \ + --start --user "${LITECOIN_USER}" --name litecoind \ + --pidfile /var/run/litecoind.pid --make-pidfile \ + --env HOME="${VARDIR}" --exec /usr/bin/litecoind \ + --chuid "${LITECOIN_USER}" \ + --nicelevel "${NICELEVEL}" \ + --background \ + -- ${LITECOIN_OPTS} + eend $? +} + +stop_baselayout() { + start-stop-daemon \ + --stop \ + --user "${LITECOIN_USER}" \ + --name litecoind \ + --pidfile /var/run/litecoind.pid + eend $? +} diff --git a/net-p2p/litecoind/files/litecoin.service b/net-p2p/litecoind/files/litecoin.service new file mode 100644 index 000000000000..ae063ac48e1b --- /dev/null +++ b/net-p2p/litecoind/files/litecoin.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/litecoind.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/litecoind.service.d/myopts.conf" +# containing: +# [Service] +# Environment="LITECOIN_OPTS=-debug -logtimestamps" +# Nice=10 +# This will override the setting appearing below. + +# Note that almost all daemon options could be specified in +# /etc/litecoin/litecoin.conf + +[Unit] +Description=Litecoin Daemon +After=network.target + +[Service] +User=litecoin +Environment=LITECOIN_OPTS= +ExecStart=/usr/bin/litecoind -daemon=0 $LITECOIN_OPTS +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/net-p2p/litecoind/files/litecoind.logrotate b/net-p2p/litecoind/files/litecoind.logrotate new file mode 100644 index 000000000000..5b091aa00c4e --- /dev/null +++ b/net-p2p/litecoind/files/litecoind.logrotate @@ -0,0 +1,7 @@ +/var/lib/litecoin/.litecoin/debug.log { + weekly + sharedscripts + postrotate + killall -HUP litecoind + endscript +} diff --git a/net-p2p/litecoind/litecoind-0.8.5.3_rc3.ebuild b/net-p2p/litecoind/litecoind-0.8.5.3_rc3.ebuild new file mode 100644 index 000000000000..6d371fa849fa --- /dev/null +++ b/net-p2p/litecoind/litecoind-0.8.5.3_rc3.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-p2p/litecoind/litecoind-0.8.5.3_rc3.ebuild,v 1.1 2013/12/01 13:20:37 blueness Exp $ + +EAPI=5 + +DB_VER="4.8" + +inherit bash-completion-r1 db-use eutils systemd + +MyPV="${PV/_/-}" +MyPN="litecoin" +MyP="${MyPN}-${MyPV}" + +DESCRIPTION="P2P Internet currency based on Bitcoin but easier to mine." +HOMEPAGE="https://litecoin.org/" +SRC_URI="https://github.com/${MyPN}-project/${MyPN}/archive/v${MyPV}.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}" + +pkg_setup() { + local UG='litecoin' + enewgroup "${UG}" + enewuser "${UG}" -1 -1 /var/lib/litecoin "${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 litecoin-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_litecoin +# ./test_litecoin || die 'Tests failed' +#} + +src_install() { + dobin src/${PN} + + insinto /etc/litecoin + doins "${FILESDIR}/litecoin.conf" + fowners litecoin:litecoin /etc/litecoin/litecoin.conf + fperms 600 /etc/litecoin/litecoin.conf + + newconfd "${FILESDIR}/litecoin.confd" ${PN} + newinitd "${FILESDIR}/litecoin.initd" ${PN} + systemd_dounit "${FILESDIR}/litecoin.service" + + keepdir /var/lib/litecoin/.litecoin + fperms 700 /var/lib/litecoin + fowners litecoin:litecoin /var/lib/litecoin/ + fowners litecoin:litecoin /var/lib/litecoin/.litecoin + dosym /etc/litecoin/litecoin.conf /var/lib/litecoin/.litecoin/litecoin.conf + + dodoc doc/README.md doc/release-notes.md + newman contrib/debian/manpages/bitcoind.1 litecoind.1 + newman contrib/debian/manpages/bitcoin.conf.5 litecoin.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}/litecoind.logrotate" litecoind + fi +} diff --git a/net-p2p/litecoind/metadata.xml b/net-p2p/litecoind/metadata.xml new file mode 100644 index 000000000000..5c226ba27ceb --- /dev/null +++ b/net-p2p/litecoind/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> |