From 00f1665c60662357dc4262c4f5e9849400b39b1c Mon Sep 17 00:00:00 2001 From: neil Date: Mon, 9 Jan 2023 20:52:09 +0800 Subject: [PATCH] init redis.io --- projects/redis.io/package.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 projects/redis.io/package.yml diff --git a/projects/redis.io/package.yml b/projects/redis.io/package.yml new file mode 100644 index 00000000..fd527814 --- /dev/null +++ b/projects/redis.io/package.yml @@ -0,0 +1,41 @@ +distributable: + url: https://download.redis.io/releases/redis-{{ version }}.tar.gz + strip-components: 1 + +versions: + github: redis/redis + + +provides: + - bin/redis-server + # - etc/redis.conf + +dependencies: + openssl.org: ^1 + +build: + dependencies: + gnu.org/make: '>=4.3' + freedesktop.org/pkg-config: '>=0.29' + script: + PREFIX={{prefix}} + BUILD_TLS=yes + make install + # todo: + # where to put redis.conf ? .tea/redis.io/etc? + + # %w[run db/redis log].each { |p| (var/p).mkpath } + + # # Fix up default conf file to match our paths + # inreplace "redis.conf" do |s| + # s.gsub! "/var/run/redis.pid", var/"run/redis.pid" + # s.gsub! "dir ./", "dir #{var}/db/redis/" + # s.sub!(/^bind .*$/, "bind 127.0.0.1 ::1") + # end + + # etc.install "redis.conf" + # etc.install "sentinel.conf" => "redis-sentinel.conf" +test: + script: | + redis-server --test-memory 2 + # %w[run db/redis log].each { |p| assert_predicate var/p, :exist?, "#{var/p} doesn't exist!" } \ No newline at end of file