Update to 0.13.2

epel9
Christopher Meng 9 years ago
parent 6a7595a7b5
commit ab37f07b59

@ -1,43 +0,0 @@
From 4355ab3c8fa7ad98b8a21267f84ebbaf47e2d2f8 Mon Sep 17 00:00:00 2001
From: Sebastian Wiedenroth <wiedi@frubar.net>
Date: Fri, 23 Jan 2015 19:01:19 +0100
Subject: [PATCH] Fix Makefile install problems
Adds DESTDIR support
Fixes INSTALL_PKGCONF_PATH
Properly copies {read,shs}.h now during make install
Closes #297
---
Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index d683aec..c2cee1a 100644
--- a/Makefile
+++ b/Makefile
@@ -18,9 +18,9 @@ PREFIX?=/usr/local
INCLUDE_PATH?=include/hiredis
LIBRARY_PATH?=lib
PKGCONF_PATH?=pkgconfig
-INSTALL_INCLUDE_PATH= $(PREFIX)/$(INCLUDE_PATH)
-INSTALL_LIBRARY_PATH= $(PREFIX)/$(LIBRARY_PATH)
-INSTALL_PKGCONF_PATH= $(LIBRARY_PATH)/$(PKGCONF_PATH)
+INSTALL_INCLUDE_PATH= $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH)
+INSTALL_LIBRARY_PATH= $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH)
+INSTALL_PKGCONF_PATH= $(INSTALL_LIBRARY_PATH)/$(PKGCONF_PATH)
# redis-server configuration used for testing
REDIS_PORT=56379
@@ -162,7 +162,7 @@ $(PKGCONFNAME): $(PKGCONF_SRCNAME)
install: $(DYLIBNAME) $(STLIBNAME)
mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
- $(INSTALL) hiredis.h async.h adapters $(INSTALL_INCLUDE_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_MAJOR_NAME) $(DYLIBNAME)
--
2.1.0

@ -1,70 +0,0 @@
From 7b8ecb1d476fe6fc559fb897510052a547edb468 Mon Sep 17 00:00:00 2001
From: Christopher Meng <i@cicku.me>
Date: Fri, 30 Jan 2015 17:36:38 +0800
Subject: [PATCH] Fix make install again
For real, the commit 4355ab3c8fa7ad98b8a21267f84ebbaf47e2d2f8 messed up with RPM. I can't build 0.12.1 for Fedora.
I don't know why upstream accepted such fatal commit. And pkg-config file doesn't work as well.
Also dollar sign was not escaped. And the generated file was not good as some variables insiede pkgconfig is empty.
Anyway, I've corrected these.
---
Makefile | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/Makefile b/Makefile
index 805c2c5..19e4857 100644
--- a/Makefile
+++ b/Makefile
@@ -18,8 +18,8 @@ PREFIX?=/usr/local
INCLUDE_PATH?=include/hiredis
LIBRARY_PATH?=lib
PKGCONF_PATH?=pkgconfig
-INSTALL_INCLUDE_PATH= $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH)
-INSTALL_LIBRARY_PATH= $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH)
+INSTALL_INCLUDE_PATH= $(PREFIX)/$(INCLUDE_PATH)
+INSTALL_LIBRARY_PATH= $(PREFIX)/$(LIBRARY_PATH)
INSTALL_PKGCONF_PATH= $(INSTALL_LIBRARY_PATH)/$(PKGCONF_PATH)
# redis-server configuration used for testing
@@ -150,25 +150,25 @@ INSTALL?= cp -a
$(PKGCONFNAME): hiredis.h
@echo "Generating $@ for pkgconfig..."
@echo prefix=$(PREFIX) > $@
- @echo exec_prefix=$${prefix} >> $@
+ @echo exec_prefix=\$${prefix} >> $@
@echo libdir=$(INSTALL_LIBRARY_PATH) >> $@
@echo includedir=$(INSTALL_INCLUDE_PATH) >> $@
@echo >> $@
@echo Name: hiredis >> $@
@echo Description: Minimalistic C client library for Redis. >> $@
@echo Version: $(HIREDIS_MAJOR).$(HIREDIS_MINOR).$(HIREDIS_PATCH) >> $@
- @echo Libs: -L$${libdir} -lhiredis >> $@
- @echo Cflags: -I$${includedir} -D_FILE_OFFSET_BITS=64 >> $@
-
-install: $(DYLIBNAME) $(STLIBNAME)
- 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_MAJOR_NAME) $(DYLIBNAME)
- $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
- mkdir -p $(INSTALL_PKGCONF_PATH)
- $(INSTALL) $(PKGCONFNAME) $(INSTALL_PKGCONF_PATH)
+ @echo Libs: -L\$${libdir} -lhiredis >> $@
+ @echo Cflags: -I\$${includedir} -D_FILE_OFFSET_BITS=64 >> $@
+
+install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME)
+ mkdir -p $(DESTDIR)$(INSTALL_INCLUDE_PATH) $(DESTDIR)$(INSTALL_LIBRARY_PATH)
+ $(INSTALL) hiredis.h async.h read.h sds.h adapters $(DESTDIR)$(INSTALL_INCLUDE_PATH)
+ $(INSTALL) $(DYLIBNAME) $(DESTDIR)$(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME)
+ cd $(DESTDIR)$(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIB_MAJOR_NAME)
+ cd $(DESTDIR)$(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MAJOR_NAME) $(DYLIBNAME)
+ $(INSTALL) $(STLIBNAME) $(DESTDIR)$(INSTALL_LIBRARY_PATH)
+ mkdir -p $(DESTDIR)$(INSTALL_PKGCONF_PATH)
+ $(INSTALL) $(PKGCONFNAME) $(DESTDIR)$(INSTALL_PKGCONF_PATH)
32bit:
@echo ""

@ -1,11 +1,10 @@
Name: hiredis
Version: 0.12.1
Release: 3%{?dist}
Version: 0.13.2
Release: 1%{?dist}
Summary: Minimalistic C client library for Redis
License: BSD
URL: https://github.com/redis/hiredis
Source0: https://github.com/redis/hiredis/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: https://github.com/redis/hiredis/pull/302.patch
%description
Hiredis is a minimalistic C client library for the Redis database.
@ -20,39 +19,22 @@ developing applications that use %{name}.
%prep
%setup -q
%patch0 -p1
%build
%make_build PREFIX="%{_prefix}" INSTALL_LIBRARY_PATH="%{_libdir}" \
OPTIMIZATION="%{optflags}" LDFLAGS="%{?__global_ldflags}"
%make_build PREFIX="%{_prefix}" LIBRARY_PATH="%{_lib}" \
DEBUG="%{optflags}" LDFLAGS="%{?__global_ldflags}"
%install
%make_install PREFIX="%{_prefix}" INSTALL_LIBRARY_PATH="%{_libdir}"
# 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
%make_install PREFIX="%{_prefix}"
find %{buildroot} -name '*.a' -delete -print
# I don't believe it's stable, so keep previous schema here.
cd %{buildroot}%{_libdir} && ln -sf libhiredis.so.0.13 libhiredis.so.0
%check
# Firewall + Koji isolated environment will cause some tests fail to pass
make test || true
# TODO: Koji isolated environment may cause some tests fail to pass.
make check
%post -p /sbin/ldconfig
@ -60,8 +42,8 @@ make test || true
%files
%doc COPYING
%{_libdir}/libhiredis.so.0.12
%{_libdir}/libhiredis.so.0
%{_libdir}/libhiredis.so.0.13
%files devel
%doc CHANGELOG.md README.md
@ -70,6 +52,12 @@ make test || true
%{_libdir}/pkgconfig/hiredis.pc
%changelog
* Thu Aug 27 2015 Christopher Meng <rpm@cicku.me> - 0.13.2-1
- Update to 0.13.2
* Fri Jul 31 2015 Christopher Meng <rpm@cicku.me> - 0.13.1-1
- Update to 0.13.1
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.12.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

@ -1 +1 @@
914e4aa8ab4a3f60d5739d2106e50502 hiredis-0.12.1.tar.gz
de1cf572f172167018cc3b04c989a3b7 hiredis-0.13.2.tar.gz

Loading…
Cancel
Save