]> git.pld-linux.org Git - packages/hiredis.git/commitdiff
- link soname properly AC-branch auto/ac/hiredis-0_10_0-1 auto/th/hiredis-0_10_0-1
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 20 Dec 2011 14:45:03 +0000 (14:45 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    hiredis.spec -> 1.2
    link.patch -> 1.1

hiredis.spec
link.patch [new file with mode: 0644]

index 57afed0fd039fba32a9276b1bf27eed3d784f236..e73174f3d0d3528382750cb690a50ebddd7a6af5 100644 (file)
@@ -1,13 +1,13 @@
 Summary:       A minimalistic C client library for Redis
 Name:          hiredis
 Version:       0.10.0
 Summary:       A minimalistic C client library for Redis
 Name:          hiredis
 Version:       0.10.0
-Release:       0.3
+Release:       1
 License:       BSD
 Group:         Libraries
 URL:           https://github.com/antirez/hiredis
 Source0:       https://github.com/antirez/hiredis/tarball/v%{version}/%{name}-%{version}.tgz
 # Source0-md5: 66edb31cdc39c94978ddf98538259d72
 License:       BSD
 Group:         Libraries
 URL:           https://github.com/antirez/hiredis
 Source0:       https://github.com/antirez/hiredis/tarball/v%{version}/%{name}-%{version}.tgz
 # Source0-md5: 66edb31cdc39c94978ddf98538259d72
-Requires:      redis
+Patch0:                link.patch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -25,20 +25,24 @@ develop applications using a Redis database.
 %prep
 %setup -qc
 mv *-%{name}-*/* .
 %prep
 %setup -qc
 mv *-%{name}-*/* .
+%patch0 -p1
 
 %build
 %{__make} \
 
 %build
 %{__make} \
-       OPTIMIZATION="%{optflags}"
+       CC="%{__cc}" \
+       DEBUG="" \
+       LDFLAGS="-L. %{rpmldflags}" \
+       OPTIMIZATION="%{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
+       INSTALL="cp -a" \
        PREFIX=$RPM_BUILD_ROOT%{_prefix} \
        INSTALL_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
 
 install -d $RPM_BUILD_ROOT%{_bindir}
        PREFIX=$RPM_BUILD_ROOT%{_prefix} \
        INSTALL_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
 
 install -d $RPM_BUILD_ROOT%{_bindir}
-install -p hiredis-example $RPM_BUILD_ROOT%{_bindir}
-install -p cp hiredis-test    $RPM_BUILD_ROOT%{_bindir}
+install -p hiredis-example hiredis-test $RPM_BUILD_ROOT%{_bindir}
 
 find $RPM_BUILD_ROOT -name *.a | xargs rm -v
 
 
 find $RPM_BUILD_ROOT -name *.a | xargs rm -v
 
@@ -53,7 +57,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc COPYING TODO
 %attr(755,root,root) %{_bindir}/hiredis-example
 %attr(755,root,root) %{_bindir}/hiredis-test
 %doc COPYING TODO
 %attr(755,root,root) %{_bindir}/hiredis-example
 %attr(755,root,root) %{_bindir}/hiredis-test
-#%{_libdir}/libhiredis.so.0.10
+%attr(755,root,root) %{_libdir}/libhiredis.so.*.*.*
 %ghost %{_libdir}/libhiredis.so.0
 
 %files devel
 %ghost %{_libdir}/libhiredis.so.0
 
 %files devel
diff --git a/link.patch b/link.patch
new file mode 100644 (file)
index 0000000..62a1a15
--- /dev/null
@@ -0,0 +1,36 @@
+--- hiredis-0.10.0/Makefile    2011-12-20 16:34:25.025574337 +0200
++++ hiredis-0.10.0/Makefile    2011-12-20 16:38:47.294352952 +0200
+@@ -37,7 +37,9 @@
+   DYLIBSUFFIX=so
+   STLIBSUFFIX=a
+   DYLIBNAME?=$(LIBNAME).$(DYLIBSUFFIX)
+-  DYLIB_MAKE_CMD?=gcc -shared -Wl,-soname,$(DYLIBNAME) -o $(DYLIBNAME)
++  DYLIBSONAME?=$(DYLIBNAME).0
++  LINKLIBNAME?=$(subst lib,,$(LIBNAME))
++  DYLIB_MAKE_CMD?=$(CC) -shared -Wl,-soname,$(DYLIBSONAME) -o $(DYLIBNAME)
+   STLIBNAME?=$(LIBNAME).$(STLIBSUFFIX)
+   STLIB_MAKE_CMD?=ar rcs $(STLIBNAME)
+ endif
+@@ -88,8 +90,8 @@
+       $(CC) -o $@ $(CCOPT) $(DEBUG) -I$(AE_DIR) $(LDFLAGS) $(STLIBNAME) example-ae.c $(AE_DIR)/ae.o $(AE_DIR)/zmalloc.o
+ endif
+-hiredis-%: %.o $(STLIBNAME)
+-      $(CC) -o $@ $(CCOPT) $(DEBUG) $(LDFLAGS) $(STLIBNAME) $<
++hiredis-%: %.o $(DYLIBNAME)
++      $(CC) -o $@ $(CCOPT) $(DEBUG) -l$(LINKLIBNAME) $(LDFLAGS) $<
+ test: hiredis-test
+       ./hiredis-test
+@@ -106,7 +108,10 @@
+ install: $(DYLIBNAME) $(STLIBNAME)
+       mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH)
+       $(INSTALL) hiredis.h async.h adapters $(INSTALL_INCLUDE_PATH)
+-      $(INSTALL) $(DYLIBNAME) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
++      $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
++      $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIBNAME).0.0.0
++      ln -s $(DYLIBNAME).0.0.0 $(INSTALL_LIBRARY_PATH)/$(DYLIBNAME).0
++      ln -s $(DYLIBNAME).0.0.0 $(INSTALL_LIBRARY_PATH)/$(DYLIBNAME)
+ 32bit:
+       @echo ""
This page took 0.143071 seconds and 4 git commands to generate.