Accepting request 573181 from home:dsterba:branches:Archiving

- build the static library (depency for btrfsprogs-static)

The static libraries should not be used, the btrfsprogs have a static build
enabled so the tools can be used in rescue environments out of the box. there
are also static builds for lzo, zlib.

The missing static zstd would fail btrfsprogs-static that's been disabled
temporarily.

OBS-URL: https://build.opensuse.org/request/show/573181
OBS-URL: https://build.opensuse.org/package/show/Archiving/zstd?expand=0&rev=13
This commit is contained in:
Martin Pluskal 2018-02-06 08:14:29 +00:00 committed by Git OBS Bridge
parent bba5ad2964
commit da13d5b795
2 changed files with 22 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Feb 6 00:00:00 CET 2018 - dsterba@suse.cz
- build the static library (depency for btrfsprogs-static)
-------------------------------------------------------------------
Thu Dec 21 11:02:54 UTC 2017 - idonmez@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package zstd
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -62,6 +62,18 @@ targeting real-time compression scenarios at zlib-level compression ratio.
Needed for compiling programs that link with the library.
%package -n lib%{name}-devel-static
Summary: Development files for the Zstd compression library
Group: Development/Libraries/C and C++
BuildRequires: glibc-devel-static
Requires: libz%{name}-devel = %{version}
%description -n lib%{name}-devel-static
Zstd, short for Zstandard, is a lossless compression algorithm,
targeting real-time compression scenarios at zlib-level compression ratio.
Needed for compiling programs that link with the library.
%prep
%setup -q
find -name .gitignore -delete
@ -76,7 +88,6 @@ CFLAGS="%{optflags}" make %{?_smp_mflags} -C tests test-zstd
%install
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
rm %{buildroot}/%{_libdir}/libzstd.a
%files
%defattr(-,root,root,-)
@ -107,6 +118,10 @@ rm %{buildroot}/%{_libdir}/libzstd.a
%{_libdir}/pkgconfig/libzstd.pc
%{_libdir}/libzstd.so
%files -n lib%{name}-devel-static
%defattr(-,root,root,-)
%{_libdir}/libzstd.a
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig