diff --git a/blosc-1.14.4.tar.gz b/blosc-1.14.4.tar.gz new file mode 100644 index 0000000..29d25c3 Binary files /dev/null and b/blosc-1.14.4.tar.gz differ diff --git a/blosc.spec b/blosc.spec new file mode 100644 index 0000000..fe9e063 --- /dev/null +++ b/blosc.spec @@ -0,0 +1,89 @@ +Name: blosc +Version: 1.14.4 +Release: 2 +Summary: Binary compressor +License: MIT +URL: https://github.com/Blosc/c-blosc +Source: https://github.com/Blosc/c-blosc/archive/v%{version}/blosc-%{version}.tar.gz + +BuildRequires: cmake lz4-devel snappy-devel zlib-devel libzstd-devel + +%description +Blosc is a compression library that is faster than traditional compression. + +%package devel +Summary: Header files and libraries for Blosc development +Requires: %{name} = %{version}-%{release} + +%description devel +The blosc-devel package contains the header files and libraries needed +to develop programs that use the blosc meta-compressor. + +%package bench +Summary: Benchmark for the Blosc compressor +Requires: %{name} = %{version}-%{release} +Requires: python3-matplotlib + +%description bench +The blosc-bench package contains a benchmark suite which evaluates +the performance of Blosc, and compares it with memcpy. + +%prep +%autosetup -n c-%{name}-%{version} -p1 + +rm -r internal-complibs/snappy* internal-complibs/zlib* +sed -i '1i set\(CMAKE_SKIP_RPATH true\)' bench/CMakeLists.txt +sed -i '1i set\(CMAKE_POSITION_INDEPENDENT_CODE TRUE\)' CMakeLists.txt +sed -i 's|lib/pkgconfig|%{_lib}/pkgconfig|' CMakeLists.txt +sed -i '1i #!/usr/bin/python3' bench/plot-speeds.py + +%build +%cmake \ +%ifarch x86_64 + %{?_cmake_lib_suffix64} \ +%endif + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_BUILD_TYPE:STRING="Debug" \ + -DCMAKE_C_FLAGS:STRING="%{optflags}" \ + -DPREFER_EXTERNAL_LZ4:BOOL=ON \ + -DPREFER_EXTERNAL_ZLIB:BOOL=ON \ + -DPREFER_EXTERNAL_ZSTD:BOOL=ON \ + -DPREFER_EXTERNAL_SNAPPY:BOOL=ON \ + -DTEST_INCLUDE_BENCH_SUITE:BOOL=OFF \ + -DBUILD_STATIC:BOOL=OFF \ + + . +%make_build + +%check +LD_LIBRARY_PATH=%{buildroot}%{_libdir} make test VERBOSE=1 + +%install +%make_install + +install -p bench/plot-speeds.py* -Dt %{buildroot}/%{_pkgdocdir}/bench/ +install -pm 0644 bench/*.c %{buildroot}/%{_pkgdocdir}/bench + +install -p bench/bench -D %{buildroot}/%{_bindir}/%{name}-bench +install -p bench/plot-speeds.py %{buildroot}/%{_bindir}/%{name}-plot-times + +%files +%exclude %{_pkgdocdir}/bench/ +%license LICENSES/* +%{_libdir}/libblosc.so.1* +%doc README.md ANNOUNCE.rst RELEASE_NOTES.rst README_HEADER.rst README_THREADED.rst + +%files devel +%{_libdir}/libblosc.so +%{_libdir}/pkgconfig/blosc.pc +%{_includedir}/blosc.h +%{_includedir}/blosc-export.h + +%files bench +%{_pkgdocdir}/bench/*.c +%{_bindir}/%{name}-bench +%{_bindir}/%{name}-plot-times + +%changelog +* Thu Nov 14 2019 wangye - 1.14.4-2 +- Package init \ No newline at end of file