- updated to 1.0.0 (note: new soname)
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 5 Sep 2020 14:03:04 +0000 (16:03 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 5 Sep 2020 14:03:04 +0000 (16:03 +0200)
- updated link patch; switched to upstream soname
- package ssl library

hiredis.spec
link.patch

index 35b78949cbc072fe4229eb8526fe61b51198ba1b..c29050d1cc6d261de18185c7769ea8b0fc50ae76 100644 (file)
@@ -1,15 +1,20 @@
+#
+# Conditional build:
+%bcond_without ssl     # SSL library
+
 Summary:       A minimalistic C client library for Redis
 Summary(pl.UTF-8):     Minimalistyczna biblioteka C klienta Redisa
 Name:          hiredis
-Version:       0.14.1
+Version:       1.0.0
 Release:       1
 License:       BSD
 Group:         Libraries
 #Source0Download: https://github.com/redis/hiredis/releases
 Source0:       https://github.com/redis/hiredis/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 3e1c541f9df28becb82a611e63e3e939
+# Source0-md5: 209ae570cdee65a5143ea6db8ac07fe3
 Patch0:                link.patch
 URL:           https://github.com/redis/hiredis/
+%{?with_ssl:BuildRequires:     openssl-devel}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -44,6 +49,44 @@ Static hiredis library.
 %description static -l pl.UTF-8
 Statyczna biblioteka hiredis.
 
+%package ssl
+Summary:       SSL support library for hiredis
+Summary(pl.UTF-8):     Biblioteka opsługi SSL dla biblioteki hiredis
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description ssl
+SSL support library for hiredis.
+
+%description ssl -l pl.UTF-8
+Biblioteka opsługi SSL dla biblioteki hiredis.
+
+%package ssl-devel
+Summary:       Header file for hiredis SSL library
+Summary(pl.UTF-8):     Plik nagłówkowy biblioteki hiredis SSL
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+Requires:      %{name}-ssl = %{version}-%{release}
+Requires:      openssl-devel
+
+%description ssl-devel
+Header file for hiredis SSL library.
+
+%description ssl-devel -l pl.UTF-8
+Plik nagłówkowy biblioteki hiredis SSL.
+
+%package ssl-static
+Summary:       Static hiredis SSL library
+Summary(pl.UTF-8):     Statyczna biblioteka hiredis SSL
+Group:         Development/Libraries
+Requires:      %{name}-ssl-devel = %{version}-%{release}
+
+%description ssl-static
+Static hiredis SSL library.
+
+%description ssl-static -l pl.UTF-8
+Statyczna biblioteka hiredis SSL.
+
 %prep
 %setup -q
 %patch0 -p1
@@ -55,15 +98,17 @@ Statyczna biblioteka hiredis.
        LDFLAGS="%{rpmldflags}" \
        OPTIMIZATION="%{rpmcflags} %{rpmcppflags}" \
        PREFIX=%{_prefix} \
-       LIBRARY_PATH=%{_lib}
+       LIBRARY_PATH=%{_lib} \
+       %{?with_ssl:USE_SSL=1}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
-       INSTALL="cp -a" \
+       INSTALL="cp -p" \
        DESTDIR=$RPM_BUILD_ROOT \
        PREFIX=%{_prefix} \
-       LIBRARY_PATH=%{_lib}
+       LIBRARY_PATH=%{_lib} \
+       %{?with_ssl:USE_SSL=1}
 
 install -d $RPM_BUILD_ROOT%{_bindir}
 install -p hiredis-test $RPM_BUILD_ROOT%{_bindir}
@@ -78,15 +123,36 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc CHANGELOG.md COPYING README.md
 %attr(755,root,root) %{_bindir}/hiredis-test
-%attr(755,root,root) %{_libdir}/libhiredis.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/libhiredis.so.0
+%attr(755,root,root) %{_libdir}/libhiredis.so.1.0.0
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libhiredis.so
-%{_includedir}/hiredis
+%dir %{_includedir}/hiredis
+%{_includedir}/hiredis/adapters
+%{_includedir}/hiredis/alloc.h
+%{_includedir}/hiredis/async.h
+%{_includedir}/hiredis/hiredis.h
+%{_includedir}/hiredis/read.h
+%{_includedir}/hiredis/sds.h
 %{_pkgconfigdir}/hiredis.pc
 
 %files static
 %defattr(644,root,root,755)
 %{_libdir}/libhiredis.a
+
+%if %{with ssl}
+%files ssl
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libhiredis_ssl.so.1.0.0
+
+%files ssl-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libhiredis_ssl.so
+%{_includedir}/hiredis/hiredis_ssl.h
+%{_pkgconfigdir}/hiredis_ssl.pc
+
+%files ssl-static
+%defattr(644,root,root,755)
+%{_libdir}/libhiredis_ssl.a
+%endif
index 807a98402bb97bee82253076e473a333976510bb..2c76ac31e23743c9e93857f1ac8b2ec9d263cb24 100644 (file)
@@ -1,30 +1,23 @@
---- hiredis-0.13.3/Makefile.orig       2015-09-16 12:25:02.000000000 +0200
-+++ hiredis-0.13.3/Makefile    2016-11-08 16:37:58.943150777 +0100
-@@ -49,7 +49,7 @@
- DYLIB_MINOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_SONAME)
- DYLIB_MAJOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_MAJOR)
- DYLIBNAME=$(LIBNAME).$(DYLIBSUFFIX)
--DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS)
-+DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(DYLIB_MAJOR_NAME) -o $(DYLIBNAME) $(LDFLAGS)
- STLIBNAME=$(LIBNAME).$(STLIBSUFFIX)
- STLIB_MAKE_CMD=ar rcs $(STLIBNAME)
+--- hiredis-1.0.0/Makefile.orig        2020-08-03 20:18:07.000000000 +0200
++++ hiredis-1.0.0/Makefile     2020-09-05 09:50:31.097913070 +0200
+@@ -127,7 +127,7 @@
+       $(STLIB_MAKE_CMD) $(STLIBNAME) $(OBJ)
  
-@@ -140,8 +140,8 @@
+ $(SSL_DYLIBNAME): $(SSL_OBJ)
+-      $(SSL_DYLIB_MAKE_CMD) $(DYLIB_PLUGIN) -o $(SSL_DYLIBNAME) $(SSL_OBJ) $(REAL_LDFLAGS) $(LDFLAGS) $(SSL_LDFLAGS)
++      $(SSL_DYLIB_MAKE_CMD) $(DYLIB_PLUGIN) -o $(SSL_DYLIBNAME) $(SSL_OBJ) $(DYLIBNAME) $(REAL_LDFLAGS) $(LDFLAGS) $(SSL_LDFLAGS)
  
- hiredis-test: test.o $(STLIBNAME)
+ $(SSL_STLIBNAME): $(SSL_OBJ)
+       $(STLIB_MAKE_CMD) $(SSL_STLIBNAME) $(SSL_OBJ)
+@@ -201,9 +201,9 @@
  
--hiredis-%: %.o $(STLIBNAME)
--      $(CC) $(REAL_CFLAGS) -o $@ $(REAL_LDFLAGS) $< $(STLIBNAME)
-+hiredis-%: %.o $(DYLIBNAME)
-+      $(CC) $(REAL_CFLAGS) -o $@ $(REAL_LDFLAGS) $< -L. -l$(subst lib,,$(LIBNAME))
+ examples: $(EXAMPLES)
+-TEST_LIBS = $(STLIBNAME)
++TEST_LIBS = $(DYLIBNAME)
+ ifeq ($(USE_SSL),1)
+-    TEST_LIBS += $(SSL_STLIBNAME)
++    TEST_LIBS += $(SSL_DYLIBNAME)
+     TEST_LDFLAGS = $(SSL_LDFLAGS) -lssl -lcrypto -lpthread
+ endif
  
- test: hiredis-test
-       ./hiredis-test
-@@ -184,6 +184,7 @@
-       mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
-       $(INSTALL) hiredis.h async.h read.h sds.h adapters $(INSTALL_INCLUDE_PATH)
-       $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME)
-+      cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIB_MAJOR_NAME)
-       cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIBNAME)
-       $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
-       mkdir -p $(INSTALL_PKGCONF_PATH)
This page took 0.07833 seconds and 4 git commands to generate.