Name: emercoind Version: 0.3.7 Release: alt1 Summary: Emercoind - the emercoin wallet daemon Summary(ru_RU.UTF-8): Демон кошелька криптовалюты Emercoin License: GPLv3, MIT Group: Other Url: http://emercoin.com/ Source0: http://sourceforge.net/projects/emercoin/files/%version/emercoin-%version-linux.tar.gz Source1: emercoin.init Source2: emercoin.sysconfig Source3: emercoin.README-ALTLINUX Source4: emcdns.conf Source5: emercoin.conf.sample Source6: emercoin.service Patch0: emercoin-0.3.4-db_cxx.patch PreReq: service, chkconfig, net-tools, grep Requires(post): shadow-utils #Requires(postun): Provides: emercoin %define _puser _emercoin %define confdir %{_sysconfdir}/emercoin %define workdir %{_localstatedir}/emercoin %define docdir %{_datadir}/doc/emercoind # Automatically added by buildreq on Mon Oct 12 2015 # optimized out: boost-devel libcom_err-devel libdb4-devel libkrb5-devel libstdc++-devel BuildRequires: coreutils boost-asio-devel boost-devel-headers boost-filesystem-devel boost-interprocess-devel boost-program_options-devel gcc-c++ git-core libdb4.8_cxx-devel libssl-devel zlib-devel %description Emercoind is the daemon for the walllet of the cryptocurrency Emercoin. Emercoin wallet is not only currency. This is the cryptocontainer for any data. All data stored in the name-value pairs, value up to 20 kB, and this is named "NVS. NVS used for distributed DNS (TLDs ".bazar", ".coin", ".emc", ".lib"), PKI (SSL and SSH), magnet "tracker" and other. See http://emercoin.com/ for details. %description -l ru_RU.UTF-8 Emercoind - демон кошелька криптоваюты Emercoin. Emercoin не только валюта. Кошелёк Emercoin это криптоконтейнер для любых данных. Все данные хранятся в парах "имя-значение", где размер значения может достигать 20 кб, это называется "NVS" (name-value storage). NVS используется для распределённой системы DNS (корневые зоны ".bazar", ".coin", ".emc", ".lib"), системы PKI (с ключами SSL и SSH), как "трекер" магнет-ссылок и другого. Подробнее см. на сайте http://emercoin.com/. %package -n emercoin-bind BuildArch: noarch Requires: bind >= 9.0.0, emercoin >= 0.3.0 Requires(post): sed Summary: EMCDNS - distributed DNS based on the emercoin cryptocurrency Summary(ru_RU.UTF-8): EMCDNS - расределённая система DNS, основанная на криптовалюте Emercoin License: BSD-style Group: Networking/DNS %description -n emercoin-bind EMCDNS - distributed DNS based on the emercoin cryptocurrency. Emercoin wallet is the cryptocontainer for storing any data in the distributed p2p network. All data stored in the blockchain in the form of the name-value pairs (NVS). Domain names stored in the NVS with names prefixed with "dns:" and pipe-separated list of RRs in the value. For example: the name "dns:flibusta.lib" has value "A=81.17.19.227|SD=static,cn|TXT=Flibusta Library". The package emercoin-bind insert support of the EMSDNS zones into named.conf. %description -n emercoin-bind -l ru_RU.UTF-8 EMCDNS - расределённая система DNS, основанная на криптовалюте Emercoin Кошелёк Emercoin представляет собой криптоконтейнер для хранения любых данных в распределённой p2p-сети. Все данные хранятся в криптоблоке в форме пар "имя-значение" (NVS). Доменные имена хранятся в NVS с именами, начинающимися с префикса "dns:", а в поле "значение" помещён список RR-записей, разделённый символами "|". Например, имя "dns:flibusta.lib" содержит значение "A=81.17.19.227|SD=static,cn|TXT=Flibusta Library". Пакет emercoin-bind добавляет поддержку зон EMCDNS в named.conf. %prep %setup -q -n emercoin-%{version}-linux %patch0 %build pushd src/src make -f makefile.unix USE_UPNP=- popd %define econfdir %{buildroot}%{_sysconfdir}/emercoin %define eworkdir %{buildroot}%{_localstatedir}/emercoin %define edocdir %{buildroot}%{_datadir}/doc/emercoind %define einitdir %{buildroot}%{_initdir} %define emandir %{buildroot}%_mandir %install install -d -m 700 %{eworkdir} %{eworkdir}/.emercoin %{econfdir} install -m 755 -d %{edocdir}/example/{pyminer,wallettools,emcssl} %{buildroot}%{_bindir} %{emandir}/man{1,5} %{buildroot}%{_sysconfdir}/sysconfig/ install -D -m 755 src/src/emercoind %{buildroot}%{_bindir} install -m 755 -d %{einitdir} install -D -m 755 %SOURCE1 %{einitdir}/emercoind install -D -m 644 %SOURCE6 %{buildroot}/%{systemd_unitdir}/emercoind.service install -m 644 src/COPYING src/README %{edocdir} install -m 644 src/contrib/bitrpc/bitrpc.py %{edocdir}/example/ install -m 644 src/contrib/debian/examples/emercoin.conf %{edocdir}/example/emercoin.conf.sample install -m 644 src/contrib/wallettools/* %{edocdir}/example/wallettools install -m 644 src/contrib/pyminer/* %{edocdir}/example/pyminer install -m 644 src/contrib/debian/manpages/*.1 %{emandir}/man1 install -m 644 src/contrib/debian/manpages/*.5 %{emandir}/man5 cp -R --no-preserve=mode src/X509/* %{edocdir}/example/emcssl/ install %SOURCE2 %{buildroot}%{_sysconfdir}/sysconfig/emercoin install %SOURCE3 %{edocdir}/README-ALTLINUX install %SOURCE5 %{edocdir}/emercoin.conf.sample install -d -m 710 %{buildroot}%{_localstatedir}/bind/etc install -m 640 %SOURCE4 %{buildroot}%{_localstatedir}/bind/etc/emcdns.conf %files %{_bindir}/emercoind %{_initdir}/emercoind %{systemd_unitdir}/emercoind.service %config(noreplace) %{_sysconfdir}/sysconfig/emercoin %dir %attr(0700,%_puser,%_puser) %workdir #%doc %{docdir}/README-ALTLINUX #%doc %{docdir}/emercoin.conf.sample %doc %{docdir}/ %_man1dir/* %_man5dir/* %{workdir} %files -n emercoin-bind %config(noreplace) %{_localstatedir}/bind/etc/emcdns.conf %pre getent passwd %_puser >/dev/null || ( useradd -d %{workdir} -c "Emercoin wallet daemon" -r -s /sbin/nologin %_puser ) %post CONFFILE=%{confdir}/emercoin.conf if [ "$RPM_INSTALL_ARG1" -eq 1 ]; then chown -R %_puser:%_puser "%{workdir}" install -d -o %_puser -g %_puser -m 700 %{confdir} if [ ! -f "${CONFFILE}" ]; then install -m 640 -o root -g %_puser /usr/share/doc/emercoind/emercoin.conf.sample "${CONFFILE}" echo -n rpcpassword= >>"${CONFFILE}" head -c45 /dev/random | base64 >>"${CONFFILE}" fi [[ -e %{workdir}/.emercoin/emercoin.conf ]] || ln -s "${CONFFILE}" %{workdir}/.emercoin/emercoin.conf else chown -R %_puser:%_puser "%{workdir}/.emercoin" fi %post_service emercoind #if [ "$RPM_INSTALL_ARG1" -eq 1 ]; then # chkconfig --add emercoind # service emercoind start #else # service emercoind condrestart #fi %preun %preun_service emercoind #if [ "$RPM_INSTALL_ARG1" -eq 0 ]; then # service emercoind condstop # chkconfig --del emercoind #fi %preun -n emercoin-bind if [ "$RPM_INSTALL_ARG1" -eq 0 ]; then sed -i '/^include "\/etc\/emcdns.conf";/d' %{_localstatedir}/bind/etc/local.conf service bind reload fi %post -n emercoin-bind if [ "$RPM_INSTALL_ARG1" -eq 1 && -f %{_localstatedir}/bind/etc/local.conf ]; then GROUP=$( ls -l %{_localstatedir}/bind/etc/local.conf | awk '{print $4}' ) chown root:${GROUP:-named} %{_localstatedir}/bind/etc/emcdns.conf grep -qE '^include "/etc/emcdns.conf";' %{_localstatedir}/bind/etc/local.conf || ( echo ' include "/etc/emcdns.conf";' >> %{_localstatedir}/bind/etc/local.conf service bind reload ) fi %clean #rm -rf %{buildroot} %changelog * Sat Jan 2 2016 Stas Degtev 0.3.7-alt1 - initial build for ALT Linux