Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/blueness:master commit in: net-p2p/namecoind/, net-p2p/namecoind/files/
Date: Sun, 01 Dec 2013 00:10:40
Message-Id: 1385856677.e7e1837e360a0cb0d6365e97c42122aa3ba48a46.blueness@gentoo
1 commit: e7e1837e360a0cb0d6365e97c42122aa3ba48a46
2 Author: layman <layman <AT> localhost>
3 AuthorDate: Sun Dec 1 00:11:17 2013 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 1 00:11:17 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/blueness.git;a=commit;h=e7e1837e
7
8 net-p2p/namecoind: initial commit
9
10 Package-Manager: portage-2.2.7
11 Manifest-Sign-Key: 0xF52D4BBA
12
13 ---
14 net-p2p/namecoind/Manifest | 7 ++
15 net-p2p/namecoind/files/namecoin.conf | 8 ++
16 net-p2p/namecoind/files/namecoin.confd | 10 ++
17 net-p2p/namecoind/files/namecoin.initd | 104 +++++++++++++++++++++
18 .../files/namecoind-0.3.72-makefile.patch | 52 +++++++++++
19 net-p2p/namecoind/metadata.xml | 8 ++
20 net-p2p/namecoind/namecoind-0.3.72.ebuild | 77 +++++++++++++++
21 7 files changed, 266 insertions(+)
22
23 diff --git a/net-p2p/namecoind/Manifest b/net-p2p/namecoind/Manifest
24 new file mode 100644
25 index 0000000..27afd2e
26 --- /dev/null
27 +++ b/net-p2p/namecoind/Manifest
28 @@ -0,0 +1,7 @@
29 +AUX namecoin.conf 80 SHA256 541ae10cc2246b620de3e7efa97eee59efacf83d28ea5f1297a121d0708226d2 SHA512 43bef890505a1fac88887bb39e9fdd4ec673ae8838a40279b33711e970551f5a75ac25171c41f8c83de2c953b157f7a3f57171e868fd9f626007d9909331a19f WHIRLPOOL 728e38b62da2c7c3a1149ac511b92d156f7b3c51dacfadd7ce74d9e6f915a6547c4cc8d34159243f50eee333c63b35949b311ea5a7f48a6c3bf17a5d4d47c123
30 +AUX namecoin.confd 244 SHA256 4fbf157c72d254497298f0e08440dd038f668b921dd61ff5c3306e0a02bb8e1f SHA512 dedd94211b7808a8bd067c929ce5dd7f864cb8ae9c90eceb4856cf88cd81ec0ae20ad12c38450257e6d5c08f7eeca7cb116bfc2b7fe28bd854668eaf67f65b5d WHIRLPOOL 55b75fe9cd772fc24fb857ec2c9930cdb162dd425b5903adb586f9220516ef1b06a3090f5733a471d5819797b6763bb7350a57d0786f29b4bcdfa737ee5ac9d9
31 +AUX namecoin.initd 2510 SHA256 794f327eb304a9e7ea47a8b9c3cae99a671b4069046ab02845f3ddc2deed73a0 SHA512 cf639ccb07366e29e00f3165ede6497109d72c820d27b186d31003768deeea2103568f2d24f2cc04d994e096d6a33e3b15c8aacd2c340ffc2f5d6d9d71b58842 WHIRLPOOL 78b8c1033570089e4d7609c14a8548d2c4f4d9bfdac1c99f7f6f0a800af14f6a12488a5c5e5215b5d1e6add13e163e234dd06748a338227a1a5eeb30ec34af8c
32 +AUX namecoind-0.3.72-makefile.patch 1582 SHA256 c69a27a610e906fe7605fa5c5df4c497795c5580b2f55b0db987ce95616110cc SHA512 9102a487acdb176c7b77fc7fab73b5aa7f5098819030bad813890e96d01ba9250817b39b1fa2c945cc6bce67f92f66ae429a81c7d760a1740d46fc88d8f9efd5 WHIRLPOOL 717a4eaeb253d1c4aab5fce83daddfcee26a06a999487625c9c8df3c70448b591ae8b5a358e08a33450c4d2da6ea08aee75a54e2761c6448ac1d30c1d93e239e
33 +DIST namecoind-0.3.72.zip 1611426 SHA256 7a47611cd4dff27fbf64ccff9ef524ec33046993a2e9cb3efcb978ef1077d5dc SHA512 f8a0f8c6c7a079afe50291f68807dc6a9b89c124c601033085fa75ba48cdf5c1bb4d0528b831c854c589e4ec5db7f14d8b7df89be791e5805d3e68617b970436 WHIRLPOOL 23e287ad503a1da5033cda39a2f0e4e6aaecdad083e3f2beaca8500670121c6ec25ce8914345142e21f366fccbd78420b33ad4391cee0a000878abb604aeede2
34 +EBUILD namecoind-0.3.72.ebuild 1735 SHA256 541c666642d68a4e20ed5bfcae805810285cde998f83f22bdba396f8b22f84bb SHA512 838f4e597d9c8ad7ef7f37132f13e708982f972c5274121dc7c0ce5818c98a2340125f4aaa49819fb162c38a80b6f6021f05189b1abb61deebf63bfcb5b7eee0 WHIRLPOOL 51a1f2606e602681ee1a146e96a965a2feda444839015bfa93bc0f437112024c46b5d05c7e20b0fe4bcb1ae04fe54b3e39b491521ac2c40193558cea9df78f5f
35 +MISC metadata.xml 238 SHA256 f13e6e7b65d20beb9ae945d520160ef0dba80c1965754958945904d7e3c0a75f SHA512 3c3d75f1cb90ffcfb98df47481fbde6d451254a29fa87577acd25bc27cbcc3e5dbc0c1efce5974be905428f0b7caf912c8b051417aff92763847fa377493a153 WHIRLPOOL 6ec3d597b87aff99014404b8b732e6f600aafc3c3eeebfab135c9c19cde2e43161cfa23f841bd72826cc3393b724e1dac115c15dcce2b74ace6f1d6ec209dbf3
36
37 diff --git a/net-p2p/namecoind/files/namecoin.conf b/net-p2p/namecoind/files/namecoin.conf
38 new file mode 100644
39 index 0000000..c6a55f3
40 --- /dev/null
41 +++ b/net-p2p/namecoind/files/namecoin.conf
42 @@ -0,0 +1,8 @@
43 +# http://www.bitcoin.org/smf/index.php?topic=644.0
44 +#rpcuser=
45 +#rpcpassword=
46 +
47 +
48 +
49 +
50 +
51
52 diff --git a/net-p2p/namecoind/files/namecoin.confd b/net-p2p/namecoind/files/namecoin.confd
53 new file mode 100644
54 index 0000000..0120a56
55 --- /dev/null
56 +++ b/net-p2p/namecoind/files/namecoin.confd
57 @@ -0,0 +1,10 @@
58 +# Config file for /etc/init.d/namecoin
59 +
60 +# owner of namecoind process (don't change, must be existing)
61 +NAMECOIN_USER="namecoin"
62 +
63 +# See http://www.bitcoin.org/smf/index.php?topic=1063
64 +NAMECOIN_OPTS="${NAMECOIN_OPTS}"
65 +
66 +# nice level
67 +NICELEVEL="19"
68
69 diff --git a/net-p2p/namecoind/files/namecoin.initd b/net-p2p/namecoind/files/namecoin.initd
70 new file mode 100644
71 index 0000000..4330c91
72 --- /dev/null
73 +++ b/net-p2p/namecoind/files/namecoin.initd
74 @@ -0,0 +1,104 @@
75 +#!/sbin/runscript
76 +# Distributed under the terms of the GNU General Public License, v2 or later
77 +
78 +VARDIR="/var/lib/namecoin"
79 +CONFFILE="${VARDIR}/.namecoin/bitcoin.conf"
80 +
81 +depend() {
82 + need net
83 +}
84 +
85 +checkconfig() {
86 + if [[ "${NAMECOIN_USER}" == "" ]] ; then
87 + eerror "Please edit /etc/conf.d/namecoind"
88 + eerror "A user must be specified to run namecoind as that user."
89 + eerror "Modify USER to your needs (you may also add a group after a colon)"
90 + return 1
91 + fi
92 + if ! `getent passwd | cut -d ':' -f 1 | grep $( echo "${NAMECOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then
93 + eerror "Please edit /etc/conf.d/namecoind"
94 + eerror "Specified user must exist!"
95 + return 1
96 + fi
97 + if `echo "${NAMECOIN_USER}" | grep ':' -sq` ; then
98 + if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${NAMECOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then
99 + eerror "Please edit /etc/conf.d/namecoind"
100 + eerror "Specified group must exist!"
101 + return 1
102 + fi
103 + fi
104 + if ! grep -q '^rpcpassword=' "${CONFFILE}"; then
105 + eerror "Please edit `readlink -f ${CONFFILE}`"
106 + eerror "There must be at least a line assigning rpcpassword=something-secure"
107 + return 1
108 + fi
109 + if ! stat -Lc '%a' "${CONFFILE}" | grep -q '^[4567]00$'; then
110 + eerror "`readlink -f ${CONFFILE}` should not be readable by other users"
111 + return 1
112 + fi
113 + return 0
114 +}
115 +
116 +start() {
117 + checkconfig || return 1
118 + ebegin "Starting Namecoind daemon"
119 +
120 + pkg-config openrc
121 + if [ $? = 0 ]; then
122 + start_openrc
123 + else
124 + start_baselayout
125 + fi
126 +}
127 +
128 +stop() {
129 + ebegin "Stopping Namecoin daemon"
130 +
131 + pkg-config openrc
132 + if [ $? = 0 ]; then
133 + stop_openrc
134 + else
135 + stop_baselayout
136 + fi
137 +}
138 +
139 +start_openrc() {
140 + start-stop-daemon \
141 + --start --user "${NAMECOIN_USER}" --name namecoind \
142 + --pidfile /var/run/namecoind.pid --make-pidfile \
143 + --env HOME="${VARDIR}" --exec /usr/bin/namecoind \
144 + --nicelevel "${NICELEVEL}" \
145 + --background \
146 + --wait 2000 \
147 + -- ${NAMECOIN_OPTS}
148 + eend $?
149 +}
150 +
151 +stop_openrc() {
152 + start-stop-daemon --stop --user "${NAMECOIN_USER}" \
153 + --name namecoind --pidfile /var/run/namecoind.pid \
154 + --wait 30000 \
155 + --progress
156 + eend $?
157 +}
158 +
159 +start_baselayout() {
160 + start-stop-daemon \
161 + --start --user "${NAMECOIN_USER}" --name namecoind \
162 + --pidfile /var/run/namecoind.pid --make-pidfile \
163 + --env HOME="${VARDIR}" --exec /usr/bin/namecoind \
164 + --chuid "${NAMECOIN_USER}" \
165 + --nicelevel "${NICELEVEL}" \
166 + --background \
167 + -- ${NAMECOIN_OPTS}
168 + eend $?
169 +}
170 +
171 +stop_baselayout() {
172 + start-stop-daemon \
173 + --stop \
174 + --user "${NAMECOIN_USER}" \
175 + --name namecoind \
176 + --pidfile /var/run/namecoind.pid
177 + eend $?
178 +}
179
180 diff --git a/net-p2p/namecoind/files/namecoind-0.3.72-makefile.patch b/net-p2p/namecoind/files/namecoind-0.3.72-makefile.patch
181 new file mode 100644
182 index 0000000..f899694
183 --- /dev/null
184 +++ b/net-p2p/namecoind/files/namecoind-0.3.72-makefile.patch
185 @@ -0,0 +1,52 @@
186 +diff -Naur namecoinq-vQ.3.72.orig/src/Makefile namecoinq-vQ.3.72/src/Makefile
187 +--- namecoinq-vQ.3.72.orig/src/Makefile 2013-10-29 09:38:10.000000000 -0400
188 ++++ namecoinq-vQ.3.72/src/Makefile 2013-11-30 18:43:25.016028725 -0500
189 +@@ -1,6 +1,6 @@
190 +-CXX=g++
191 ++CXX?=g++
192 +
193 +-DEFS=-D_MT -DNOPCH -DFOURWAYSSE2 -DUSE_SSL
194 ++DEFS=-D_MT -DNOPCH -DFOURWAYSSE2 -DUSE_SSL
195 +
196 + # Detect MinGW
197 + MINGW=$(shell uname -s|grep -i mingw32)
198 +@@ -8,20 +8,10 @@
199 + # Link boost statically
200 + DEFS += -DBOOST_THREAD_USE_LIB
201 +
202 +-INCLUDEPATHS= \
203 +- -I../libs/openssl-1.0.1e/include \
204 +- -I../libs/db-4.7.25.NC/build_unix \
205 +- -I../libs/boost_1_50_0
206 +-
207 +-LIBPATHS= \
208 +- -L../libs/openssl-1.0.1e \
209 +- -L../libs/db-4.7.25.NC/build_unix \
210 +- -L../libs/boost_1_50_0/stage/lib
211 +-
212 + LIBBOOST_SUFFIX=
213 +
214 + LIBS= \
215 +- -Wl,-Bstatic \
216 ++ -Wl,-Bdynamic \
217 + -l boost_system$(LIBBOOST_SUFFIX) \
218 + -l boost_filesystem$(LIBBOOST_SUFFIX) \
219 + -l boost_program_options$(LIBBOOST_SUFFIX) \
220 +@@ -70,7 +60,7 @@
221 + -l pthread
222 + endif
223 +
224 +-CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEFS) $(INCLUDEPATHS)
225 ++#CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEFS) $(INCLUDEPATHS)
226 + HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
227 + script.h allocators.h db.h walletdb.h crypter.h net.h irc.h keystore.h main.h wallet.h bitcoinrpc.h uibase.h ui.h noui.h init.h auxpow.h
228 +
229 +@@ -110,7 +100,7 @@
230 + obj/nogui/namecoin.o: namecoin.h
231 +
232 + namecoind: $(OBJS:obj/%=obj/nogui/%) obj/nogui/namecoin.o
233 +- $(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
234 ++ $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
235 +
236 + clean:
237 + -rm -f namecoin namecoind
238
239 diff --git a/net-p2p/namecoind/metadata.xml b/net-p2p/namecoind/metadata.xml
240 new file mode 100644
241 index 0000000..1e75873
242 --- /dev/null
243 +++ b/net-p2p/namecoind/metadata.xml
244 @@ -0,0 +1,8 @@
245 +<?xml version="1.0" encoding="UTF-8"?>
246 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
247 +<pkgmetadata>
248 + <maintainer>
249 + <email>blueness@g.o</email>
250 + <name>Anthony G. Basile</name>
251 + </maintainer>
252 +</pkgmetadata>
253
254 diff --git a/net-p2p/namecoind/namecoind-0.3.72.ebuild b/net-p2p/namecoind/namecoind-0.3.72.ebuild
255 new file mode 100644
256 index 0000000..05cad52
257 --- /dev/null
258 +++ b/net-p2p/namecoind/namecoind-0.3.72.ebuild
259 @@ -0,0 +1,77 @@
260 +# Copyright 2010-2013 Gentoo Foundation
261 +# Distributed under the terms of the GNU General Public License v2
262 +# $Header: $
263 +
264 +EAPI=4
265 +
266 +DB_VER="4.8"
267 +
268 +inherit db-use eutils toolchain-funcs
269 +
270 +DESCRIPTION="A P2P network based domain name system"
271 +HOMEPAGE="https://dot-bit.org/"
272 +SRC_URI="https://github.com/namecoinq/namecoinq/archive/v${PV/0/Q}.zip -> ${P}.zip"
273 +
274 +LICENSE="MIT ISC cryptopp"
275 +SLOT="0"
276 +KEYWORDS="~amd64 ~x86"
277 +IUSE="ssl upnp"
278 +
279 +RDEPEND="
280 + dev-libs/boost[threads(+)]
281 + dev-libs/crypto++
282 + dev-libs/openssl[-bindist]
283 + upnp? (
284 + net-libs/miniupnpc
285 + )
286 + sys-libs/db:$(db_ver_to_slot "${DB_VER}")[cxx]
287 +"
288 +DEPEND="${RDEPEND}
289 + >=app-shells/bash-4.1
290 +"
291 +
292 +S="${WORKDIR}/namecoinq-v${PV/0/Q}"
293 +
294 +pkg_setup() {
295 + local UG='namecoin'
296 + enewgroup "${UG}"
297 + enewuser "${UG}" -1 -1 /var/lib/namecoin "${UG}"
298 +}
299 +
300 +src_prepare() {
301 + epatch "${FILESDIR}"/namecoind-0.3.72-makefile.patch
302 +}
303 +
304 +src_compile() {
305 + local OPTS=()
306 +
307 + OPTS+=("CXXFLAGS=${CXXFLAGS} -I$(db_includedir "${DB_VER}")")
308 + OPTS+=("LDFLAGS=${LDFLAGS} -ldb_cxx-${DB_VER}")
309 +
310 + use ssl && OPTS+=(USE_SSL=1)
311 + use upnp && OPTS+=(USE_UPNP=1)
312 +
313 + cd src || die
314 + emake CXX="$(tc-getCXX)" "${OPTS[@]}" ${PN}
315 +}
316 +
317 +src_install() {
318 + dobin src/${PN}
319 +
320 + insinto /etc/namecoin
321 + doins "${FILESDIR}/namecoin.conf"
322 + fowners namecoin:namecoin /etc/namecoin/namecoin.conf
323 + fperms 600 /etc/namecoin/namecoin.conf
324 +
325 + newconfd "${FILESDIR}/namecoin.confd" ${PN}
326 + newinitd "${FILESDIR}/namecoin.initd" ${PN}
327 +
328 + keepdir /var/lib/namecoin/.namecoin
329 + fperms 700 /var/lib/namecoin
330 + fowners namecoin:namecoin /var/lib/namecoin/
331 + fowners namecoin:namecoin /var/lib/namecoin/.namecoin
332 + dosym /etc/namecoin/namecoin.conf /var/lib/namecoin/.namecoin/bitcoin.conf
333 +
334 + dodoc doc/README
335 + dodoc DESIGN-namecoin.md FAQ.md doc/README_merged-mining.md
336 +}