Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jun 2002 02:42:19 +0200 (CEST)
From:      Cyrille Lefevre <cyrille.lefevre@laposte.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/40022: Maintainer update: astro/setiathome (alpha and linux support added)
Message-ID:  <200206300042.g5U0gIrK082375@gits.gits.dyndns.org>

next in thread | raw e-mail | index | archive | help

>Number:         40022
>Category:       ports
>Synopsis:       Maintainer update: astro/setiathome (alpha and linux support added)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 29 17:50:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Cyrille Lefevre
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
ACME
>Environment:
System: FreeBSD gits 4.6-STABLE FreeBSD 4.6-STABLE #15: Sun Jun 23 06:31:23 CEST 2002 root@gits:/disk2/freebsd/src/sys/compile/CUSTOM i386

>Description:
	alpha and linux (i686) support added to the setiathome port.

	Makefile
		PORTREVISION bumped
		ONLY_FOR_ARCHS+= alpha
		PLIST_SUB+= PREFX and SUFX
		PKGNAMEPREFIX and SUFFIX added if linux
		ditto about installed files
	pkg-install
	files/rc.setiathome.conf
	files/setiathome.sh
		hardcoded setiathome changed to PKG_NAME w/o version number
	pkg-message
	pkg-plist
		PREFX and SUFX added

	PR #31229 linked to this one :
		http://www.FreeBSD.org/cgi/query-pr.cgi?pr=ports/31229
>How-To-Repeat:
	n/a
>Fix:
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/Makefile,v
retrieving revision 1.29
diff -u -r1.29 Makefile
--- Makefile	17 Jan 2002 23:13:35 -0000	1.29
+++ Makefile	30 Jun 2002 00:40:32 -0000
@@ -5,9 +5,9 @@
 # $FreeBSD: ports/astro/setiathome/Makefile,v 1.29 2002/01/17 23:13:35 dwcjr Exp $
 
 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 @@
 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 @@
 
 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 @@
 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 @@
 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 @@
 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 @@
 .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 @@
 
 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>
Index: pkg-install
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/pkg-install,v
retrieving revision 1.8
diff -u -r1.8 pkg-install
--- pkg-install	24 Aug 2001 13:39:27 -0000	1.8
+++ pkg-install	29 Jun 2002 21:55:24 -0000
@@ -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 @@
 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"
Index: pkg-message
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/pkg-message,v
retrieving revision 1.3
diff -u -r1.3 pkg-message
--- pkg-message	3 Sep 2001 02:12:06 -0000	1.3
+++ pkg-message	29 Jun 2002 21:36:55 -0000
@@ -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.
Index: pkg-plist
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/pkg-plist,v
retrieving revision 1.5
diff -u -r1.5 pkg-plist
--- pkg-plist	24 Aug 2001 13:39:27 -0000	1.5
+++ pkg-plist	29 Jun 2002 21:32:02 -0000
@@ -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%%
Index: files/rc.setiathome.conf
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/files/rc.setiathome.conf,v
retrieving revision 1.3
diff -u -r1.3 rc.setiathome.conf
--- files/rc.setiathome.conf	3 Sep 2001 02:12:09 -0000	1.3
+++ files/rc.setiathome.conf	29 Jun 2002 22:04:31 -0000
@@ -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
Index: files/setiathome.sh
===================================================================
RCS file: /home/ncvs/ports/astro/setiathome/files/setiathome.sh,v
retrieving revision 1.8
diff -u -r1.8 setiathome.sh
--- files/setiathome.sh	3 Sep 2001 02:12:10 -0000	1.8
+++ files/setiathome.sh	29 Jun 2002 23:07:48 -0000
@@ -9,7 +9,7 @@
 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 @@
 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 @@
 	;;
 
 status)
-	ps -auxww | egrep ${program_file} | egrep -v "($0|egrep)"
+	ps auxww | egrep ${program_file} | egrep -v "($0|egrep)"
 	;;
 
 register)
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206300042.g5U0gIrK082375>