#needsrootforbuild %global debug_package %{nil} %define __os_install_post %{nil} Name: unizip Version: 0.0.3 Release: 1 Summary: unizip is a unified compression library that encapsulates zlib, snappy, lz4 and other compression algorithms into a unified interface. License: MulanPSL-2.0 URL: https://gitee.com/openeuler/unizip Source0: %{name}-v%{version}.zip Source1: lzma2200_so.7z Patch0: add-lzma-sdk-and-uadk-include-file.patch BuildRequires: gmock-devel gmp-devel cmake make dos2unix p7zip gcc-c++ libgpg-error-devel BuildRequires: zlib-devel bzip2-devel zstd-devel snappy-devel brotli-devel lz4-devel xz-devel Requires: zlib bzip2 zstd snappy brotli lz4 %ifarch aarch64 BuildRequires: libwd %endif %description %{summary} %package devel Summary: Development files for %{name} Requires: %{name} = %{version}-%{release} %description devel This package contains the header files and libraries for developing with %{name}. %prep %setup -q -c -T -n %{name}-%{version} -a 0 %patch0 -p1 -d %{name}-v%{version} %setup -q -c -T -n lzma2200 -a 1 %build pushd %{_builddir}/lzma2200/lzma-sdk/C/Util/Lzma make -f makefile.gcc clean make -f makefile.gcc all popd pushd %{_builddir}/%{name}-%{version}/%{name}-v%{version} %cmake -DCMAKE_SKIP_RPATH:BOOL=ON -B build -DLIB7LZMA_LIBRARY=%{_builddir}/lzma2200/lzma-sdk/C/Util/Lzma/_o/lib7lzma.so make VERBOSE=1 -C build popd %install pushd %{_builddir}/%{name}-%{version}/%{name}-v%{version} %make_install -C build install -m555 %{_builddir}/lzma2200/lzma-sdk/C/Util/Lzma/_o/lib7lzma.so %{buildroot}/%{_libdir}/ popd %check pushd %{_builddir}/%{name}-%{version}/%{name}-v%{version}/build/ #ctest popd %files %{_libdir}/lib7lzma.so %{_libdir}/libunizip.so %{_libdir}/pkgconfig/unizip.pc %files devel %{_includedir}/*.h %{_libdir}/*.a %changelog * Tue Mar 28 2023 huangduirong - 0.0.3-1 - Package init