%global _hardened_build 1 Name: ebtree Version: 6.0.8 Release: 4%{?dist} Summary: Elastic binary tree library Group: System Environment/Libraries License: LGPLv2 URL: http://1wt.eu/articles/ebtree/ Source0: http://1wt.eu/tools/%{name}/%{name}-%{version}.tar.gz # Build shared libraries. Upstream is asked for this in private mail. # No mailing list nor bug tracker available Patch1: ebtree-6.0.8.build_shared_libs.patch # There is no real test, just some binaries to run. So add a script to run them Patch2: ebtree-6.0.8.add_test_script.patch BuildRequires: make BuildRequires: coreutils BuildRequires: gcc BuildRequires: util-linux # For epel5 support BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description ebtree is a binary search tree specially optimized to very frequently store, retrieve and delete discrete integer or binary data without having to deal with memory allocation. %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} License: LGPLv2 and GPLv2+ %description devel Development files for %{name} %prep %setup -q %patch1 %patch2 %build export CFLAGS="%{optflags}" export LDFLAGS="%{__global_ldflags}" # Some hardening on epel5,6 %if 0%{?rhel} == 5 || 0%{?rhel} == 6 export CFLAGS="%{optflags} -fPIC -DPIC -fPIE" export LDFLAGS="%{?__global_ldflags} -Wl,-z,relro -z,now" %endif make %{?_smp_mflags} make test head -245 ebtree.h > README %check bash tests.sh %install # For 5,6 support mkdir -p %{buildroot}%{_libdir} mkdir -p %{buildroot}%{_includedir}/%{name} install -D -p -m 0755 -t %{buildroot}%{_libdir} *.so.?.? install -D -p -m 0644 -t %{buildroot}%{_includedir}/%{name} *.h cp -P *.so %{buildroot}%{_libdir} %files %doc VERSION README %{_libdir}/*.so.* %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 %license LICENSE %else %doc LICENSE %endif %files devel %doc VERSION README examples %{_includedir}/%{name}/*.h %{_libdir}/*.so %if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 %license LICENSE %else %doc LICENSE %endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %changelog * Wed Jan 04 2017 Ingvar Hagelund 6.0.8-4 - post{un} -p ldconfig - Fixed two-digit soname in Makefile patch - added macro __global_ldflags also to epel5,6 * Wed Dec 07 2016 Ingvar Hagelund 6.0.8-3 - Patch specfile to honor CFLAGS and LDFLAGS - Add some flags for hardening on epel5,6 too * Tue Dec 06 2016 Ingvar Hagelund 6.0.8-2 - Set correct license combo for -devel subpackage - Added buildreqs - Only include LICENSE once - Run test suite - Set 0.1 as soversion - devel subpackage reuquire main package NEVRA - Call ldconfig in post and postun - Move header files to separate directory * Thu Aug 25 2016 Ingvar Hagelund 6.0.8-1 - First wrap for Fedora