From 549830e1d64e4537f41e56406f6ff9ac52b24349 Mon Sep 17 00:00:00 2001 From: bapt Date: Wed, 8 Jun 2011 16:38:12 +0000 Subject: - Switch to USERS/GROUPS macros - bump portrevision --- databases/rdfdb/Makefile | 12 ++++-------- databases/rdfdb/pkg-install | 48 --------------------------------------------- 2 files changed, 4 insertions(+), 56 deletions(-) delete mode 100644 databases/rdfdb/pkg-install diff --git a/databases/rdfdb/Makefile b/databases/rdfdb/Makefile index 9f60274d7849..42417d9ac749 100644 --- a/databases/rdfdb/Makefile +++ b/databases/rdfdb/Makefile @@ -7,7 +7,7 @@ PORTNAME= rdfdb PORTVERSION= 0.46 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= databases MASTER_SITES= http://www.guha.com/ DISTNAME= rdfdb_src @@ -18,15 +18,16 @@ COMMENT= A lightweight RDF database USE_BDB= 40+ INVALID_BDB_VER=2 +USERS= rdfdb +GROUPS= rdfdb + WRKSRC= ${WRKDIR}/rdfdb USE_GMAKE= yes MAKEFILE= makefile ALL_TARGET= CFLAGS+= ${PTHREAD_CFLAGS} -RDFDB_DIR?= /var/db/rdfdb RDFDB_PORT?= 7001 -PLIST_SUB= RDFDB_DIR=${RDFDB_DIR} post-patch: @${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},g' \ @@ -37,11 +38,6 @@ post-patch: do-install: @${INSTALL_PROGRAM} ${WRKSRC}/rdfdb ${PREFIX}/bin -.if !exists(${RDFDB_DIR}) - @${MKDIR} ${RDFDB_DIR} -.endif - @${SETENV} RDFDB_DIR=${RDFDB_DIR} ${SH} ${PKGINSTALL} ${PKGNAME} \ - PRE-INSTALL @${SED} "s|%%PREFIX%%|${PREFIX}|g; s|%%RDFDB_DIR%%|${RDFDB_DIR}|g; \ s|%%RDFDB_PORT%%|${RDFDB_PORT}|g" \ < ${FILESDIR}/rdfdb-server.sh.tmpl \ diff --git a/databases/rdfdb/pkg-install b/databases/rdfdb/pkg-install deleted file mode 100644 index 4ca9d0670658..000000000000 --- a/databases/rdfdb/pkg-install +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -PATH=/bin:/usr/sbin -if [ -z "${RDFDB_DIR}" ]; then - RDFDB_DIR=/var/db/rdfdb -fi - -case $2 in -PRE-INSTALL) - USER=rdfdb - GROUP=${USER} - UID=55 - GID=${UID} - - if pw group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if pw groupadd ${GROUP} -g ${GID}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi - fi - - if pw user show "${USER}" 2>/dev/null; then - echo "You already have a user \"${USER}\", so I will use it." - if pw usermod ${USER} -d ${RDFDB_DIR} - then - echo "Changed home directory of \"${USER}\" to \"${RDFDB_DIR}\"" - else - echo "Changing home directory of \"${USER}\" to \"${RDFDB_DIR}\" failed..." - exit 1 - fi - else - if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ - -d ${RDFDB_DIR} -s /bin/sh -c "rdfDB Daemon" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - - chown -R ${USER}:${GROUP} ${RDFDB_DIR} - ;; -esac -- cgit