1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

Credis is a client library in plain C for communicating with Redis servers

Feature safe:	yes
This commit is contained in:
Steven Kreuzer 2011-02-02 17:24:59 +00:00
parent 7c3868246a
commit 5b47f10e5d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=268561
7 changed files with 95 additions and 0 deletions

View File

@ -28,6 +28,7 @@
SUBDIR += courier-authlib-pgsql
SUBDIR += courier-authlib-userdb
SUBDIR += courier-authlib-usergdbm
SUBDIR += credis
SUBDIR += cyrus-imspd
SUBDIR += dalmp
SUBDIR += db

21
databases/credis/Makefile Normal file
View File

@ -0,0 +1,21 @@
# New ports collection makefile for: credis
# Date created: 2011-02-02
# Whom: Steven Kreuzer <skreuzer@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= credis
PORTVERSION= 0.2.3
CATEGORIES= databases
MASTER_SITES= GOOGLE_CODE
MAINTAINER= skreuzer@FreeBSD.org
COMMENT= Library for communicating with Redis servers
USE_GMAKE= yes
USE_LDCONFIG= yes
PLIST_SUB= VERSION="${PORTVERSION}"
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (credis-0.2.3.tar.gz) = d9ab904be07865bd159ab44ebc45ef1dae71071842a5b7dec321b09c13a770d0
SIZE (credis-0.2.3.tar.gz) = 17265

View File

@ -0,0 +1,50 @@
--- Makefile.orig 2010-08-27 04:57:25.000000000 -0400
+++ Makefile 2011-02-02 11:38:11.000000000 -0500
@@ -1,7 +1,21 @@
-CFLAGS = -g -O2 -Wall
-LDFLAGS =
+CFLAGS ?= -g -O2 -Wall
+LDFLAGS ?=
#CPPFLAGS = -DPRINTDEBUG
+VER_MAJOR = 0
+VER_MINOR = 2
+VER_PATCH = 3
+VER=$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
+
+prefix ?= /usr/local
+libdir = $(prefix)/lib
+includedir = $(prefix)/include
+DESTDIR ?=
+INSTALL ?= /usr/bin/install -c
+MKDIR_P ?= /bin/mkdir -p
+CP ?= /bin/cp -f
+LN ?= /bin/ln -fs
+
# build shared lib under OS X or Linux
OS = $(shell uname -s)
ifeq ($(OS),Darwin)
@@ -22,12 +36,19 @@
$(AR) -cvq $@ $^
libcredis.so: credis.o
- $(CC) $(SHAREDLIB_LINK_OPTIONS)$@ -o $@ $^
+ $(CC) $(SHAREDLIB_LINK_OPTIONS)$@.$(VER_MAJOR) -o $@.$(VER) $^
+ $(LN) $@.$(VER) $@.$(VER_MAJOR)
+ $(LN) $@.$(VER_MAJOR) $@
credis.o: credis.c credis.h Makefile
$(CC) -c -fPIC $(CFLAGS) $(CPPFLAGS) -o $@ credis.c
-install:
- @echo "Installing library (to be done)"
+install: all installdirs
+ $(INSTALL) -m644 *.h $(DESTDIR)$(includedir)
+ $(CP) *.so* *.a $(DESTDIR)$(libdir)
+
+installdirs:
+ $(MKDIR_P) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+
clean:
- rm -f *.o *~ $(TARGETS)
+ rm -f *.o *~ *.so* $(TARGETS)

View File

@ -0,0 +1,12 @@
--- credis.c.orig 2011-02-02 09:38:06.000000000 -0500
+++ credis.c 2011-02-02 09:38:37.000000000 -0500
@@ -34,6 +34,9 @@
#define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#else
+#ifdef __FreeBSD__
+#include <sys/types.h>
+#endif
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>

View File

@ -0,0 +1,3 @@
Credis is a client library in plain C for communicating with Redis servers.
WWW: http://code.google.com/p/credis/

View File

@ -0,0 +1,6 @@
@comment $FreeBSD$
include/credis.h
lib/libcredis.a
lib/libcredis.so
lib/libcredis.so.0
lib/libcredis.so.%%VERSION%%