Name: xxHash Version: r42 Release: 1%{?dist} Summary: Extremely fast non-cryptographic hash algorithm License: GPLv2+ URL: https://github.com/Cyan4973/xxHash Source0: https://github.com/Cyan4973/xxHash/archive/r42.tar.gz BuildRequires: cmake %description xxHash is an Extremely fast Hash algorithm, running at RAM speed limits. It successfully completes the SMHasher test suite which evaluates collision, dispersion and randomness qualities of hash functions. %package -n libxxhash License: BSD Summary: %{name} Shared Libraries %description -n libxxhash This package contains %{name} Shared Libraries %package -n libxxhash-devel License: BSD Summary: Development files for libxxhash Requires: libxxhash%{?_isa} = %{version}-%{release} %description -n libxxhash-devel The libxxhash-devel package contains libraries and header files for developing applications that use libxxhash %prep %setup -q -n xxHash-%{version} # Use ${LIB_INSTALL_DIR} instead of hardcoded lib in cmake file sed -i 's|DESTINATION lib|DESTINATION ${LIB_INSTALL_DIR}|' cmake_unofficial/CMakeLists.txt %build CFLAGS="${CFLAGS:-%optflags}" #CPPFLAGS="CPPFLAGS" export CFLAGS ( cd cmake_unofficial %{__cmake} -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir} ) # Build libxxhash make %{?_smp_mflags} -C cmake_unofficial # Build xxhsum make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} -C cmake_unofficial find %{buildroot} -name '*.a' -delete find %{buildroot} -name '*.la' -delete mkdir -p %{buildroot}%{_bindir} install -pm 755 xxhsum %{buildroot}%{_bindir}/ ( cd %{buildroot}%{_bindir} ln -sf xxhsum xxhash ln -sf xxhsum xxh32sum ln -sf xxhsum xxh64sum ) %post -n libxxhash -p /sbin/ldconfig %postun -n libxxhash -p /sbin/ldconfig %files %{_bindir}/* %doc README.md %files -n libxxhash %{_libdir}/libxxhash.so.* %license LICENSE %files -n libxxhash-devel %{_includedir}/xxhash.h %{_libdir}/libxxhash.so %license LICENSE %changelog * Tue Jul 21 2015 gil cattaneo r42-1 - initial rpm