From 92418b0b7db9b534688a279b129ef53924a4a7ac Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 31 Jul 2010 11:39:19 +0000 Subject: [PATCH] [package] add credis, C library for communicating with Redis servers (#7535) SVN-Revision: 22433 --- libs/credis/Makefile | 51 ++++++++++++++++++++++++++ libs/credis/patches/200-Makefile.patch | 15 ++++++++ 2 files changed, 66 insertions(+) create mode 100644 libs/credis/Makefile create mode 100644 libs/credis/patches/200-Makefile.patch diff --git a/libs/credis/Makefile b/libs/credis/Makefile new file mode 100644 index 0000000000..3fea0cc9ea --- /dev/null +++ b/libs/credis/Makefile @@ -0,0 +1,51 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=credis +PKG_VERSION:=0.2.2 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://credis.googlecode.com/files/ +PKG_MD5SUM:=bbc498beb22b8590005520405766cf6e + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/credis + SECTION:=libs + CATEGORY:=Libraries + TITLE:=C library for communicating with Redis servers. + URL:=http://code.google.com/p/credis +endef + +define Package/credis/description + Credis is a client library in plain C for communicating with Redis + servers. Redis is a high performance key-value database, refer to + Redis project page for more information. Credis aims to be fast + and minimalistic with respect to memory usage. It supports + connections to multiple Redis servers. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC='$(TARGET_CC)' \ + CFLAGS='$(TARGET_CFLAGS)' \ + LDFLAGS='$(TARGET_LDFLAGS)' \ + AR='$(TARGET_CROSS)ar' \ + all +endef + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_BUILD_DIR)/credis.h $(1)/usr/include/credis.h + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libcredis.{a,so*} $(1)/usr/lib/ +endef + +define Package/credis/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/libcredis.so $(1)/usr/lib +endef + +$(eval $(call BuildPackage,credis)) diff --git a/libs/credis/patches/200-Makefile.patch b/libs/credis/patches/200-Makefile.patch new file mode 100644 index 0000000000..177a809772 --- /dev/null +++ b/libs/credis/patches/200-Makefile.patch @@ -0,0 +1,15 @@ +--- a/Makefile 2010-05-19 22:50:09.000000000 +0200 ++++ b/Makefile 2010-06-22 09:59:16.000000000 +0200 +@@ -1,9 +1,9 @@ +-CFLAGS = -g -O2 -Wall +-LDFLAGS = ++CFLAGS += -g -O2 -Wall ++LDFLAGS += + #CPPFLAGS = -DPRINTDEBUG + + # build shared lib under OS X or Linux +-OS = $(shell uname -s) ++OS = Linux + ifeq ($(OS),Darwin) + SHAREDLIB_LINK_OPTIONS=-dynamiclib -Wl,-install_name -Wl, + else -- 2.30.2