Created
December 27, 2021 09:14
-
-
Save Riccardo-78/9ec4648d03d1f0fbfbeb767929670c74 to your computer and use it in GitHub Desktop.
hiredis-cluster spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: hiredis-cluster | |
Version: 0.7.0 | |
Release: 1%{?dist} | |
Summary: C client library for Redis Cluster | |
License: BSD | |
URL: https://github.com/Nordix/hiredis-cluster | |
Source0: https://github.com/Nordix/hiredis-cluster/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz | |
Requires: hiredis | |
%description | |
Hiredis-cluster is a minimalistic C client library for the Redis database with cluster support. | |
%package devel | |
Summary: Development files for %{name} | |
Requires: %{name}%{?_isa} = %{version}-%{release} | |
%description devel | |
This package contains libraries and header files for | |
developing applications that use %{name}. | |
%prep | |
%setup -q | |
%build | |
make %{?_smp_mflags} PREFIX="%{_prefix}" INSTALL_LIBRARY_PATH="%{_libdir}" \ | |
OPTIMIZATION="%{optflags}" LDFLAGS="%{?__global_ldflags}" | |
%install | |
make install DESTDIR=%{buildroot} PREFIX="%{_prefix}" LIBRARY_PATH="lib64" | |
# Generate pkgconfig file manually. It's already mentioned in the upstream | |
# makefile but make install doesn't do and modification needed for %%_libdir. | |
#mkdir -p %{buildroot}%{_libdir}/pkgconfig/ | |
#cat >%{buildroot}%{_libdir}/pkgconfig/%{name}.pc<<EOF | |
#%{name} pkg-config source file | |
# | |
#prefix=%{_prefix} | |
#exec_prefix=%{_prefix} | |
#libdir=%{_libdir} | |
#includedir=%{_includedir} | |
# | |
#Name: %{name} | |
#Description: Minimalistic C client library for the Redis database | |
#Version: %{version} | |
#Libs: -L\${libdir} -lhiredis | |
#Cflags: -I\${includedir} -D_FILE_OFFSET_BITS=64 | |
#EOF | |
find %{buildroot} -name '*.a' -delete -print | |
%check | |
ls -la %{buildroot}/usr/lib64/pkgconfig | grep hiredis | |
%post -p /sbin/ldconfig | |
%postun -p /sbin/ldconfig | |
%files | |
%doc COPYING | |
%{_libdir}/libhiredis_cluster.so.0.7 | |
%{_libdir}/libhiredis_cluster.so | |
%files devel | |
%doc CHANGELOG.md README.md | |
%{_includedir}/hiredis_cluster/ | |
%{_libdir}/libhiredis_cluster.so | |
%{_libdir}/pkgconfig/hiredis_cluster.pc | |
%changelog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment