Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Dec 2001 07:58:00 -0800
From:      Skyline <skyline@groovie.org>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        Philip Jenvey <pjenvey@turntables.org>
Subject:   ports/33281: New port: databases/rdfdb
Message-ID:  <E16JzOS-000AH4-00@groovie.org>

next in thread | raw e-mail | index | archive | help

>Number:         33281
>Category:       ports
>Synopsis:       New port: databases/rdfdb
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 28 08:00:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Philip Jenvey <pjenvey@turntables.org>
>Release:        FreeBSD 4.4-RELEASE i386
>Organization:
>Environment:
System: FreeBSD chomsky.groovie.org 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Tue Sep 18 11:57:08 PDT 2001 murray@builder.FreeBSD.org:/usr/src/sys/compile/GENERIC i386


	
>Description:
	New port: databases/rdfDB, an RDF database.
	Note to commiters: I am allocating UID/GID 71 for this port. It's
	own low digit UID/GID is not a requirement, but it feels more
	convenient for a db. Otherwise I can change that.
>How-To-Repeat:
	
>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	rdfdb
#	rdfdb/Makefile
#	rdfdb/distinfo
#	rdfdb/files
#	rdfdb/files/patch-makefile
#	rdfdb/files/rdfdb-server.sh.tmpl
#	rdfdb/files/patch-query-processQuery.c
#	rdfdb/pkg-comment
#	rdfdb/pkg-descr
#	rdfdb/pkg-install
#	rdfdb/pkg-plist
#
echo c - rdfdb
mkdir -p rdfdb > /dev/null 2>&1
echo x - rdfdb/Makefile
sed 's/^X//' >rdfdb/Makefile << 'END-of-rdfdb/Makefile'
X# New ports collection makefile for:   rdfdb
X# Date created:                 28 December 2001
X# Whom:                         Philip Jenvey <pjenvey@turntables.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	rdfdb
XPORTVERSION=	0.46
XCATEGORIES=	databases
XMASTER_SITES=	http://web1.guha.com/
XDISTNAME=	rdfdb_src
X
XMAINTAINER=	pjenvey@turntables.org
X
XLIB_DEPENDS=	db3:${PORTSDIR}/databases/db3
X
XUSE_GMAKE=	yes
XMAKEFILE=	makefile
XALL_TARGET=
XWRKSRC=		${WRKDIR}/rdfdb
XRDFDB_DIR?=	/var/db/rdfdb
XRDFDB_PORT?=	7001
XPLIST_SUB=	RDFDB_DIR=${RDFDB_DIR}
X
Xdo-install:
X	@ ${INSTALL_PROGRAM} ${WRKSRC}/rdfdb ${PREFIX}/bin
X
Xpost-install:
X.if !exists(${RDFDB_DIR})
X	@ ${MKDIR} ${RDFDB_DIR}
X.endif
X	@ ${SETENV} RDFDB_DIR=${RDFDB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} \
X		POST-INSTALL
X	@ ${SED} "s|%%PREFIX%%|${PREFIX}|g; s|%%RDFDB_DIR%%|${RDFDB_DIR}|g; \
X		s|%%RDFDB_PORT%%|${RDFDB_PORT}|g" \
X		< ${FILESDIR}/rdfdb-server.sh.tmpl \
X		> ${PREFIX}/etc/rc.d/rdfdb-server.sh
X	@ ${CHMOD} 554 ${PREFIX}/etc/rc.d/rdfdb-server.sh
X	@ ${CHOWN} root:rdfdb ${PREFIX}/etc/rc.d/rdfdb-server.sh
X
X.include <bsd.port.mk>
END-of-rdfdb/Makefile
echo x - rdfdb/distinfo
sed 's/^X//' >rdfdb/distinfo << 'END-of-rdfdb/distinfo'
XMD5 (rdfdb_src.tar.gz) = abb21c6c3e9f806640ddcd220af3f3d5
END-of-rdfdb/distinfo
echo c - rdfdb/files
mkdir -p rdfdb/files > /dev/null 2>&1
echo x - rdfdb/files/patch-makefile
sed 's/^X//' >rdfdb/files/patch-makefile << 'END-of-rdfdb/files/patch-makefile'
X--- makefile.orig	Sun Aug 20 12:48:46 2000
X+++ makefile	Fri Dec 28 05:01:20 2001
X@@ -1,7 +1,7 @@
X CC = gcc -g 
X-INCLUDES = -I /usr/local/BerkeleyDB.3.1/include -I expat/xmltok -I expat/xmlparse
X-LIBS     = -ldb -lpthread
X-CPPFLAGS = $(INCLUDES) -L  /usr/local/BerkeleyDB.3.1/lib/
X+INCLUDES = -I /usr/local/include/db3 -I expat/xmltok -I expat/xmlparse
X+LIBS     = -ldb -pthread
X+CPPFLAGS = $(INCLUDES) -L  /usr/local/lib
X 
X OBJS =  utils/hash.o \
X 	utils/utils.o \
END-of-rdfdb/files/patch-makefile
echo x - rdfdb/files/rdfdb-server.sh.tmpl
sed 's/^X//' >rdfdb/files/rdfdb-server.sh.tmpl << 'END-of-rdfdb/files/rdfdb-server.sh.tmpl'
X#!/bin/sh
X
XRDFDB_DIR=%%RDFDB_DIR%%
XRDFDB_PORT=%%RDFDB_PORT%%
Xexport RDFDB_DIR RDFDB_PORT
X
Xcase "$1" in
X	start)
X		if [ -x %%PREFIX%%/bin/rdfdb ]; then
X			su rdfdb -c 'exec %%PREFIX%%/bin/rdfdb > /dev/null &' && echo -n ' rdfdb'
X		fi
X		;;
X	stop)
X		/usr/bin/killall rdfdb > /dev/null 2>&1 && echo -n ' rdfdb'
X		;;
X	*)
X		echo ""
X		echo "Usage: `basename $0` { start | stop }"
X		echo ""
X		exit 64
X		;;
Xesac
END-of-rdfdb/files/rdfdb-server.sh.tmpl
echo x - rdfdb/files/patch-query-processQuery.c
sed 's/^X//' >rdfdb/files/patch-query-processQuery.c << 'END-of-rdfdb/files/patch-query-processQuery.c'
X--- query/processQuery.c.orig	Mon Sep 18 17:09:01 2000
X+++ query/processQuery.c	Thu Dec 27 21:18:54 2001
X@@ -21,6 +21,7 @@
X #include "../utils/utils.h"
X #include "queryParser.h"
X #include <stdio.h>
X+#include <time.h>
X extern int       DB_Flush (const char* db) ;
X extern int gVerbose;
X extern int gAssertionCount;
END-of-rdfdb/files/patch-query-processQuery.c
echo x - rdfdb/pkg-comment
sed 's/^X//' >rdfdb/pkg-comment << 'END-of-rdfdb/pkg-comment'
XA lightweight RDF database
END-of-rdfdb/pkg-comment
echo x - rdfdb/pkg-descr
sed 's/^X//' >rdfdb/pkg-descr << 'END-of-rdfdb/pkg-descr'
XR.V. Guha's rdfDB. Intended to be a simple, scalable, open-source
Xdatabase for RDF. Written in C and based on top of the Sleepycat
XBerkeley Database, it supports interrogation via TCP/IP sockets,
Xmeaning integration is possible with any programming language.
X
XrdfDB uses a high level SQLish query language. The data is modelled as
Xa directed labelled graph (RDF).
X
XThe goals of this project are to build a database that is capable of:
X
X   1. Supporting a graph oriented API via a textual query language ala
X      SQL.
X   2. Load/Reload an RDF file from a url into the database
X   3. Scalable to millions of nodes and triples.
X   4. Provide support for RDF Schemas.
X   5. Provide support for some basic forms of inferencing.
X   6. Provide both C and Perl access to the database.
X   7. The Perl philosophy applies : Simple things should be simple and
X      complex things should be possible.
X
XWWW: http://web1.guha.com/rdfdb/
X
X- Philip Jenvey
Xpjenvey@turntables.org
END-of-rdfdb/pkg-descr
echo x - rdfdb/pkg-install
sed 's/^X//' >rdfdb/pkg-install << 'END-of-rdfdb/pkg-install'
X#!/bin/sh
X
XPATH=/bin:/usr/sbin
Xif [ -z "${RDFDB_DIR}" ]; then
X	RDFDB_DIR=/var/db/mysql
Xfi
X
Xcase $2 in
XPOST-INSTALL)
X	USER=rdfdb
X	GROUP=${USER}
X	UID=71
X	GID=${UID}
X
X	if pw group show "${GROUP}" 2>/dev/null; then
X		echo "You already have a group \"${GROUP}\", so I will use it."
X	else
X		if pw groupadd ${GROUP} -g ${GID}; then
X			echo "Added group \"${GROUP}\"."
X		else
X			echo "Adding group \"${GROUP}\" failed..."
X			exit 1
X		fi
X	fi
X
X	if pw user show "${USER}" 2>/dev/null; then
X		echo "You already have a user \"${USER}\", so I will use it."
X		if pw usermod ${USER} -d ${RDFDB_DIR}
X		then
X			echo "Changed home directory of \"${USER}\" to \"${RDFDB_DIR}\""
X		else
X			echo "Changing home directory of \"${USER}\" to \"${RDFDB_DIR}\" failed..."
X			exit 1
X		fi
X	else
X		if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
X			-d ${RDFDB_DIR} -s /bin/sh -c "rdfDB Daemon"
X		then
X			echo "Added user \"${USER}\"."
X		else
X			echo "Adding user \"${USER}\" failed..."
X			exit 1
X		fi
X	fi
X
X	chown -R ${USER}:${GROUP} ${RDFDB_DIR}
X	;;
Xesac
END-of-rdfdb/pkg-install
echo x - rdfdb/pkg-plist
sed 's/^X//' >rdfdb/pkg-plist << 'END-of-rdfdb/pkg-plist'
Xbin/rdfdb
Xetc/rc.d/rdfdb-server.sh
X@unexec rmdir %%RDFDB_DIR%% 2>/dev/null || true
X@exec mkdir -p %%RDFDB_DIR%%
END-of-rdfdb/pkg-plist
exit
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E16JzOS-000AH4-00>