aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--astro/setiathome/Makefile106
-rw-r--r--astro/setiathome/distinfo.alpha1
-rw-r--r--astro/setiathome/files/rc.setiathome.conf2
-rw-r--r--astro/setiathome/files/setiathome.sh6
-rw-r--r--astro/setiathome/pkg-install10
-rw-r--r--astro/setiathome/pkg-message6
-rw-r--r--astro/setiathome/pkg-plist12
7 files changed, 101 insertions, 42 deletions
diff --git a/astro/setiathome/Makefile b/astro/setiathome/Makefile
index 4002c7ad3403..83ad1fedc703 100644
--- a/astro/setiathome/Makefile
+++ b/astro/setiathome/Makefile
@@ -5,9 +5,9 @@
# $FreeBSD$
PORTNAME= setiathome
-PORTVERSION= 3.03
-PORTREVISION= 3
-CATEGORIES= astro
+PORTVERSION?= 3.03
+PORTREVISION?= 4
+CATEGORIES?= astro
MASTER_SITES= ftp://ftp.cdrom.com/pub/setiathome/ \
ftp://alien.ssl.berkeley.edu/pub/ \
ftp://setidata.ssl.berkeley.edu/pub/ \
@@ -26,10 +26,10 @@ MAINTAINER?= cyrille.lefevre@laposte.net
IS_INTERACTIVE= yes
.endif
-ONLY_FOR_ARCHS= i386
+ONLY_FOR_ARCHS?= alpha i386
-NO_BUILD= "binary distribution"
-NO_CDROM= "interactive install"
+NO_BUILD= binary distribution
+NO_CDROM= interactive install
.if ${OSVERSION} <= 226000
BROKEN= "currently supports only FreeBSD 2.2.6 and above"
@@ -40,7 +40,8 @@ EXTRACT_BEFORE_ARGS=
STRIP= # aout is already stripped
SCRIPTS_ENV+= PKG_PREFIX=${PREFIX}
-PLIST_SUB= X11PORTS=${X11PORTS}
+PLIST_SUB= X11PORTS=${X11PORTS} \
+ PREFX="${PKGNAMEPREFIX}" SUFX="${PKGNAMESUFFIX}"
MAN1= ${PORTNAME}.1
@@ -48,16 +49,46 @@ MSG_FILE= ${PKGDIR}/pkg-message
PKGMESSAGE= ${WRKDIR}/pkg-message
PKGDEINSTALL= ${PKGINSTALL}
-# Local variables
+# Port specific variables
#
-PORT_CPU= ${ARCH}
-PORT_VENDOR= unknown
-PORT_OSNAME= freebsd
-PORT_OSREL= 2.2.8
+PORT_CPU?= ${ARCH}
+.if ${ARCH} == alpha
+PORT_VENDOR= compaq
+PORT_OSNAME= T64U
+PORT_OSREL= v4.0d
+.else
+PORT_VENDOR?= unknown
+PORT_OSNAME?= freebsd
+PORT_OSREL?= 2.2.8
+.endif
PORT_OS= ${PORT_OSNAME}${PORT_OSREL}
PORT_HOST= ${PORT_CPU}-${PORT_VENDOR}-${PORT_OS}
+# Arch/OS specific variables
+#
+
+.if ${ARCH} != i386
+MD5_FILE= ${MASTERDIR}/distinfo.${ARCH}
+.elif ${PORT_OSNAME} != freebsd
+PKGNAMEPREFIX= ${PORT_OSNAME}-
+PKGNAMESUFFIX= -${PORT_CPU}
+MD5_FILE= ${.CURDIR}/distinfo
+COMMENT= ${.CURDIR}/pkg-comment
+DESCR= ${.CURDIR}/pkg-descr
+.if ${PORT_OSNAME} == linux
+.if !exists(${LINUXBASE}/usr/X11R6/lib/libXaw.so.7)
+NO_XBIN= libXaw.so.7 is missing from linux_base-6
+.endif
+NO_XBIN?= xsetiathome is broken
+.endif
+.elif ${OSVERSION} >= 300000
+NO_XBIN= xsetiathome is broken
+.endif
+
+# Local variables
+#
+
SBIN_DIR= ${PREFIX}/sbin
CONF_DIR= ${PREFIX}/etc
RC_DIR= ${PREFIX}/etc/rc.d
@@ -67,28 +98,38 @@ SAMP_SUFX= .sample
BIN_FILE= setiathome
RC_FILES= setiathome
+# i386 NOTES:
# xsetiathome is currently broken at 4.2. should work at 2.x,
# don't know between 3.0 and 4.2 ? so, be conservative...
# diagnostic messages are :
# Warning: Cannot convert string "doneB" to type Widget
# Floating point exception (core dumped)
+# Linux NOTES:
+# xsetiathome requires libXawk.so.7 which is missing from linux_base-6.
+# using linux_base-7, diagnostic messages are :
+# Warning: Cannot convert string "doneB" to type Widget
+# Shared memory segment doesn't exist. errno=2
+# Couldn't attach to the science process!
-.if ${OSVERSION} < 300000
+.if !defined(NO_XBIN)
MAN1+= x${PORTNAME}.1
XBIN_DIR= ${PREFIX}/bin
-XBIN_FILE+= xsetiathome
+XBIN_FILE= xsetiathome
X11PORTS=
.else
X11PORTS= "@comment "
.endif
-#
+# Post-patch
#
post-patch: patch-message
patch-message:
- @${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE}
+ @${SED} 's|%%PREFIX%%|${PREFIX}|g; \
+ s|%%PREFX%%|${PKGNAMEPREFIX}|g; \
+ s|%%SUFX%%|${PKGNAMESUFFIX}|g' \
+ ${MSG_FILE} > ${PKGMESSAGE}
# Install
#
@@ -96,18 +137,20 @@ patch-message:
do-install: install-daemon install-program install-man
install-daemon:
- @${INSTALL_PROGRAM} ${WRKSRC}/${BIN_FILE} ${SBIN_DIR}
+ @${INSTALL_PROGRAM} ${WRKSRC}/${BIN_FILE} \
+ ${SBIN_DIR}/${PKGNAMEPREFIX}${BIN_FILE}${PKGNAMESUFFIX}
install-program:
-.if defined(XPROG)
- @${INSTALL_PROGRAM} ${WRKSRC}/${XBIN_FILE} ${XBIN_DIR}
+.if defined(XBIN_FILE)
+ @${INSTALL_PROGRAM} ${WRKSRC}/${XBIN_FILE} \
+ ${XBIN_DIR}/${PKGNAMEPREFIX}${XBIN_FILE}${PKGNAMESUFFIX}
.endif
install-man:
.for mansect in 1
.for man in ${MAN${mansect}}
@${INSTALL_MAN} ${FILESDIR}/${man} \
- ${MAN${mansect}PREFIX}/man/man${mansect}
+ ${MAN${mansect}PREFIX}/man/man${mansect}
.endfor
.endfor
@@ -120,13 +163,18 @@ install-startup-files:
.for file in ${RC_FILES}
.if exists(${FILESDIR}/rc.${file}.conf)
@${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf \
- ${CONF_DIR}/rc.${file}.conf${SAMP_SUFX}
-.if !exists(${CONF_DIR}/rc.${file}.conf)
- @${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf ${CONF_DIR}
+ ${CONF_DIR}/rc.${PKGNAMEPREFIX}${file}${PKGNAMESUFFIX}.conf${SAMP_SUFX}
+.if !exists(${CONF_DIR}/rc.${PKGNAMEPREFIX}${file}${PKGNAMESUFFIX}.conf)
+ @${INSTALL_DATA} ${FILESDIR}/rc.${file}.conf \
+ ${CONF_DIR}/rc.${PKGNAMEPREFIX}${file}${PKGNAMESUFFIX}.conf
.endif
.endif
+.if defined(PKGNAMEPREFIX) && !empty(PKGNAMEPREFIX)
+ -@${CHMOD} -x ${RC_DIR}/*${file}*.sh 2> /dev/null
+.endif
.if exists(${FILESDIR}/${file}.sh)
- @${INSTALL_SCRIPT} ${FILESDIR}/${file}.sh ${RC_DIR}
+ @${INSTALL_SCRIPT} ${FILESDIR}/${file}.sh \
+ ${RC_DIR}/${PKGNAMEPREFIX}${file}${PKGNAMESUFFIX}.sh
.endif
.endfor
@@ -137,7 +185,17 @@ configure-package:
display-message:
.if !defined(BATCH)
+ @${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
+ @${ECHO_MSG}
.endif
+# Maintainer use only
+#
+
+maintainer-makesum:
+.for arch in ${ONLY_FOR_ARCHS}
+ ${MAKE} ARCH=${arch} makesum
+.endfor
+
.include <bsd.port.post.mk>
diff --git a/astro/setiathome/distinfo.alpha b/astro/setiathome/distinfo.alpha
new file mode 100644
index 000000000000..ce9daf81ac1f
--- /dev/null
+++ b/astro/setiathome/distinfo.alpha
@@ -0,0 +1 @@
+MD5 (setiathome-3.03.alpha-compaq-T64Uv4.0d.tar) = 6d5fae078058da9620eb528ce2103a98
diff --git a/astro/setiathome/files/rc.setiathome.conf b/astro/setiathome/files/rc.setiathome.conf
index c36aea15b64c..399e84349984 100644
--- a/astro/setiathome/files/rc.setiathome.conf
+++ b/astro/setiathome/files/rc.setiathome.conf
@@ -3,7 +3,7 @@
# SETI@home startup configuration file.
#
-# seti_wrkdir=/var/db/setiathome # primary working directory
+# seti_wrkdir=/var/db/${rc_file%.sh} # primary working directory
# seti_std_args=-email # command arguments for standard mode
# seti_reg_args=-login # command arguments for register mode
# seti_proxy_args= # proxy arguments
diff --git a/astro/setiathome/files/setiathome.sh b/astro/setiathome/files/setiathome.sh
index 46313a1080c7..25a98dc737e2 100644
--- a/astro/setiathome/files/setiathome.sh
+++ b/astro/setiathome/files/setiathome.sh
@@ -9,7 +9,7 @@ rc_file=${0##*/}
rc_arg=$1
# override these variables in ${PREFIX}/etc/rc.setiathome.conf
-seti_wrkdir=/var/db/setiathome # primary working directory
+seti_wrkdir=/var/db/${rc_file%.sh} # primary working directory
seti_std_args=-email # command arguments for standard mode
seti_reg_args=-login # command arguments for register mode
seti_proxy_args= # proxy arguments
@@ -32,7 +32,7 @@ if [ -f ${rcconf_path} ]; then
fi
program_dir=${PREFIX}/sbin
-program_file=setiathome
+program_file=${rc_file%.sh}
program_path=${program_dir}/${program_file}
syslog_facility=daemon.err
@@ -93,7 +93,7 @@ restart)
;;
status)
- ps -auxww | egrep ${program_file} | egrep -v "($0|egrep)"
+ ps auxww | egrep ${program_file} | egrep -v "($0|egrep)"
;;
register)
diff --git a/astro/setiathome/pkg-install b/astro/setiathome/pkg-install
index 9efc10fb666d..151035f60526 100644
--- a/astro/setiathome/pkg-install
+++ b/astro/setiathome/pkg-install
@@ -9,16 +9,16 @@
[ -z "${PKG_PREFIX}" ] && exit 1
[ -n "${BATCH}" ] && exit 0
-PKG_NAME=$1
+PKG_NAME=${1%%-[0-9._]*}
PKG_ACTION=$2
# override these variables in ${PREFIX}/etc/rc.setiathome.conf
-seti_wrkdir=/var/db/setiathome # working directory
+seti_wrkdir=/var/db/${PKG_NAME} # working directory
seti_user=nobody # user id to run under
seti_maxprocs=$(sysctl -n hw.ncpu) # max. number of processes to start
rcconf_dir=${PKG_PREFIX}/etc
-rcconf_file=rc.setiathome.conf
+rcconf_file=rc.${PKG_NAME}.conf
rcconf_path=${rcconf_dir}/${rcconf_file}
if [ -f ${rcconf_path} ]; then
@@ -26,12 +26,12 @@ if [ -f ${rcconf_path} ]; then
fi
rc_dir=${PKG_PREFIX}/etc/rc.d
-rc_file=setiathome.sh
+rc_file=${PKG_NAME}.sh
rc_path=${rc_dir}/${rc_file}
ncpu=$(sysctl -n hw.ncpu)
-case "$PKG_ACTION" in
+case "${PKG_ACTION}" in
POST-INSTALL)
echo "**** SETI@home requires a working directory for temporary files and a"
diff --git a/astro/setiathome/pkg-message b/astro/setiathome/pkg-message
index 6c4b48d83879..dd2f16c4ad27 100644
--- a/astro/setiathome/pkg-message
+++ b/astro/setiathome/pkg-message
@@ -1,3 +1,3 @@
-**** %%PREFIX%%/etc/rc.setiathome.conf may be edited to tune some startup
- variables such as `seti_nice' defaulted to 15 and `seti_maxprocs'
- defaulted to your number of processors.
+**** %%PREFIX%%/etc/rc.%%PREFX%%setiathome%%SUFX%%.conf may be edited to
+ tune some startup variables such as `seti_nice' defaulted to 15
+ and `seti_maxprocs' defaulted to your number of processors.
diff --git a/astro/setiathome/pkg-plist b/astro/setiathome/pkg-plist
index 6248007da443..61991ecca6da 100644
--- a/astro/setiathome/pkg-plist
+++ b/astro/setiathome/pkg-plist
@@ -1,6 +1,6 @@
-sbin/setiathome
-@unexec if cmp -s %D/etc/rc.setiathome.conf %D/etc/rc.setiathome.conf.sample; then rm -f %D/etc/rc.setiathome.conf; fi
-etc/rc.setiathome.conf.sample
-@exec [ -f %D/etc/rc.setiathome.conf ] || cp %D/etc/rc.setiathome.conf.sample %D/etc/rc.setiathome.conf
-etc/rc.d/setiathome.sh
-%%X11PORTS%%bin/xsetiathome
+sbin/%%PREFX%%setiathome%%SUFX%%
+@unexec if cmp -s %D/etc/rc.%%PREFX%%setiathome%%SUFX%%.conf %D/etc/rc.%%PREFX%%setiathome%%SUFX%%.conf.sample; then rm -f %D/etc/rc.%%PREFX%%setiathome%%SUFX%%.conf; fi
+etc/rc.%%PREFX%%setiathome%%SUFX%%.conf.sample
+@exec [ -f %D/etc/rc.%%PREFX%%setiathome%%SUFX%%.conf ] || cp %D/etc/rc.%%PREFX%%setiathome%%SUFX%%.conf.sample %D/etc/rc.%%PREFX%%setiathome%%SUFX%%.conf
+etc/rc.d/%%PREFX%%setiathome%%SUFX%%.sh
+%%X11PORTS%%bin/%%PREFX%%xsetiathome%%SUFX%%