%define __cmake_in_source_build 1 # Do not build with zstd for RHEL < 8 %if (0%{?rhel} && 0%{?rhel} < 8) || (0%{?suse_version} && 0%{?suse_version} < 1500) %bcond_with zstd %else %bcond_without zstd %endif Name: drpm Version: 0.5.0 Release: 20210713010759.5.g279bc5c%{?dist} Summary: A library for making, reading and applying deltarpm packages # the entire source code is LGPLv2+, except src/drpm_diff.c and src/drpm_search.c which are BSD License: LGPLv2+ and BSD URL: https://github.com/rpm-software-management/%{name} Source: drpm-0.5.0-20210713010759.5.g279bc5c.tar.xz BuildRequires: cmake >= 2.8.5 BuildRequires: gcc BuildRequires: rpm-devel BuildRequires: openssl-devel BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: xz-devel %if 0%{?suse_version} BuildRequires: lzlib-devel %endif %if %{with zstd} BuildRequires: pkgconfig(libzstd) %endif BuildRequires: pkgconfig BuildRequires: doxygen BuildRequires: libcmocka-devel >= 1.0 %ifarch %{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64 BuildRequires: valgrind %endif %description The drpm package provides a library for making, reading and applying deltarpms, compatible with the original deltarpm packages. %package devel Summary: C interface for the drpm library Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The drpm-devel package provides a C interface (drpm.h) for the drpm library. %prep %autosetup -n drpm-0.5.0-20210713010759.5.g279bc5c mkdir build %build pushd build %cmake .. -DWITH_ZSTD:BOOL=%{?with_zstd:ON}%{!?with_zstd:OFF} -DHAVE_LZLIB_DEVEL:BOOL=%{?suse_version:ON}%{!?suse_version:OFF} %make_build make doc popd %install pushd build %make_install popd %check pushd build ctest -VV popd %if (0%{?rhel} && 0%{?rhel} < 8) || 0%{?suse_version} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %endif %files %{_libdir}/lib%{name}.so.* %license COPYING LICENSE.BSD %files devel %doc build/doc/html/ %{_libdir}/lib%{name}.so %{_includedir}/%{name}.h %{_libdir}/pkgconfig/%{name}.pc %changelog * Tue Jun 22 2021 rpm-gitoverlay - 0.5.0-20210713010759.5.g279bc5c - [279bc5c] Merge pull request #10 from kontura/parse_cpio_sigsev (Lukáš Hrázký) - [fcfe2b5] Fix SIGSEGV when an errors occurs in `rpm_get_file_info` (RhBug:1968594) (Aleš Matěj) - [6f82bd6] Merge pull request #9 from lukash/cmake-spec-fix (Nicola Sella) - [6dbb391] spec: Fix building with new cmake macros (Lukáš Hrázký) - [fc6ba96] Use instead of . (Peter Pentchev)