Ticket #19409: Portfile

File Portfile, 2.4 KB (added by brianjlandau@…, 16 years ago)

Portfile for redis

Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id$
3
4PortSystem 1.0
5
6name                    redis
7version                 0.092
8categories              databases
9maintainers             nomaintainer
10description             A persistent key-value database with built-in net interface written in ANSI-C for POSIX systems
11long_description \
12        Redis is a key-value database. It is similar to memcached but the dataset is not volatile, and values can be strings, exactly like in memcached, but also lists and sets with atomic operations to push/pop elements. \
13        In order to be very fast but at the same time persistent the whole dataset is taken in memory and from time to time and/or when a number of changes to the dataset are performed it is written asynchronously on disk. You may lost the last few queries that is acceptable in many applications but it is as fast as an in memory DB (beta 6 of Redis includes initial support for master-slave replication in order to solve this problem by redundancy).
14homepage                http://code.google.com/p/redis/
15platforms               darwin
16master_sites    googlecode
17checksums       md5     c78d9fc17b9cc9e924f18520fe84e598 \
18                sha1    2b656fd788bcda5196f13f45724b61b2e707f759 \
19                rmd160  ebf9d37c1982e33407b6e74d495c1f0f5a08b516
20
21use_configure no
22
23destroot {
24        xinstall -m 0755 -W ${worksrcpath} "redis-benchmark" "redis-cli" "redis-server" \
25                ${destroot}${prefix}/bin
26        xinstall -m 0644 ${filespath}/redis.conf \
27                ${destroot}${prefix}/etc/redis.conf.sample
28        xinstall -m 0644 ${filespath}/redis-daemon.conf \
29                ${destroot}${prefix}/etc/redis-daemon.conf.sample
30}
31
32post-activate {
33        if {![file exists ${prefix}/etc/redis-daemon.conf]} {
34                file copy ${prefix}/etc/redis-daemon.conf.sample \
35                        ${prefix}/etc/redis-daemon.conf
36        }
37        if {![file exists ${prefix}/etc/redis.conf]} {
38                file copy ${prefix}/etc/redis.conf.sample \
39                        ${prefix}/etc/redis.conf
40        }
41        xinstall -d ${prefix}/var/db/redis
42        touch ${prefix}/var/log/redis.log
43        ui_msg "
44=============================================================================
45* To start up a redis server instance use this command:
46*
47*   redis-server ${prefix}/etc/redis.conf
48*
49=============================================================================
50"
51}
52
53startupitem.create      yes
54startupitem.start       "${prefix}/bin/redis-server ${prefix}/etc/redis-daemon.conf"
55startupitem.stop        "echo \"SHUTDOWN\" | nc localhost 6379"