ripple/rippled — pull request #312 by lukecyca (2014-03-21 00:12:19+00:00)
Title: RPM Spec file

Here is a spec file that can be used to build an RPM on Fedora 20. With a little refinement in SConstruct, it could be used to build RPMs for all the Redhat variants. The major difficulty with other variants is that dependencies such as g++, boost, and protobuf are either not packaged, or not recent enough for rippled.

Unfortunately the version is hardcoded. There are ways to pick it up from the git repo, but it requires custom macros or additional tools to preprocess the specfile. It’s not worth it IMO.

For reference, here are commands to build the RPM, starting from a clean Fedora 20 install...
```bash
# Install development toolchain
yum groupinstall "Development Tools"
yum install gcc-c++

# Install boost
wget http://softlayer-ams.dl.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2
tar --bzip2 -xf boost_1_55_0.tar.bz2
cd boost_1_55_0
./bootstrap.sh
./b2 threading=multi -j5
./b2 install

# Create rpmbuild environment
adduser rpmbuild
yum install rpmdevtools
su - rpmbuild
rpmdev-setuptree
cd rpmbuild/

# Place SPEC in rpmbuild tree, and install sources/deps
vi SPEC/rippled.spec
yum install scons openssl-devel protobuf-devel
curl -L -o SOURCES/rippled-release.zip https://github.com/ripple/rippled/archive/release.zip

# Build the RPM
rpmbuild -ba SPECS/rippled.spec
```