Skip to contentSkip to conversation

new package: redis

PATCH Superseded Daniel Price 2 participants 3 messages Mar 1, 2013 – Mar 2, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 new package: redis

---
 package/Config.in                           |    1 +
 package/redis/Config.in                     |   11 +++++++
 package/redis/redis-2.6.10-001-uclibc.patch |   43 +++++++++++++++++++++++++++
 package/redis/redis.mk                      |   28 +++++++++++++++++
 4 files changed, 83 insertions(+), 0 deletions(-)
 create mode 100644 package/redis/Config.in
 create mode 100644 package/redis/redis-2.6.10-001-uclibc.patch
 create mode 100644 package/redis/redis.mk
package/Config.in +1 -0
index a169505..cc08713 100644
@@ -394,6 +394,7 @@ menu "Database"
 source "package/berkeleydb/Config.in"
 source "package/gdbm/Config.in"
 source "package/mysql_client/Config.in"
+source "package/redis/Config.in"
 source "package/sqlcipher/Config.in"
 source "package/sqlite/Config.in"
 endmenu
package/redis/Config.in new file +11 -0
new file mode 100644
index 0000000..05dacc7
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_REDIS
+	bool "redis"
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_LARGEFILE
+	help
+	  Redis is an open source, advanced key-value store. It is often referred
+	  to as a data structure server since keys can contain strings, hashes,
+	  lists, sets and sorted sets.
+
+	  http://www.redis.io
package/redis/redis-2.6.10-001-uclibc.patch new file +43 -0

43 lines not on this page · raw message

package/redis/redis.mk new file +28 -0
new file mode 100644
index 0000000..04738ec
@@ -0,0 +1,28 @@
+#############################################################
+#
+# redis
+#
+#############################################################
+
+REDIS_VERSION = 2.6.10
+REDIS_SOURCE = redis-$(REDIS_VERSION).tar.gz
+REDIS_SITE = http://redis.googlecode.com/files
+REDIS_LICENSE = BSD-3c
+REDIS_LICENSE_FILES = COPYING
+
+# Redis doesn't support DESTDIR (yet, see
+# https://github.com/antirez/redis/pull/609).  We set PREFIX
+# instead.
+REDIS_BUILDOPTS = MALLOC=libc CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+    PREFIX=$(TARGET_DIR)/usr
+
+define REDIS_BUILD_CMDS
+        $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(REDIS_BUILDOPTS)
+endef
+
+define REDIS_INSTALL_TARGET_CMDS
+        $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(REDIS_BUILDOPTS) \
+	    LDCONFIG=true install
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.6.5
#1 lore raw

PATCH v2 1/1 new package: redis

---
 package/Config.in                           |    1 +
 package/redis/Config.in                     |   11 +++++++
 package/redis/redis-2.6.10-001-uclibc.patch |   43 +++++++++++++++++++++++++++
 package/redis/redis.mk                      |   28 +++++++++++++++++
 4 files changed, 83 insertions(+), 0 deletions(-)
 create mode 100644 package/redis/Config.in
 create mode 100644 package/redis/redis-2.6.10-001-uclibc.patch
 create mode 100644 package/redis/redis.mk
package/Config.in +1 -0
index a169505..cc08713 100644
@@ -394,6 +394,7 @@ menu "Database"
 source "package/berkeleydb/Config.in"
 source "package/gdbm/Config.in"
 source "package/mysql_client/Config.in"
+source "package/redis/Config.in"
 source "package/sqlcipher/Config.in"
 source "package/sqlite/Config.in"
 endmenu
package/redis/Config.in new file +11 -0
new file mode 100644
index 0000000..05dacc7
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_REDIS
+	bool "redis"
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_LARGEFILE
+	help
+	  Redis is an open source, advanced key-value store. It is often referred
+	  to as a data structure server since keys can contain strings, hashes,
+	  lists, sets and sorted sets.
+
+	  http://www.redis.io
package/redis/redis-2.6.10-001-uclibc.patch new file +43 -0

43 lines not on this page · raw message

package/redis/redis.mk new file +28 -0
new file mode 100644
index 0000000..04738ec
@@ -0,0 +1,28 @@
+#############################################################
+#
+# redis
+#
+#############################################################
+
+REDIS_VERSION = 2.6.10
+REDIS_SOURCE = redis-$(REDIS_VERSION).tar.gz
+REDIS_SITE = http://redis.googlecode.com/files
+REDIS_LICENSE = BSD-3c
+REDIS_LICENSE_FILES = COPYING
+
+# Redis doesn't support DESTDIR (yet, see
+# https://github.com/antirez/redis/pull/609).  We set PREFIX
+# instead.
+REDIS_BUILDOPTS = MALLOC=libc CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+    PREFIX=$(TARGET_DIR)/usr
+
+define REDIS_BUILD_CMDS
+        $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(REDIS_BUILDOPTS)
+endef
+
+define REDIS_INSTALL_TARGET_CMDS
+        $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(REDIS_BUILDOPTS) \
+	    LDCONFIG=true install
+endef
+
+$(eval $(generic-package))
Signature · 1 line
1.7.6.5
#2 lore raw

PATCH v2 1/1 new package: redis

Dear Daniel Price,

Looks mostly good, thanks! A few comments below.

package/redis/Config.in line 11

Quoted 11 lines · Daniel Price
package/redis/Config.in new file +11 -0
+config BR2_PACKAGE_REDIS
+	bool "redis"
+	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_LARGEFILE
+	help
+	  Redis is an open source, advanced key-value store. It is often referred
+	  to as a data structure server since keys can contain strings, hashes,
+	  lists, sets and sorted sets.
+
+	  http://www.redis.io

We usually add a comment:

comment "redis needs largefile and thread support in toolchain"

	depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS

package/redis/redis-2.6.10-001-uclibc.patch

Quoted 5 lines
package/redis/redis-2.6.10-001-uclibc.patch new file +0 -0
new file mode 100644
index 0000000..22206eb

Please don't put the version number in the patch file name. It should be just redis-001-uclibc.patch.

package/redis/redis-2.6.10-001-uclibc.patch

Quoted 11 lines
package/redis/redis-2.6.10-001-uclibc.patch new file +11 -0
+REDIS_VERSION = 2.6.10
+REDIS_SOURCE = redis-$(REDIS_VERSION).tar.gz
+REDIS_SITE = http://redis.googlecode.com/files
+REDIS_LICENSE = BSD-3c
+REDIS_LICENSE_FILES = COPYING
+
+# Redis doesn't support DESTDIR (yet, see
+# https://github.com/antirez/redis/pull/609).  We set PREFIX
+# instead.
+REDIS_BUILDOPTS = MALLOC=libc CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+    PREFIX=$(TARGET_DIR)/usr

Can you try instead:

REDIS_BUILDOPTS = MALLOC=libc $(TARGET_CONFIGURE_OPTS) \
	PREFIX=$(TARGET_DIR)/usr

i.e, TARGET_CONFIGURE_OPTS already contains the definition for CC, CFLAGS and more, so we generally prefer to use $(TARGET_CONFIGURE_OPTS) when possible.

Thanks!

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com