From c6a900745f01534b128a11b838682e46a236c0f7 Mon Sep 17 00:00:00 2001 From: Christopher Meng Date: Jan 30 2015 10:09:46 +0000 Subject: Update to 0.12.1 --- diff --git a/302.patch b/302.patch new file mode 100644 index 0000000..7bf986c --- /dev/null +++ b/302.patch @@ -0,0 +1,70 @@ +From 7b8ecb1d476fe6fc559fb897510052a547edb468 Mon Sep 17 00:00:00 2001 +From: Christopher Meng +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 "" diff --git a/hiredis.spec b/hiredis.spec index 69499ae..6bdd6be 100644 --- a/hiredis.spec +++ b/hiredis.spec @@ -1,12 +1,11 @@ Name: hiredis -Version: 0.12.0 -Release: 4%{?dist} +Version: 0.12.1 +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: 0001-Fix-Makefile-install-problems.patch +Patch0: https://github.com/redis/hiredis/pull/302.patch %description Hiredis is a minimalistic C client library for the Redis database. @@ -21,38 +20,38 @@ developing applications that use %{name}. %prep %setup -q - %patch0 -p1 %build -make %{?_smp_mflags} OPTIMIZATION="%{optflags}" LDFLAGS="%{?__global_ldflags}" +%make_build PREFIX="%{_prefix}" INSTALL_LIBRARY_PATH="%{_libdir}" \ + OPTIMIZATION="%{optflags}" LDFLAGS="%{?__global_ldflags}" %install -make install PREFIX=%{buildroot}%{_prefix} INSTALL_LIBRARY_PATH=%{buildroot}%{_libdir} +%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<%{buildroot}%{_libdir}/pkgconfig/%{name}.pc< - 0.12.1-1 +- Update to 0.12.1 + * Fri Jan 30 2015 Mamoru TASAKA - 0.12.0-4 - Again build for f22-boost diff --git a/sources b/sources index 4786c07..741874e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -64dbbca014d0c20081ecbb8271e00a2d hiredis-0.12.0.tar.gz +914e4aa8ab4a3f60d5739d2106e50502 hiredis-0.12.1.tar.gz