Fedora RPM support:

- Add RPM spec file
- Whitelist Fedora during SConstruct
This commit is contained in:
Luke Cyca
2014-03-20 16:19:23 -07:00
committed by Vinnie Falco
parent 4886772ca3
commit a4a7dd4314
2 changed files with 55 additions and 1 deletions

53
Builds/rpm/rippled.spec Normal file
View File

@@ -0,0 +1,53 @@
Name: rippled
Version: 0.23.0
Release: 1%{?dist}
Summary: Ripple peer-to-peer network daemon
Group: Applications/Internet
License: ISC
URL: https://github.com/ripple/rippled
# curl -L -o SOURCES/rippled-release.zip https://github.com/ripple/rippled/archive/release.zip
Source0: rippled-release.zip
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: gcc-c++ scons openssl-devel protobuf-devel
Requires: protobuf openssl
%description
Rippled is the server component of the Ripple network.
%prep
%setup -n rippled-release
%build
# Assume boost is manually installed
export RIPPLED_BOOST_HOME=/usr/local/boost_1_55_0
scons -j `grep -c processor /proc/cpuinfo` build/rippled
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/%{name}
cp LICENSE %{buildroot}/usr/share/%{name}/
mkdir -p %{buildroot}/usr/bin
cp build/rippled %{buildroot}/usr/bin/rippled
mkdir -p %{buildroot}/etc/%{name}
cp doc/rippled-example.cfg %{buildroot}/etc/%{name}/rippled.cfg
mkdir -p %{buildroot}/var/lib/%{name}/db
mkdir -p %{buildroot}/var/log/%{name}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
/usr/bin/rippled
/usr/share/rippled/LICENSE
/etc/rippled/rippled-example.cfg

View File

@@ -16,6 +16,7 @@ FreeBSD = bool('FreeBSD' == platform.system())
Linux = bool('Linux' == platform.system())
Ubuntu = bool(Linux and 'Ubuntu' == platform.linux_distribution()[0])
Debian = bool(Linux and 'debian' == platform.linux_distribution()[0])
Fedora = bool(Linux and 'Fedora' == platform.linux_distribution()[0])
Archlinux = bool(Linux and ('','','') == platform.linux_distribution()) #Arch still has issues with the platform module
USING_CLANG = OSX or os.environ.get('CC', None) == 'clang'
@@ -122,7 +123,7 @@ BOOST_LIBS = [
# included the platform can be whitelisted.
# if FreeBSD or Ubuntu or Archlinux:
if not (USING_CLANG and Linux) and (FreeBSD or Ubuntu or Archlinux or Debian or OSX):
if not (USING_CLANG and Linux) and (FreeBSD or Ubuntu or Archlinux or Debian or OSX or Fedora):
# non-mt libs do link with pthreads.
env.Append(
LIBS = BOOST_LIBS