[Midnightbsd-cvs] mports: mports/net: add boinc-client

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Oct 2 09:32:42 EDT 2008


Log Message:
-----------
add boinc-client

Modified Files:
--------------
    mports/net:
        Makefile (r1.89 -> r1.90)

Added Files:
-----------
    mports/net/boinc-client:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-message (r1.1)
        pkg-plist (r1.1)
    mports/net/boinc-client/files:
        boinc.sh.in (r1.1)
        pkg-install.in (r1.1)

-------------- next part --------------
--- /dev/null
+++ net/boinc-client/pkg-message
@@ -0,0 +1,8 @@
+The BOINC client is now installed.  You now need to register with
+and install one or more projects.
+
+Refer to the BOINC web page at:
+	http://boinc.berkeley.edu/
+
+SETI at HOME is available in port astro/boinc-setiathome.
+Einstein at Home is available for i386 users in astro/boinc-einsteinathome port.
--- /dev/null
+++ net/boinc-client/pkg-descr
@@ -0,0 +1,8 @@
+BOINC is a software platform for distributed computing using volunteer
+computer resources.
+
+Many different projects can use BOINC.  SETI at HOME, for example, has
+been redesigned to use BOINC and the astro/boinc-setiathome port
+supercedes the astro/setiathome port.
+
+WWW: http://boinc.berkeley.edu/
--- /dev/null
+++ net/boinc-client/pkg-plist
@@ -0,0 +1,38 @@
+bin/boinc_client
+bin/boinc_cmd
+bin/crypt_prog
+bin/switcher
+%%BOINC_GUI%%bin/boinc_gui
+include/BOINC/app_ipc.h
+include/BOINC/boinc_api.h
+include/BOINC/boinc_win.h
+include/BOINC/boinc_zip.h
+include/BOINC/common_defs.h
+include/BOINC/config.h
+include/BOINC/coproc.h
+include/BOINC/crypt.h
+include/BOINC/diagnostics.h
+include/BOINC/error_numbers.h
+include/BOINC/filesys.h
+include/BOINC/graphics2.h
+include/BOINC/gui_rpc_client.h
+include/BOINC/gutil.h
+include/BOINC/hostinfo.h
+include/BOINC/mfile.h
+include/BOINC/miofile.h
+include/BOINC/msg_log.h
+include/BOINC/parse.h
+include/BOINC/prefs.h
+include/BOINC/proxy_info.h
+include/BOINC/std_fixes.h
+include/BOINC/str_util.h
+include/BOINC/version.h
+include/BOINC/util.h
+lib/libboinc.a
+lib/libboinc_api.a
+%%BOINC_GUI%%lib/libboinc_graphics2.a
+lib/libboinc_zip.a
+ at dirrm include/BOINC
+ at unexec if [ -d %%BOINC_HOME%% ]; then echo "If you are deinstalling boinc completely, remove the %%BOINC_HOME%% directory."; fi
+ at unexec if [ -d %%BOINC_HOME%% ]; then echo -n "Also, d"; else echo -n "D"; fi
+ at unexec echo "on't forget to remove the \"%%BOINC_USER%%\" user."
--- /dev/null
+++ net/boinc-client/Makefile
@@ -0,0 +1,84 @@
+# New ports collection makefile for:	boinc
+# Date created:				01 October 2004
+# Whom:					J.R. Oldroyd <fbsd at opal.com>
+#
+# $MidnightBSD: mports/net/boinc-client/Makefile,v 1.1 2008/10/02 13:32:39 laffer1 Exp $
+# $FreeBSD: ports/net/boinc-client/Makefile,v 1.35 2008/08/06 08:29:56 pav Exp $
+#
+
+PORTNAME=	boinc-client
+PORTVERSION=	6.2.14
+CATEGORIES=	net
+MASTER_SITES=	${MASTER_SITE_FREEBSD_LOCAL}
+MASTER_SITE_SUBDIR=	pav
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Berkeley Open Infrastructure for Network Computing client
+LICENSE=	gpl2
+
+LIB_DEPENDS=	curl:${PORTSDIR}/ftp/curl
+
+USE_BZIP2=	yes
+USE_GNOME=	gnometarget
+GNU_CONFIGURE=	yes
+
+BOINC_USER?=	boinc
+BOINC_GROUP?=	nobody
+BOINC_HOME?=	/var/db/boinc
+
+PLIST_SUB=	BOINC_HOME="${BOINC_HOME}" BOINC_USER="${BOINC_USER}" BOINC_GROUP="${BOINC_GROUP}"
+
+SUB_FILES=	pkg-install
+SUB_LIST=	BOINC_HOME="${BOINC_HOME}" BOINC_USER="${BOINC_USER}" BOINC_GROUP="${BOINC_GROUP}"
+
+USE_RC_SUBR=	boinc.sh
+
+CONFIGURE_ARGS=	--disable-server
+CPPFLAGS+=	-I${LOCALBASE}/include
+CXXFLAGS:=	${CXXFLAGS:N-O*:N-f*} -O3
+CFLAGS:=	${CFLAGS:N-O*:N-f*} -O3
+CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" CXXFLAGSS="${CXXFLAGS}" CFLAGS="${CFLAGS}"
+
+OPTIONS=	X11 "Build Boinc Manager GUI" on \
+		ALT "Accept Linux science applications" off
+
+.include <bsd.port.pre.mk>
+
+.if !defined(WITHOUT_X11)
+USE_XORG=	x11
+USE_WX=		2.6+
+WX_CONF_ARGS=	absolute
+CPPFLAGS+=		-I${LOCALBASE}/include
+
+USE_ICONV=	yes
+LIB_DEPENDS+=	jpeg:${PORTSDIR}/graphics/jpeg \
+		glut:${PORTSDIR}/graphics/libglut
+
+PLIST_SUB+=	BOINC_GUI=""
+.else
+CONFIGURE_ARGS+=	--with-wx-config=false --without-x
+PLIST_SUB+=	BOINC_GUI="@comment "
+.endif
+
+.if defined(WITH_ALT)
+CONFIGURE_ARGS+=--with-boinc-alt-platform=i686-pc-linux-gnu
+USE_LINUX=	yes
+.endif
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|gui_rpc_auth.cfg|${BOINC_HOME}/gui_rpc_auth.cfg|g' \
+		${WRKSRC}/client/file_names.h ${WRKSRC}/lib/boinc_cmd.C \
+		${WRKSRC}/clientgui/MainDocument.cpp
+	@${REINPLACE_CMD} -e 's|../curl/ca-bundle.crt||' ${WRKSRC}/client/Makefile.in
+	@${REINPLACE_CMD} -e 's|ca-bundle.crt|${LOCALBASE}/share/curl/curl-ca-bundle.crt|' ${WRKSRC}/client/http_curl.C
+	@${REINPLACE_CMD} -e 's|<malloc.h>|<stdlib.h>|' ${WRKSRC}/clientgui/stdwx.h
+
+# kill -O3 from clientgui build, it triggers some optimization bug and segfaults on runtime with -O3
+post-configure:
+	@${REINPLACE_CMD} -e 's|-O3 ||' ${WRKSRC}/clientgui/Makefile
+
+post-install:
+	${INSTALL_DATA} ${WRKSRC}/version.h ${PREFIX}/include/BOINC
+	@PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ net/boinc-client/distinfo
@@ -0,0 +1,3 @@
+MD5 (boinc-client-6.2.14.tar.bz2) = 547b704a2f393b4d75277270975bf322
+SHA256 (boinc-client-6.2.14.tar.bz2) = 20639ebaf4173d0fe7fa988fea368e540a0b4c7dd2ee25a46f36de6ce112008e
+SIZE (boinc-client-6.2.14.tar.bz2) = 4246362
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/net/Makefile,v
retrieving revision 1.89
retrieving revision 1.90
diff -L net/Makefile -L net/Makefile -u -r1.89 -r1.90
--- net/Makefile
+++ net/Makefile
@@ -11,6 +11,7 @@
     SUBDIR += avahi-gtk
     SUBDIR += avahi-libdns
     SUBDIR += avahi-qt3
+    SUBDIR += boinc-client
     SUBDIR += cvsup
     SUBDIR += cvsup-without-gui
     SUBDIR += dhcp6
--- /dev/null
+++ net/boinc-client/files/pkg-install.in
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+username=%%BOINC_USER%%
+group=%%BOINC_GROUP%%
+home=%%BOINC_HOME%%
+shell=/bin/sh
+
+case $2 in
+POST-INSTALL)
+    if ! pw usershow ${username} >/dev/null 2>&1; then
+	if ! pw useradd ${username} -g ${group} -c BOINC -d ${home} -s ${shell}; then
+		err=$?
+		echo "WARNING: Unable to create user.  pw returned $err"
+		echo "You will need to create a boinc user and chown the boinc dir."
+		exit $err
+	else
+		echo "boinc user created."
+	fi
+    else
+	echo "boinc user found.  using existing boinc user."
+    fi
+    mkdir -p ${home} ${home}/projects
+    chown ${username}:${group} ${home} ${home}/projects
+    ;;
+esac
--- /dev/null
+++ net/boinc-client/files/boinc.sh.in
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# $MidnightBSD: mports/net/boinc-client/files/boinc.sh.in,v 1.1 2008/10/02 13:32:39 laffer1 Exp $
+# $FreeBSD: ports/net/boinc-client/files/boinc.sh.in,v 1.4 2006/03/15 10:44:46 pav Exp $
+
+# PROVIDE: boinc
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+. %%RC_SUBR%%
+
+name="boinc"
+rcvar=`set_rcvar`
+
+boinc_user=%%BOINC_USER%%
+boinc_home=%%BOINC_HOME%%
+boinc_flags="-dir ${boinc_home}"
+program_file=boinc_client
+program_path=%%PREFIX%%/bin/${program_file}
+syslog_facility=daemon.err
+
+load_rc_config $name
+: ${boinc_enable="NO"}
+
+start_cmd=boinc_start
+stop_cmd=boinc_stop
+
+boinc_start() {
+	if checkyesno boinc_enable
+	then
+		if [ ! -x ${program_path} ]
+		then
+			logger -sp ${syslog_facility} -t ${program_file} \
+				"unable to start: ${program_path} is missing."
+			exit 72
+		fi
+		if ps axo ucomm | egrep ${program_file}; then
+			logger -sp ${syslog_facility} -t ${program_file} \
+			"unable to start: ${program_file} is already running."
+			exit 72
+		fi
+		echo "Starting BOINC client."
+		idprio 31 su - ${boinc_user} -c "${program_path} ${boinc_flags} >/dev/null &"
+	fi
+}
+
+boinc_stop() {
+	killall ${program_file} 2> /dev/null
+}
+
+run_rc_command "$1"


More information about the Midnightbsd-cvs mailing list