build with cmake to produce cmake style pkginfo that can be consumed
by dependent packages I'm in the preliminary phase of adding apache ORC and apache arrow. Both build with cmake only, and both need cmake style pkg info in /usr/lib*/cmake/zstd/*
This commit is contained in:
parent
e6303b59b6
commit
709d8be29e
27
zstd.spec
27
zstd.spec
|
@ -22,11 +22,10 @@ Source0: https://github.com/facebook/zstd/archive/v%{version}.tar.gz#/%{n
|
|||
|
||||
Patch1: pzstd.1.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc gtest-devel
|
||||
%if %{with pzstd}
|
||||
BuildRequires: gcc-c++
|
||||
%endif
|
||||
|
||||
%description
|
||||
Zstd, short for Zstandard, is a fast lossless compression algorithm,
|
||||
|
@ -56,15 +55,18 @@ Static variant of the Zstd library.
|
|||
%setup -q
|
||||
find -name .gitignore -delete
|
||||
%if %{with pzstd}
|
||||
%patch1 -p1
|
||||
%patch1 -p1 -b .orig
|
||||
%endif
|
||||
|
||||
%build
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
export LDFLAGS="$RPM_LD_FLAGS"
|
||||
%make_build -C lib lib-mt
|
||||
%make_build -C programs
|
||||
pushd build/cmake
|
||||
%cmake . \
|
||||
-DOVERRIDE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_COLOR_MAKEFILE:BOOL=OFF \
|
||||
"-GUnix Makefiles"
|
||||
%cmake_build
|
||||
%if %{with pzstd}
|
||||
popd
|
||||
export CXXFLAGS="$RPM_OPT_FLAGS"
|
||||
%make_build -C contrib/pzstd
|
||||
%endif
|
||||
|
@ -79,10 +81,11 @@ make -C contrib/pzstd test
|
|||
%endif
|
||||
|
||||
%install
|
||||
%make_install PREFIX=%{_prefix} LIBDIR=%{_libdir}
|
||||
pushd build/cmake && %cmake_install
|
||||
%if %{with pzstd}
|
||||
install -D -m755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
|
||||
install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
|
||||
popd
|
||||
install -D -m 0755 contrib/pzstd/pzstd %{buildroot}%{_bindir}/pzstd
|
||||
install -D -m 0644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
|
||||
%endif
|
||||
|
||||
%files
|
||||
|
@ -114,6 +117,7 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
|
|||
%{_includedir}/zstd_errors.h
|
||||
%{_libdir}/pkgconfig/libzstd.pc
|
||||
%{_libdir}/libzstd.so
|
||||
%{_libdir}/cmake/zstd/*.cmake
|
||||
|
||||
%files -n lib%{name}-static
|
||||
%{_libdir}/libzstd.a
|
||||
|
@ -121,9 +125,6 @@ install -D -m644 programs/%{name}.1 %{buildroot}%{_mandir}/man1/p%{name}.1
|
|||
%ldconfig_scriptlets -n lib%{name}
|
||||
|
||||
%changelog
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Sun May 16 2021 Pádraig Brady <P@draigBrady.com> - 1.5.0-2
|
||||
- Latest upstream
|
||||
|
||||
|
|
Loading…
Reference in New Issue