diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-p2p/litecoind | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-p2p/litecoind')
-rw-r--r-- | net-p2p/litecoind/Manifest | 2 | ||||
-rw-r--r-- | net-p2p/litecoind/files/0.9.0-sys_leveldb.patch | 34 | ||||
-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.initd-r1 | 29 | ||||
-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.10.2.2-r1.ebuild | 98 | ||||
-rw-r--r-- | net-p2p/litecoind/litecoind-0.8.7.4.ebuild | 123 | ||||
-rw-r--r-- | net-p2p/litecoind/metadata.xml | 15 |
12 files changed, 653 insertions, 0 deletions
diff --git a/net-p2p/litecoind/Manifest b/net-p2p/litecoind/Manifest new file mode 100644 index 000000000000..1ead5112eb41 --- /dev/null +++ b/net-p2p/litecoind/Manifest @@ -0,0 +1,2 @@ +DIST litecoin-0.10.2.2.tar.gz 4700783 SHA256 952c84b181323db17a8fa23217f59b576ad3ebad92c158b3a7c29d458a1130dc SHA512 46e4c014ae8527dd58af073bab96ea4fd55c69fcc63eaa4fd600bf3c1fc2102500151b49431a72b55334a409d4f5226937cd0c5337feaa4ad49e6ef9e9728aba WHIRLPOOL 5c1d5605d4afb16744fcf0b09dd52eb574aea0cdd9754f94d4cfd9ac064491a0e192d8c4b1a3324e355d71758735265b272dfa41f938212e17badb9f8a70698b +DIST litecoin-0.8.7.4.tar.gz 4808429 SHA256 032d1eb2ffb06ce467f514e08a66f42bcd507df2d8f1cf2c0541f2906288931a SHA512 14588dab6450bee439c3af16e277afc1f2ff562c93463d9767da27cf724cd6bb4a1c64100806d61dc1d062a39f440e4878e19b425f29e866562acc56c893cca5 WHIRLPOOL 1329d7c234c75b5083f58f5edf69b6ea9acc13f48a9734cd839001dcd3e52c10d3ade55ac853e196deca8b149aba00a3590e52cf766f62b941bd4e4828f10b96 diff --git a/net-p2p/litecoind/files/0.9.0-sys_leveldb.patch b/net-p2p/litecoind/files/0.9.0-sys_leveldb.patch new file mode 100644 index 000000000000..60e9f2b20941 --- /dev/null +++ b/net-p2p/litecoind/files/0.9.0-sys_leveldb.patch @@ -0,0 +1,34 @@ +commit c38e0af3e021eb0b2aba846c77b06ca71de06b11 (personal-github/sys_leveldb, sys_leveldb) +Author: Luke Dashjr <luke-jr+git@utopios.org> +Date: Mon Sep 9 03:06:17 2013 +0000 + + configure: Add unsupported --with-system-leveldb configure flag + +diff --git a/configure.ac b/configure.ac +index 3ed4549..5a5852d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -332,10 +332,22 @@ AC_TRY_COMPILE([#include <sys/socket.h>], + [ AC_MSG_RESULT(no)] + ) + ++dnl Check for leveldb, only if explicitly requested + LEVELDB_CPPFLAGS= + LIBLEVELDB= + LIBMEMENV= +-AM_CONDITIONAL([EMBEDDED_LEVELDB],[true]) ++AC_ARG_WITH([system-leveldb], ++ [AS_HELP_STRING([--with-system-leveldb], ++ [Build with system LevelDB (default is no; DANGEROUS; NOT SUPPORTED)])], ++ [system_leveldb=$withval], ++ [system_leveldb=no] ++) ++if test x$system_leveldb != xno; then ++ LEVELDB_CPPFLAGS= ++ LIBLEVELDB=-lleveldb ++ LIBMEMENV=-lmemenv ++fi ++AM_CONDITIONAL([EMBEDDED_LEVELDB],[test x$system_leveldb = xno]) + AC_SUBST(LEVELDB_CPPFLAGS) + AC_SUBST(LIBLEVELDB) + AC_SUBST(LIBMEMENV) 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.initd-r1 b/net-p2p/litecoind/files/litecoin.initd-r1 new file mode 100644 index 000000000000..c5bd2f9ceef2 --- /dev/null +++ b/net-p2p/litecoind/files/litecoin.initd-r1 @@ -0,0 +1,29 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +vardir="/var/lib/litecoin" +conffile="${vardir}/.litecoin/litecoin.conf" +litecoind_user="${LITECOIN_USER:-nobody:nobody}" + +description="P2P Internet currency based on Bitcoin but easier to mine." +pidfile="/run/${SVCNAME}.pid" +command="/usr/bin/litecoind" +command_args="${LITECOIN_OPTS}" +command_background="true" +start_stop_daemon_args="-u ${litecoind_user} -e HOME=${vardir} -N ${NICELEVEL:-0} -w 2000" + +depend() { + need net +} + +start_pre() { + checkpath -f -o ${litecoind_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/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.10.2.2-r1.ebuild b/net-p2p/litecoind/litecoind-0.10.2.2-r1.ebuild new file mode 100644 index 000000000000..0a3c95d314f5 --- /dev/null +++ b/net-p2p/litecoind/litecoind-0.10.2.2-r1.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DB_VER="4.8" + +inherit autotools db-use eutils systemd user + +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="logrotate upnp +wallet" + +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] + virtual/bitcoin-leveldb +" +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}/0.9.0-sys_leveldb.patch" + eautoreconf + rm -r src/leveldb +} + +src_configure() { + local my_econf= + if use upnp; then + my_econf="${my_econf} --with-miniupnpc --enable-upnp-default" + else + my_econf="${my_econf} --without-miniupnpc --disable-upnp-default" + fi + econf \ + $(use_enable wallet)\ + --disable-ccache \ + --disable-static \ + --disable-tests \ + --with-system-leveldb \ + --with-system-libsecp256k1 \ + --without-libs \ + --with-daemon \ + --without-gui \ + --without-qrencode \ + ${my_econf} +} + +src_install() { + default + + 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-r1" ${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 logrotate; then + insinto /etc/logrotate.d + newins "${FILESDIR}/litecoind.logrotate" litecoind + fi +} diff --git a/net-p2p/litecoind/litecoind-0.8.7.4.ebuild b/net-p2p/litecoind/litecoind-0.8.7.4.ebuild new file mode 100644 index 000000000000..26d0a7f2dfef --- /dev/null +++ b/net-p2p/litecoind/litecoind-0.8.7.4.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DB_VER="4.8" + +inherit bash-completion-r1 db-use eutils systemd user + +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="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-r1" ${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 + + sed -i -e 's/bitcoin/litecoin/g' contrib/bitcoind.bash-completion + newbashcomp contrib/bitcoind.bash-completion ${PN}.bash-completion + + 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..bc7a1fd1d7a9 --- /dev/null +++ b/net-p2p/litecoind/metadata.xml @@ -0,0 +1,15 @@ +<?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> + <flag name='wallet'>Enable wallet support</flag> + </use> + <upstream> + <remote-id type="github">litecoin-project/litecoin</remote-id> + </upstream> +</pkgmetadata> |