From 127c8858aad8907fe7651083221ba9fc42f9c0b7 Mon Sep 17 00:00:00 2001 From: vanilla Date: Fri, 16 May 2014 08:05:05 +0000 Subject: 1: Support staging. 2: use USE_RC_SUBR instead. --- databases/rdfdb/Makefile | 17 ++++++----------- databases/rdfdb/files/patch-librdf::db.c | 14 -------------- databases/rdfdb/files/patch-librdf::rdflib.c | 11 ----------- databases/rdfdb/files/patch-librdf_db.c | 14 ++++++++++++++ databases/rdfdb/files/patch-librdf_rdflib.c | 11 +++++++++++ databases/rdfdb/files/rdfdb-server.in | 22 ++++++++++++++++++++++ databases/rdfdb/files/rdfdb-server.sh.tmpl | 22 ---------------------- 7 files changed, 53 insertions(+), 58 deletions(-) delete mode 100644 databases/rdfdb/files/patch-librdf::db.c delete mode 100644 databases/rdfdb/files/patch-librdf::rdflib.c create mode 100644 databases/rdfdb/files/patch-librdf_db.c create mode 100644 databases/rdfdb/files/patch-librdf_rdflib.c create mode 100644 databases/rdfdb/files/rdfdb-server.in delete mode 100644 databases/rdfdb/files/rdfdb-server.sh.tmpl (limited to 'databases') diff --git a/databases/rdfdb/Makefile b/databases/rdfdb/Makefile index 045da9938a03..b0fc73a44fe2 100644 --- a/databases/rdfdb/Makefile +++ b/databases/rdfdb/Makefile @@ -17,17 +17,18 @@ INVALID_BDB_VER=2 USERS= rdfdb GROUPS= rdfdb -WRKSRC= ${WRKDIR}/rdfdb -USE_GMAKE= yes +WRKSRC= ${WRKDIR}/rdfdb +USES= gmake MAKEFILE= makefile ALL_TARGET= CFLAGS+= ${PTHREAD_CFLAGS} -Wno-return-type +SUB_LIST+= RDFDB_PORT="${RDFDB_PORT}" RDFDB_DIR="${RDFDB_DIR}" +USE_RC_SUBR= rdfdb-server RDFDB_PORT?= 7001 -PLIST_FILES= bin/rdfdb bin/rdfdb etc/rc.d/rdfdb-server.sh +PLIST_FILES= bin/rdfdb -NO_STAGE= yes post-patch: @${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g' \ -e 's,%%PTHREAD_LIBS%%,${PTHREAD_LIBS:S/"//g},g' \ @@ -36,12 +37,6 @@ post-patch: ${WRKSRC}/makefile do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/rdfdb ${PREFIX}/bin - @${SED} "s|%%PREFIX%%|${PREFIX}|g; s|%%RDFDB_DIR%%|${RDFDB_DIR}|g; \ - s|%%RDFDB_PORT%%|${RDFDB_PORT}|g" \ - < ${FILESDIR}/rdfdb-server.sh.tmpl \ - > ${PREFIX}/etc/rc.d/rdfdb-server.sh - @${CHMOD} 554 ${PREFIX}/etc/rc.d/rdfdb-server.sh - @${CHOWN} root:rdfdb ${PREFIX}/etc/rc.d/rdfdb-server.sh + ${INSTALL_PROGRAM} ${WRKSRC}/rdfdb ${STAGEDIR}${PREFIX}/bin .include diff --git a/databases/rdfdb/files/patch-librdf::db.c b/databases/rdfdb/files/patch-librdf::db.c deleted file mode 100644 index 28f7c9bfc4dd..000000000000 --- a/databases/rdfdb/files/patch-librdf::db.c +++ /dev/null @@ -1,14 +0,0 @@ ---- librdf/db.c.orig Tue Oct 3 20:23:27 2000 -+++ librdf/db.c Mon Jan 2 12:06:39 2006 -@@ -169,7 +169,11 @@ - } - } - -+#if DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR > 40 -+ err = (*db)->open(*db, NULL, name, NULL, type, DB_CREATE | DB_THREAD , 0664); -+#else - err = (*db)->open(*db, name, NULL, type, DB_CREATE | DB_THREAD , 0664); -+#endif - if (err) { - printf("Problems opening %s : %s\n", name, db_strerror(err)); - return err; diff --git a/databases/rdfdb/files/patch-librdf::rdflib.c b/databases/rdfdb/files/patch-librdf::rdflib.c deleted file mode 100644 index 49cdc0349ac9..000000000000 --- a/databases/rdfdb/files/patch-librdf::rdflib.c +++ /dev/null @@ -1,11 +0,0 @@ ---- librdf/rdflib.c.orig Wed Oct 4 02:00:07 2000 -+++ librdf/rdflib.c Thu Aug 22 02:05:39 2002 -@@ -194,2 +194,4 @@ - -+extern FILE *rdfpGetFile(RDF_Parser rdfp); -+ - RDF_Result -@@ -200,3 +202,2 @@ - RDF_ASSERT, getFileCode(rdfp)) && (rdfpGetFile(rdfp))) { -- extern FILE *rdfpGetFile(RDF_Parser rdfp); - FILE *file = rdfpGetFile(rdfp); diff --git a/databases/rdfdb/files/patch-librdf_db.c b/databases/rdfdb/files/patch-librdf_db.c new file mode 100644 index 000000000000..28f7c9bfc4dd --- /dev/null +++ b/databases/rdfdb/files/patch-librdf_db.c @@ -0,0 +1,14 @@ +--- librdf/db.c.orig Tue Oct 3 20:23:27 2000 ++++ librdf/db.c Mon Jan 2 12:06:39 2006 +@@ -169,7 +169,11 @@ + } + } + ++#if DB_VERSION_MAJOR * 10 + DB_VERSION_MINOR > 40 ++ err = (*db)->open(*db, NULL, name, NULL, type, DB_CREATE | DB_THREAD , 0664); ++#else + err = (*db)->open(*db, name, NULL, type, DB_CREATE | DB_THREAD , 0664); ++#endif + if (err) { + printf("Problems opening %s : %s\n", name, db_strerror(err)); + return err; diff --git a/databases/rdfdb/files/patch-librdf_rdflib.c b/databases/rdfdb/files/patch-librdf_rdflib.c new file mode 100644 index 000000000000..49cdc0349ac9 --- /dev/null +++ b/databases/rdfdb/files/patch-librdf_rdflib.c @@ -0,0 +1,11 @@ +--- librdf/rdflib.c.orig Wed Oct 4 02:00:07 2000 ++++ librdf/rdflib.c Thu Aug 22 02:05:39 2002 +@@ -194,2 +194,4 @@ + ++extern FILE *rdfpGetFile(RDF_Parser rdfp); ++ + RDF_Result +@@ -200,3 +202,2 @@ + RDF_ASSERT, getFileCode(rdfp)) && (rdfpGetFile(rdfp))) { +- extern FILE *rdfpGetFile(RDF_Parser rdfp); + FILE *file = rdfpGetFile(rdfp); diff --git a/databases/rdfdb/files/rdfdb-server.in b/databases/rdfdb/files/rdfdb-server.in new file mode 100644 index 000000000000..a3ccd8132b67 --- /dev/null +++ b/databases/rdfdb/files/rdfdb-server.in @@ -0,0 +1,22 @@ +#!/bin/sh + +RDFDB_DIR=%%RDFDB_DIR%% +RDFDB_PORT=%%RDFDB_PORT%% +export RDFDB_DIR RDFDB_PORT + +case "$1" in + start) + if [ -x %%PREFIX%%/bin/rdfdb ]; then + su rdfdb -c 'exec %%PREFIX%%/bin/rdfdb > /dev/null &' && echo -n ' rdfdb' + fi + ;; + stop) + /usr/bin/killall rdfdb > /dev/null 2>&1 && echo -n ' rdfdb' + ;; + *) + echo "" + echo "Usage: `basename $0` { start | stop }" + echo "" + exit 64 + ;; +esac diff --git a/databases/rdfdb/files/rdfdb-server.sh.tmpl b/databases/rdfdb/files/rdfdb-server.sh.tmpl deleted file mode 100644 index a3ccd8132b67..000000000000 --- a/databases/rdfdb/files/rdfdb-server.sh.tmpl +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -RDFDB_DIR=%%RDFDB_DIR%% -RDFDB_PORT=%%RDFDB_PORT%% -export RDFDB_DIR RDFDB_PORT - -case "$1" in - start) - if [ -x %%PREFIX%%/bin/rdfdb ]; then - su rdfdb -c 'exec %%PREFIX%%/bin/rdfdb > /dev/null &' && echo -n ' rdfdb' - fi - ;; - stop) - /usr/bin/killall rdfdb > /dev/null 2>&1 && echo -n ' rdfdb' - ;; - *) - echo "" - echo "Usage: `basename $0` { start | stop }" - echo "" - exit 64 - ;; -esac -- cgit