[package] add credis, C library for communicating with Redis servers (#7535)
authorFlorian Fainelli <florian@openwrt.org>
Sat, 31 Jul 2010 11:39:19 +0000 (11:39 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sat, 31 Jul 2010 11:39:19 +0000 (11:39 +0000)
SVN-Revision: 22433

libs/credis/Makefile [new file with mode: 0644]
libs/credis/patches/200-Makefile.patch [new file with mode: 0644]

diff --git a/libs/credis/Makefile b/libs/credis/Makefile
new file mode 100644 (file)
index 0000000..3fea0cc
--- /dev/null
@@ -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 (file)
index 0000000..177a809
--- /dev/null
@@ -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