Gentoo Archives: gentoo-commits

From: "Anthony G. Basile (blueness)" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-dns/namecoind/files: namecoin.confd namecoin.conf namecoin.initd namecoind-0.3.72-makefile.patch
Date: Sun, 01 Dec 2013 15:26:47
Message-Id: 20131201152644.707542004B@flycatcher.gentoo.org
1 blueness 13/12/01 15:26:44
2
3 Added: namecoin.confd namecoin.conf namecoin.initd
4 namecoind-0.3.72-makefile.patch
5 Log:
6 Initial commit
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
9
10 Revision Changes Path
11 1.1 net-dns/namecoind/files/namecoin.confd
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/namecoind/files/namecoin.confd?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/namecoind/files/namecoin.confd?rev=1.1&content-type=text/plain
15
16 Index: namecoin.confd
17 ===================================================================
18 # Config file for /etc/init.d/namecoin
19
20 # owner of namecoind process (don't change, must be existing)
21 NAMECOIN_USER="namecoin"
22
23 # See http://www.bitcoin.org/smf/index.php?topic=1063
24 NAMECOIN_OPTS="${NAMECOIN_OPTS}"
25
26 # nice level
27 NICELEVEL="19"
28
29
30
31 1.1 net-dns/namecoind/files/namecoin.conf
32
33 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/namecoind/files/namecoin.conf?rev=1.1&view=markup
34 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/namecoind/files/namecoin.conf?rev=1.1&content-type=text/plain
35
36 Index: namecoin.conf
37 ===================================================================
38 # http://www.bitcoin.org/smf/index.php?topic=644.0
39 #rpcuser=
40 #rpcpassword=
41
42
43
44
45
46
47
48
49 1.1 net-dns/namecoind/files/namecoin.initd
50
51 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/namecoind/files/namecoin.initd?rev=1.1&view=markup
52 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/namecoind/files/namecoin.initd?rev=1.1&content-type=text/plain
53
54 Index: namecoin.initd
55 ===================================================================
56 #!/sbin/runscript
57 # Distributed under the terms of the GNU General Public License, v2 or later
58
59 VARDIR="/var/lib/namecoin"
60 CONFFILE="${VARDIR}/.namecoin/bitcoin.conf"
61
62 depend() {
63 need net
64 }
65
66 checkconfig() {
67 if [[ "${NAMECOIN_USER}" == "" ]] ; then
68 eerror "Please edit /etc/conf.d/namecoind"
69 eerror "A user must be specified to run namecoind as that user."
70 eerror "Modify USER to your needs (you may also add a group after a colon)"
71 return 1
72 fi
73 if ! `getent passwd | cut -d ':' -f 1 | grep $( echo "${NAMECOIN_USER}" | cut -d ':' -f 1 ) -sq` ; then
74 eerror "Please edit /etc/conf.d/namecoind"
75 eerror "Specified user must exist!"
76 return 1
77 fi
78 if `echo "${NAMECOIN_USER}" | grep ':' -sq` ; then
79 if ! `cut -d ':' -f 1 /etc/group | grep $( echo "${NAMECOIN_USER}" | cut -d ':' -f 2 ) -sq` ; then
80 eerror "Please edit /etc/conf.d/namecoind"
81 eerror "Specified group must exist!"
82 return 1
83 fi
84 fi
85 if ! grep -q '^rpcpassword=' "${CONFFILE}"; then
86 eerror "Please edit `readlink -f ${CONFFILE}`"
87 eerror "There must be at least a line assigning rpcpassword=something-secure"
88 return 1
89 fi
90 if ! stat -Lc '%a' "${CONFFILE}" | grep -q '^[4567]00$'; then
91 eerror "`readlink -f ${CONFFILE}` should not be readable by other users"
92 return 1
93 fi
94 return 0
95 }
96
97 start() {
98 checkconfig || return 1
99 ebegin "Starting Namecoind daemon"
100
101 pkg-config openrc
102 if [ $? = 0 ]; then
103 start_openrc
104 else
105 start_baselayout
106 fi
107 }
108
109 stop() {
110 ebegin "Stopping Namecoin daemon"
111
112 pkg-config openrc
113 if [ $? = 0 ]; then
114 stop_openrc
115 else
116 stop_baselayout
117 fi
118 }
119
120 start_openrc() {
121 start-stop-daemon \
122 --start --user "${NAMECOIN_USER}" --name namecoind \
123 --pidfile /var/run/namecoind.pid --make-pidfile \
124 --env HOME="${VARDIR}" --exec /usr/bin/namecoind \
125 --nicelevel "${NICELEVEL}" \
126 --background \
127 --wait 2000 \
128 -- ${NAMECOIN_OPTS}
129 eend $?
130 }
131
132 stop_openrc() {
133 start-stop-daemon --stop --user "${NAMECOIN_USER}" \
134 --name namecoind --pidfile /var/run/namecoind.pid \
135 --wait 30000 \
136 --progress
137 eend $?
138 }
139
140 start_baselayout() {
141 start-stop-daemon \
142 --start --user "${NAMECOIN_USER}" --name namecoind \
143 --pidfile /var/run/namecoind.pid --make-pidfile \
144 --env HOME="${VARDIR}" --exec /usr/bin/namecoind \
145 --chuid "${NAMECOIN_USER}" \
146 --nicelevel "${NICELEVEL}" \
147 --background \
148 -- ${NAMECOIN_OPTS}
149 eend $?
150 }
151
152 stop_baselayout() {
153 start-stop-daemon \
154 --stop \
155 --user "${NAMECOIN_USER}" \
156 --name namecoind \
157 --pidfile /var/run/namecoind.pid
158 eend $?
159 }
160
161
162
163 1.1 net-dns/namecoind/files/namecoind-0.3.72-makefile.patch
164
165 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/namecoind/files/namecoind-0.3.72-makefile.patch?rev=1.1&view=markup
166 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-dns/namecoind/files/namecoind-0.3.72-makefile.patch?rev=1.1&content-type=text/plain
167
168 Index: namecoind-0.3.72-makefile.patch
169 ===================================================================
170 diff -Naur namecoinq-vQ.3.72.orig/src/Makefile namecoinq-vQ.3.72/src/Makefile
171 --- namecoinq-vQ.3.72.orig/src/Makefile 2013-10-29 09:38:10.000000000 -0400
172 +++ namecoinq-vQ.3.72/src/Makefile 2013-11-30 18:43:25.016028725 -0500
173 @@ -1,6 +1,6 @@
174 -CXX=g++
175 +CXX?=g++
176
177 -DEFS=-D_MT -DNOPCH -DFOURWAYSSE2 -DUSE_SSL
178 +DEFS=-D_MT -DNOPCH -DFOURWAYSSE2 -DUSE_SSL
179
180 # Detect MinGW
181 MINGW=$(shell uname -s|grep -i mingw32)
182 @@ -8,20 +8,10 @@
183 # Link boost statically
184 DEFS += -DBOOST_THREAD_USE_LIB
185
186 -INCLUDEPATHS= \
187 - -I../libs/openssl-1.0.1e/include \
188 - -I../libs/db-4.7.25.NC/build_unix \
189 - -I../libs/boost_1_50_0
190 -
191 -LIBPATHS= \
192 - -L../libs/openssl-1.0.1e \
193 - -L../libs/db-4.7.25.NC/build_unix \
194 - -L../libs/boost_1_50_0/stage/lib
195 -
196 LIBBOOST_SUFFIX=
197
198 LIBS= \
199 - -Wl,-Bstatic \
200 + -Wl,-Bdynamic \
201 -l boost_system$(LIBBOOST_SUFFIX) \
202 -l boost_filesystem$(LIBBOOST_SUFFIX) \
203 -l boost_program_options$(LIBBOOST_SUFFIX) \
204 @@ -70,7 +60,7 @@
205 -l pthread
206 endif
207
208 -CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEFS) $(INCLUDEPATHS)
209 +#CXXFLAGS=-O2 -Wno-invalid-offsetof -Wformat $(DEFS) $(INCLUDEPATHS)
210 HEADERS=headers.h strlcpy.h serialize.h uint256.h util.h key.h bignum.h base58.h \
211 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
212
213 @@ -110,7 +100,7 @@
214 obj/nogui/namecoin.o: namecoin.h
215
216 namecoind: $(OBJS:obj/%=obj/nogui/%) obj/nogui/namecoin.o
217 - $(CXX) $(CXXFLAGS) -o $@ $(LIBPATHS) $^ $(LIBS)
218 + $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) $(LIBS)
219
220 clean:
221 -rm -f namecoin namecoind