diff options
author | crees <crees@FreeBSD.org> | 2011-06-28 01:50:37 +0800 |
---|---|---|
committer | crees <crees@FreeBSD.org> | 2011-06-28 01:50:37 +0800 |
commit | e98a75d951030157383c94c63042e7573797e5ef (patch) | |
tree | 58096918ba49b292dfcd5d868cdd082b5fb213d7 /biology | |
parent | 53cd42e4cde8810a49fae1955d62ff432a5b14a5 (diff) | |
download | freebsd-ports-gnome-e98a75d951030157383c94c63042e7573797e5ef.tar.gz freebsd-ports-gnome-e98a75d951030157383c94c63042e7573797e5ef.tar.zst freebsd-ports-gnome-e98a75d951030157383c94c63042e7573797e5ef.zip |
- Use USERS and GROUPS
- Use ${SH} instead of calling script directly
PR: ports/157575
Submitted by: Chris Rees (utisoft@gmail.com)
Approved by: tabthorpe (co-mentor)
Diffstat (limited to 'biology')
-rw-r--r-- | biology/distribfold/Makefile | 9 | ||||
-rw-r--r-- | biology/distribfold/pkg-install | 41 |
2 files changed, 3 insertions, 47 deletions
diff --git a/biology/distribfold/Makefile b/biology/distribfold/Makefile index e79e9ada6491..b0de90c56412 100644 --- a/biology/distribfold/Makefile +++ b/biology/distribfold/Makefile @@ -37,6 +37,8 @@ DESTINATION_DIR= ${PREFIX}/distribfold # default users DNETFOLD_USER=dnetfold DNETFOLD_GROUP=dnetfold +USERS= ${DNETFOLD_USER} +GROUPS= ${DNETFOLD_GROUP} # default number of processors WITH_NCPU?= 1 @@ -47,11 +49,6 @@ post-patch: @${REINPLACE_CMD} -E -e 's|%%DESTINATION_DIR%%|${DESTINATION_DIR}/cpu0|' \ ${WRKSRC}/foldit -pre-install: -# create users - @${SETENV} PKG_PREFIX=${PREFIX} ${SH} \ - ${PKGINSTALL} ${PKGNAME} POST-INSTALL - do-install: # remove any patch scrap files .for ext in bak orig @@ -65,7 +62,7 @@ do-install: @${INSTALL_SCRIPT} ${WRKDIR}/distribfold.sh ${PREFIX}/etc/rc.d # for every cpu directory @ncpu=`${CAT} ${WRKDIR}/ncpu` ; \ - for dir in `${FILESDIR}/number_of_dirs.sh $${ncpu}` ; do \ + for dir in `${SH} ${FILESDIR}/number_of_dirs.sh $${ncpu}` ; do \ DESTINATION_DIR=${DESTINATION_DIR}/cpu$${dir} ; \ ${MKDIR} $${DESTINATION_DIR} ; \ ${INSTALL_DATA} ${WRKSRC}/* $${DESTINATION_DIR} ; \ diff --git a/biology/distribfold/pkg-install b/biology/distribfold/pkg-install deleted file mode 100644 index 5abebc1f8cc8..000000000000 --- a/biology/distribfold/pkg-install +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/biology/distribfold/Attic/pkg-install,v 1.1 2002-10-07 03:07:13 lioux Exp $ -# taken from devel/perforce - -PATH=/bin:/usr/sbin - -DNETFOLD_USER=${DNETFOLD_USER:-dnetfold} -DNETFOLD_GROUP=${DNETFOLD_GROUP:-dnetfold} - -case $2 in -POST-INSTALL) - USER=${DNETFOLD_USER} - GROUP=${DNETFOLD_GROUP} - - 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} ; 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." - else - if pw useradd ${USER} -g ${GROUP} -h - \ - -d /nonexistent -c "distribfold Daemon" -s /sbin/nologin - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - - ;; -esac |