summaryrefslogtreecommitdiff
path: root/astro
diff options
context:
space:
mode:
authorStefan Bethke <stb@FreeBSD.org>1999-04-22 12:24:25 +0000
committerStefan Bethke <stb@FreeBSD.org>1999-04-22 12:24:25 +0000
commitfb34d55ddd3a5ee85bf9deb1aeac6da69b632a7c (patch)
treef4b28efd77f8d1ec64501f4e1d133e3896d9b774 /astro
parentBetter check for OS version, cleanup. (diff)
Allow for automatich package building
Reinstate the EXTRACT_ variables. They are needed.
Notes
Notes: svn path=/head/; revision=18080
Diffstat (limited to 'astro')
-rw-r--r--astro/setiathome/Makefile13
-rw-r--r--astro/setiathome/pkg-install25
-rw-r--r--astro/setiathome/pkg-plist1
3 files changed, 29 insertions, 10 deletions
diff --git a/astro/setiathome/Makefile b/astro/setiathome/Makefile
index 3fd899adff41..245aff44b8c9 100644
--- a/astro/setiathome/Makefile
+++ b/astro/setiathome/Makefile
@@ -3,7 +3,7 @@
# Date created: 22 Apr 1999
# Whom: stb@freebsd.org
#
-# $Id: Makefile,v 1.3 1999/04/22 02:00:16 stb Exp $
+# $Id: Makefile,v 1.4 1999/04/22 10:35:25 stb Exp $
#
PKGNAME= setiathome-0.46
@@ -15,6 +15,10 @@ MAINTAINER= stb@freebsd.org
ONLY_FOR_ARCHS= i386
+EXTRACT_CMD= tar
+EXTRACT_BEFORE_ARGS= -xf
+EXTRACT_AFTER_ARGS=
+
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 310000
@@ -44,6 +48,10 @@ NO_BUILD= "binary distribution"
MAN1= setiathome.1
+.if !defined(PACKAGE_BUILDING)
+IS_INTERACTIVE= yes
+.endif
+
pre-fetch:
@if [ -z "${DISTFILES}" ]; then \
${ECHO} "It seems you are running FreeBSD `uname -r`, which is not currently"; \
@@ -58,6 +66,7 @@ do-install:
${INSTALL_MAN} ${FILESDIR}/setiathome.1 ${MAN1PREFIX}/man/man1
post-install:
- @PKG_PREFIX=${PREFIX} ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
+ @PKG_PREFIX=${PREFIX} PACKAGE_BUILDING=${PACKAGE_BUILDING} \
+ ${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL
.include <bsd.port.post.mk>
diff --git a/astro/setiathome/pkg-install b/astro/setiathome/pkg-install
index 714e9eaf9960..adb539464788 100644
--- a/astro/setiathome/pkg-install
+++ b/astro/setiathome/pkg-install
@@ -34,10 +34,22 @@ case \$1 in
;;
stop)
killall setiathome
+ ;;
+ register)
+ mkdir -p \${DBDIR}
+ chown \${USER} \${DBDIR}
+ chmod 755 \${DBDIR}
+
+ su -m nobody -c "cd \${DBDIR} && \${PREFIX}/bin/setiathome -login"
+ ;;
esac
EOF
chmod +x ${RCD}
+ if [ -n "${PACKAGE_BUILDING}" ]; then
+ exit 0
+ fi
+
echo "**** SETI@home requires a working directory for temporary files and"
echo " a brief registration process."
echo " Would you like to set up a working directory in ${DBDIR},"
@@ -47,20 +59,17 @@ EOF
echo ""
if [ "$a" = "N" -o "$a" = "n" ]; then
echo ""
- echo "Please set up the working directory yourself. See setiathome(1)"
- echo "for details."
+ echo "Please set up the working directory yourself. You can use"
+ echo "${RCD} register"
+ echo "to do so. See setiathome(1) for details."
exit 0
fi
- mkdir -p ${DBDIR}
- chown ${USER} ${DBDIR}
- chmod 755 ${DBDIR}
-
- su -m nobody -c "cd ${DBDIR} && ${PKG_PREFIX}/bin/setiathome -login"
+ ${RCD} register
if [ ! -f ${DBDIR}/user_info.txt ]; then
echo "unable to start setiathome: it seems registration or login failed."
- exit 72
+ exit 0
fi
${RCD} start >/dev/null
echo
diff --git a/astro/setiathome/pkg-plist b/astro/setiathome/pkg-plist
index 6e0e7bcdf308..f76e3829f73a 100644
--- a/astro/setiathome/pkg-plist
+++ b/astro/setiathome/pkg-plist
@@ -1 +1,2 @@
bin/setiathome
+etc/rc.d/setiathome.sh