revert cmake change,
because we do not want to add it into Ring0 / Bootstrap. OBS-URL: https://build.opensuse.org/package/show/Archiving/zstd?expand=0&rev=87
This commit is contained in:
parent
4172bf1c18
commit
596f53d820
@ -1,9 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 16 12:03:54 UTC 2023 - Hillwood Yang <hillwood@opensuse.org>
|
||||
|
||||
- Build it by cmake
|
||||
- Add missing cmake profiles
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 13 11:15:39 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
37
zstd.spec
37
zstd.spec
@ -29,7 +29,6 @@ Source1: https://github.com/facebook/zstd/releases/download/v%{version}/%
|
||||
Source2: zstd.keyring
|
||||
Source99: baselibs.conf
|
||||
Patch1: pzstd.1.patch
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc
|
||||
# C++ is needed for pzstd only
|
||||
BuildRequires: gcc-c++
|
||||
@ -103,37 +102,30 @@ an optimized deflate/zlib handling.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
sed -i '/build static library to build tests/d' build/cmake/CMakeLists.txt
|
||||
sed -i 's/libzstd_static/libzstd_shared/g' build/cmake/tests/CMakeLists.txt
|
||||
|
||||
%build
|
||||
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
||||
export CFLAGS="%{optflags}"
|
||||
export CXXFLAGS="%{optflags} -std=c++11"
|
||||
cd build/cmake
|
||||
%cmake \
|
||||
-DCMAKE_BUILD_TYPE=None \
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
-DZSTD_ZLIB_SUPPORT=ON \
|
||||
-DZSTD_LZMA_SUPPORT=OFF \
|
||||
-DZSTD_LZ4_SUPPORT=OFF \
|
||||
-DZSTD_BUILD_CONTRIB=ON \
|
||||
-DZSTD_BUILD_STATIC=ON \
|
||||
-DZSTD_BUILD_TESTS=ON \
|
||||
-DZSTD_PROGRAMS_LINK_SHARED=ON
|
||||
%cmake_build
|
||||
# lib-mt is alias for multi-threaded library support
|
||||
%make_build HAVE_ZLIB=1 prefix=%{_prefix} libdir=%{_libdir} -C lib lib-mt
|
||||
for dir in programs contrib/pzstd; do
|
||||
%make_build -C "$dir"
|
||||
done
|
||||
|
||||
%check
|
||||
export CFLAGS="%{optflags}"
|
||||
export CXXFLAGS="%{optflags} -std=c++11"
|
||||
%make_build -C tests test-zstd
|
||||
#make_build -C contrib/pzstd test-pzstd
|
||||
|
||||
%install
|
||||
cd build/cmake
|
||||
%cmake_install
|
||||
ln -sf %{_bindir}/zstd %{buildroot}%{_bindir}/gzip
|
||||
ln -sf %{_bindir}/zstd %{buildroot}%{_bindir}/gunzip
|
||||
ln -sf %{_bindir}/zstdcat %{buildroot}%{_bindir}/zcat
|
||||
%make_install V=1 VERBOSE=1 prefix=%{_prefix} libdir=%{_libdir}
|
||||
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
|
||||
install -D -m644 programs/zstd.1 %{buildroot}%{_mandir}/man1/pzstd.1
|
||||
ln -s zstd %{buildroot}/%{_bindir}/gzip
|
||||
ln -s zstd %{buildroot}/%{_bindir}/gunzip
|
||||
ln -s zstdcat %{buildroot}/%{_bindir}/zcat
|
||||
|
||||
%post -n %{libname} -p /sbin/ldconfig
|
||||
%postun -n %{libname} -p /sbin/ldconfig
|
||||
@ -141,8 +133,6 @@ ln -sf %{_bindir}/zstdcat %{buildroot}%{_bindir}/zcat
|
||||
%files
|
||||
%license COPYING LICENSE
|
||||
%doc README.md CHANGELOG
|
||||
%dir %{_datadir}/doc/%{name}
|
||||
%{_datadir}/doc/%{name}/%{name}_manual.html
|
||||
%{_bindir}/pzstd
|
||||
%{_bindir}/unzstd
|
||||
%{_bindir}/zstd
|
||||
@ -154,14 +144,13 @@ ln -sf %{_bindir}/zstdcat %{buildroot}%{_bindir}/zcat
|
||||
|
||||
%files -n %{libname}
|
||||
%license COPYING LICENSE
|
||||
%{_libdir}/libzstd.so.*
|
||||
%{_libdir}/libzstd.so.1*
|
||||
|
||||
%files -n lib%{name}-devel
|
||||
%license COPYING LICENSE
|
||||
%{_includedir}/*.h
|
||||
%{_libdir}/pkgconfig/libzstd.pc
|
||||
%{_libdir}/libzstd.so
|
||||
%{_libdir}/cmake/%{name}
|
||||
|
||||
%files -n lib%{name}-devel-static
|
||||
%{_libdir}/libzstd.a
|
||||
|
Loading…
Reference in New Issue
Block a user