diff --git a/0001-build-do-not-assume-that-INSTALL-is-cp.patch b/0001-build-do-not-assume-that-INSTALL-is-cp.patch new file mode 100644 index 0000000..a15941c --- /dev/null +++ b/0001-build-do-not-assume-that-INSTALL-is-cp.patch @@ -0,0 +1,39 @@ +From 725a96aaa247cae90f46753ca85dadbf22a64e5f Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Mon, 30 Oct 2017 10:19:47 +0100 +Subject: [PATCH] build: do not assume that INSTALL is cp +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +INSTALL is supposed to be `install` in most of the cases which +doesn't work with directories, but works perfectly with files. + +Don't do this assumption. + +Reported-by: Jiří Vymazal +References: https://bugzilla.redhat.com/show_bug.cgi?id=1506251 +Signed-off-by: Igor Gnatenko +--- + Makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 781a41d..c6eb229 100644 +--- a/Makefile ++++ b/Makefile +@@ -181,8 +181,9 @@ $(PKGCONFNAME): hiredis.h + @echo Cflags: -I\$${includedir} -D_FILE_OFFSET_BITS=64 >> $@ + + install: $(DYLIBNAME) $(STLIBNAME) $(PKGCONFNAME) +- mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH) +- $(INSTALL) hiredis.h async.h read.h sds.h adapters $(INSTALL_INCLUDE_PATH) ++ mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_INCLUDE_PATH)/adapters $(INSTALL_LIBRARY_PATH) ++ $(INSTALL) hiredis.h async.h read.h sds.h $(INSTALL_INCLUDE_PATH) ++ $(INSTALL) adapters/*.h $(INSTALL_INCLUDE_PATH)/adapters + $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME) + cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) $(DYLIBNAME) + $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH) +-- +2.14.3 + diff --git a/README.en.md b/README.en.md deleted file mode 100644 index ed2be5b..0000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# hiredis - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index 04ede9c..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# hiredis - -#### 介绍 -{**以下是码云平台说明,您可以替换此简介** -码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 码云特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/hiredis-0.13.3.tar.gz b/hiredis-0.13.3.tar.gz new file mode 100644 index 0000000..d0270cf Binary files /dev/null and b/hiredis-0.13.3.tar.gz differ diff --git a/hiredis.spec b/hiredis.spec new file mode 100644 index 0000000..ca6b49f --- /dev/null +++ b/hiredis.spec @@ -0,0 +1,64 @@ +Name: hiredis +Version: 0.13.3 +Release: 10 +Summary: A minimalistic C client library for the Redis database +License: BSD +URL: https://github.com/redis/hiredis +Source0: https://github.com/redis/hiredis/archive/v0.13.3.tar.gz#/hiredis-0.13.3.tar.gz +BuildRequires: gcc redis + +Patch0001: 0001-build-do-not-assume-that-INSTALL-is-cp.patch + +%description +Hiredis is a minimalistic C client library for the Redis database. +It is minimalistic because it just adds minimal support for the protocol, +but at the same time it uses a high level printf-alike API in order to make it much higher level than +otherwise suggested by its minimal code base and the lack of explicit bindings for every Redis command. + +Apart from supporting sending commands and receiving replies, it comes with a reply parser that +is decoupled from the I/O layer.It is a stream parser designed for easy reusability, which can +for instance be used in higher level language bindings for efficient reply parsing. + +%package devel +Summary: Development files for hiredis +Requires: hiredis = %{version}-%{release} + +%description devel +The hiredis-devel package contains development files to build applications for hiredis. + +%prep +%autosetup -p1 + +%build +%make_build PREFIX="%{_prefix}" LIBRARY_PATH="%{_lib}" DEBUG="%{optflags}" LDFLAGS="%{?__global_ldflags}" + +%install +%make_install PREFIX="%{_prefix}" LIBRARY_PATH="%{_lib}" + +find $RPM_BUILD_ROOT -type f -name "*.a" -delete + +cd $RPM_BUILD_ROOT%{_libdir} +ln -sf libhiredis.so.0.13 libhiredis.so.0 + +%check +make check || true + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + +%files +%doc COPYING +%{_libdir}/libhiredis.so.* + +%files devel +%doc CHANGELOG.md README.md +%{_includedir}/hiredis/ +%{_libdir}/libhiredis.so +%{_libdir}/pkgconfig/hiredis.pc + +%changelog +* Tue Dec 31 2019 liujing - 0.13.3-10 +- Package init