diff --git a/.gitignore b/.gitignore index e69de29..60d73e2 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/fstrm-*.tar.gz diff --git a/fstrm.spec b/fstrm.spec new file mode 100644 index 0000000..1cd683e --- /dev/null +++ b/fstrm.spec @@ -0,0 +1,87 @@ +%global _hardened_build 1 +%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} + +Name: fstrm +Summary: Frame Streams implementation in C +Version: 0.2.0 +Release: 1%{?dist} +License: ASL 2.0 +URL: https://github.com/farsightsec/fstrm +Source0: https://github.com/farsightsec/fstrm/releases/download/v%{version}/fstrm-%{version}.tar.gz +BuildRequires: autoconf automake libtool + +%description +Frame Streams is a light weight, binary clean protocol that allows for the +transport of arbitrarily encoded data payload sequences with minimal framing +overhead -- just four bytes per data frame. Frame Streams does not specify +an encoding format for data frames and can be used with any data serialization +format that produces byte sequences, such as Protocol Buffers, XML, JSON, +MessagePack, YAML, etc. + +%package devel +Summary: Development Files for fstrm library +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +The fstrm-devel package contains header files required to build an application +using fstrm library. + +%package doc +Summary: API documentation for fstrm library +BuildArch: noarch +BuildRequires: doxygen +BuildRequires: libevent-devel +Requires: %{name} = %{version}-%{release} + +%description doc +The fstrm-doc package contains Doxygen generated API documentation for +fstrm library. + +%prep +%setup -q +# regenerated build scripts to: +# - remove RPATHs +# - allow dynamic linking and execution of 'make check' +autoreconf -fi + +%build +%configure --disable-static +make %{?_smp_mflags} +make html + +%install +# install the library +make install DESTDIR=%{buildroot} +rm %{buildroot}%{_libdir}/libfstrm.la + +# install documentation +mkdir -p %{buildroot}%{_pkgdocdir}/ +cp -ar html %{buildroot}%{_pkgdocdir}/html + +%check +make check + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%doc COPYRIGHT LICENSE +%exclude %{_pkgdocdir}/html +%{_libdir}/libfstrm.so.* + +%files devel +%doc README.md +%{_bindir}/fstrm_capture +%{_bindir}/fstrm_dump +%{_includedir}/fstrm.h +%{_includedir}/fstrm/ +%{_libdir}/pkgconfig/libfstrm.pc +%{_libdir}/libfstrm.so + +%files doc +%doc %{_pkgdocdir}/html + +%changelog +* Mon Dec 15 2014 Jan Vcelak 0.2.0-1 +- initial package diff --git a/sources b/sources index e69de29..097cdf4 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +63520f76b982e2fcf0084b39fa673525 fstrm-0.2.0.tar.gz