an easy and consistent way of installing software ported to FreeBSD
#! /bin/sh
#
# $FreeBSD: ports/biology/distribfold/pkg-deinstall,v 1.1 2002/10/07 03:07:13 lioux Exp $
# taken from net/cvsup-mirror
PATH=/bin:/usr/sbin
DNETFOLD_USER=${DNETFOLD_USER:-dnetfold}
DNETFOLD_GROUP=${DNETFOLD_GROUP:-dnetfold}
ask() {
local question default answer
question=$1
default=$2
if [ -z "${PACKAGE_BUILDING}" ]; then
read -p "${question} [${default}]? " answer
fi
if [ x${answer} = x ]; then
answer=${default}
fi
echo ${answer}
}
yesno() {
local dflt question answer
question=$1
dflt=$2
while :; do
answer=$(ask "${question}" "${dflt}")
case "${answer}" in
[Yy]*) return 0;;
[Nn]*) return 1;;
esac
echo "Please answer yes or no."
done
}
delete_account() {
local u g home
u=$1
g=$2
if yesno "Do you want me to remove group \"${g}\"" y; then
pw groupdel -n ${g}
echo "Done."
fi
if yesno "Do you want me to remove user \"${u}\"" y; then
eval home=~${u}
pw userdel -n ${u}
echo "Done."
if [ -d "${home}" ]; then
echo "Please remember to remove the home directory \"${home}\""
fi
fi
}
if [ x$2 != xDEINSTALL ]; then
exit
fi
delete_account ${DNETFOLD_USER} ${DNETFOLD_GROUP}
[ excerpt from developer's site ]
This is the distributedfolding.org's client.
It makes protein structures to help sample the enormous size of
protein conformatoinal space. We hope to find a few good samples
and understand how a large computation can help crack the problem
of predicting protein structure - the protein folding problem.
Proteins have a vast number of folds, larger than we could hope to
compute even with distributed computing. Usually only one fold is
found in nature. The Distributed Folding Project aims to test our
new protein folding algorithm. We want see if it can reproduce
natural protein folds after making extremely large samples of many
different folds.
With your help, we will create the largest samples of protein folds
ever computed. First we will make 1 Billion (1,000,000,000) folds
for 5 small proteins, then we will try 10 Billion (10,000,000,000)
for another 10 large proteins. By the end of our first phase, we
hope to make over 100 Billion protein folds spanning 15 different
proteins.
WWW: http://www.distributedfolding.org/
#! /bin/sh
#
# $FreeBSD: ports/biology/distribfold/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
distribfold/cpu0/CompatibilityNotes.txt
distribfold/cpu0/blpotential.txt
distribfold/cpu0/bstdt.val
distribfold/cpu0/cbdata
distribfold/cpu0/copyright
distribfold/cpu0/database.obs
distribfold/cpu0/database.seq
distribfold/cpu0/distrib-update
distribfold/cpu0/foldit
distribfold/cpu0/foldtrajlite
distribfold/cpu0/native.val
distribfold/cpu0/param19_eef1.inp
distribfold/cpu0/phipsiwalk_dict.cdx
distribfold/cpu0/phipsiwalk_dict.dbf
distribfold/cpu0/phipsiwalk_dict.fpt
distribfold/cpu0/protein.trj
distribfold/cpu0/readme1st.txt
distribfold/cpu0/rotlib.bin.bz2
distribfold/cpu0/skel.prt
distribfold/cpu0/solvpar.inp
distribfold/cpu0/sspred.val
distribfold/cpu0/toph19_eef1.inp
distribfold/cpu0/whatsnew.txt
distribfold/cpu0/zhangatm.txt
distribfold/cpu0/zhangeij.txt
@dirrmtry distribfold/cpu0
etc/rc.d/distribfold.sh
@unexec rmdir %D/distribfold 2>/dev/null || echo "If you are permanently removing this port, you should do a ``rm -rf ${PKG_PREFIX}/distribfold`` to remove any binary, configuration and log files left." | fmt