Wednesday, July 29, 2015

Building a distcache RPM

Required for building the httpd RPM if you need the mod_socache_dc RPM.
Download distcache-1.5.1.tar.bz2 from http://sourceforge.net/projects/distcache/files
Save in /root/rpmbuild/SOURCES, where /root/rpmbuild is the value returned by:
# rpm --eval '%{_topdir}'
Save the text after the dotted line in /root/rpmbuild/SPECS/distcache.spec
# cd /root/rpmbuild/SPECS
# rpmbuild -ba distcache.spec
This will create /root/rpmbuild/RPMS/x86_64/distcache-devel-1.5.1-1.x86_64.rpm
# rpm -ivh /root/rpmbuild/RPMS/x86_64/distcache-devel-1.5.1-1.x86_64.rpm


================== distcache.spec =============
Name:           distcache-devel
Version:        1.5.1
Release:        1
Summary:        Distributed session caching

Group:          Development/Libraries
License:        GNU Library or Lesser General Public License version 2.0 (LGPLv2)
URL:            http://sourceforge.net/projects/distcache/
Source0:        distcache-%{version}.tar.bz2
BuildRoot:      %{_builddir}/distcache-%{version}-root

%description
Distributed session caching tools and APIs, primarily for SSL/TLS servers though perhaps useful for other (non-SSL/TLS) circumstances. Also includes a self-contained network abstraction library (libnal), and the sslswamp SSL/TLS benchmark/test utility.

%prep
%setup -q -n distcache-%{version}
# Update proto_fd.c to avoid the LONG_MIN undeclared error. Just one line, so we don't need a patch file.
# rpmbuild untars source and cd's in the directory, so we use a relative path for proto_fd.c
sed -i.bak '29 i\#include <limits.h>' libnal/proto_fd.c
%build
./configure CFLAGS="-fPIC"
make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(755,root,root,-)
/usr/local/bin/dc_client
/usr/local/bin/dc_server
/usr/local/bin/dc_snoop
/usr/local/bin/dc_test
/usr/local/bin/nal_echo
/usr/local/bin/nal_hose
/usr/local/bin/nal_ping
/usr/local/bin/nal_pong
/usr/local/bin/nal_proxy
/usr/local/bin/nal_test
/usr/local/bin/piper
/usr/local/bin/sslswamp
/usr/local/lib/libdistcache.la
/usr/local/lib/libdistcacheserver.la
/usr/local/lib/libnal.la
/usr/local/lib/libnalssl.la
%defattr(644,root,root,-)
/usr/local/include/distcache/dc_client.h
/usr/local/include/distcache/dc_plug.h
/usr/local/include/distcache/dc_server.h
/usr/local/include/libnal/nal_devel.h
/usr/local/include/libnal/nal.h
/usr/local/include/libnal/nal_ssl.h
/usr/local/lib/libdistcache.a
/usr/local/lib/libdistcacheserver.a
/usr/local/lib/libnal.a
/usr/local/lib/libnalssl.a
/usr/local/man/man1/dc_client.1
/usr/local/man/man1/dc_server.1
/usr/local/man/man1/dc_snoop.1
/usr/local/man/man1/dc_test.1
/usr/local/man/man1/sslswamp.1
/usr/local/man/man2/DC_CTX_new.2
/usr/local/man/man2/DC_PLUG_new.2
/usr/local/man/man2/DC_PLUG_read.2
/usr/local/man/man2/DC_SERVER_new.2
/usr/local/man/man2/NAL_ADDRESS_new.2
/usr/local/man/man2/NAL_BUFFER_new.2
/usr/local/man/man2/NAL_CONNECTION_new.2
/usr/local/man/man2/NAL_decode_uint32.2
/usr/local/man/man2/NAL_LISTENER_new.2
/usr/local/man/man2/NAL_SELECTOR_new.2
/usr/local/man/man8/distcache.8
/usr/local/share/swamp/A-client.pem
/usr/local/share/swamp/CA.pem
%doc

%changelog

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home