mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
parent
9fc4eeb75a
commit
c0ed8cec30
7 changed files with 287 additions and 0 deletions
136
community/boinc/PKGBUILD
Normal file
136
community/boinc/PKGBUILD
Normal file
|
@ -0,0 +1,136 @@
|
|||
# $Id$
|
||||
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
||||
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
|
||||
# Contributor: Michal Krenek <mikos@sg1.cz>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - set boinc alternate platform to match their platforms:
|
||||
# https://boinc.berkeley.edu/trac/wiki/BoincPlatforms
|
||||
|
||||
pkgbase=boinc
|
||||
pkgname=(boinc boinc-nox)
|
||||
pkgver=7.6.12
|
||||
_tag="client_release/7.6/$pkgver"
|
||||
pkgrel=1.1
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://boinc.berkeley.edu/"
|
||||
license=('LGPL')
|
||||
makedepends=('libxslt' 'perl-xml-sax' 'git' 'libxss' 'libnotify' 'wxgtk' 'webkitgtk2' 'sqlite3' 'curl' 'inetutils' 'libxmu' 'freeglut' 'glu' 'mesa')
|
||||
install=$pkgbase.install
|
||||
options=('!staticlibs')
|
||||
source=("git+https://github.com/BOINC/boinc.git#tag=$_tag"
|
||||
boinc.bash
|
||||
boinc.desktop
|
||||
boinc.service
|
||||
boinc.sysusers
|
||||
boinc-AM_CONDITIONAL.patch)
|
||||
md5sums=('SKIP'
|
||||
'4d00e1aa4090a3f51feb20f5a541b9ee'
|
||||
'db62de2f08117e6379a3c613b58fa7ff'
|
||||
'3d5cbab785cc8b004661b17c65883fd5'
|
||||
'240f952d38c5814cc3d8cd1668fe2154'
|
||||
'e27047518dec54d4db38816487a28661')
|
||||
|
||||
prepare() {
|
||||
cd "$srcdir/$pkgbase"
|
||||
patch -Np1 -i "${srcdir}/boinc-AM_CONDITIONAL.patch"
|
||||
|
||||
./_autosetup
|
||||
|
||||
cp -r "$srcdir/$pkgbase" "$srcdir/$pkgbase-nox"
|
||||
}
|
||||
|
||||
build() {
|
||||
if [[ $CARCH == "arm" ]]; then
|
||||
CONFIG="--with-boinc-alt-platform=arm-linux-gnueabisf"
|
||||
else
|
||||
CONFIG="--with-boinc-alt-platform=arm-linux-gnueabihf"
|
||||
fi
|
||||
|
||||
cd "$srcdir/$pkgbase"
|
||||
LDFLAGS='-lX11' ./configure \
|
||||
--prefix=/usr \
|
||||
--enable-libraries \
|
||||
--enable-unicode \
|
||||
--enable-shared \
|
||||
--enable-dynamic-client-linkage \
|
||||
--enable-client \
|
||||
--enable-manager \
|
||||
--disable-static \
|
||||
--disable-server \
|
||||
--with-ssl \
|
||||
--with-x \
|
||||
--with-wxdir=/usr/lib \
|
||||
--with-wx-config=$(which wx-config) \
|
||||
${CONFIG}
|
||||
make
|
||||
|
||||
# Build boinc-nox
|
||||
cd "$srcdir/$pkgbase-nox"
|
||||
PKG_CONFIG=/usr/bin/pkg-config ./configure \
|
||||
--prefix=/usr \
|
||||
--enable-libraries \
|
||||
--enable-unicode \
|
||||
--enable-shared \
|
||||
--enable-dynamic-client-linkage \
|
||||
--enable-client \
|
||||
--disable-server \
|
||||
--disable-xss \
|
||||
--disable-static \
|
||||
--disable-manager \
|
||||
--with-ssl \
|
||||
--without-wxdir \
|
||||
--without-x \
|
||||
${CONFIG}
|
||||
make
|
||||
}
|
||||
|
||||
package_boinc() {
|
||||
pkgdesc="Berkeley Open Infrastructure for Network Computing for desktop"
|
||||
depends=("libxss" "libnotify" "wxgtk" "webkitgtk2" "curl" "sqlite3")
|
||||
|
||||
cd $pkgbase
|
||||
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
#install systemd unit
|
||||
install -Dm644 "${srcdir}/$pkgbase.service" "${pkgdir}/usr/lib/systemd/system/$pkgbase.service"
|
||||
|
||||
#install sysusers conf
|
||||
install -Dm644 "${srcdir}/$pkgbase.sysusers" "${pkgdir}/usr/lib/sysusers.d/$pkgbase.conf"
|
||||
|
||||
#install bash-completion
|
||||
install -Dm644 "${srcdir}/$pkgbase.bash" "${pkgdir}/usr/share/bash-completion/completions/$pkgbase"
|
||||
|
||||
#install .desktop File
|
||||
install -Dm644 "${srcdir}/${pkgbase}.desktop" "${pkgdir}/usr/share/applications/${pkgbase}.desktop"
|
||||
|
||||
#install icons
|
||||
install -Dm644 "${srcdir}/${pkgbase}/packages/generic/sea/boincmgr.48x48.png" "${pkgdir}/usr/share/pixmaps/$pkgbase.png"
|
||||
|
||||
#remove initscripts stuff
|
||||
rm -rf "$pkgdir/etc"
|
||||
}
|
||||
|
||||
package_boinc-nox() {
|
||||
pkgdesc="Berkeley Open Infrastructure for Network Computing for desktop without Xorg dependencies"
|
||||
depends=("curl" "libjpeg-turbo")
|
||||
provides=("boinc")
|
||||
conflicts=("boinc")
|
||||
|
||||
cd $pkgbase-nox
|
||||
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
#install systemd unit
|
||||
install -Dm644 "${srcdir}/$pkgbase.service" "${pkgdir}/usr/lib/systemd/system/$pkgbase.service"
|
||||
|
||||
#install sysusers conf
|
||||
install -Dm644 "${srcdir}/$pkgbase.sysusers" "${pkgdir}/usr/lib/sysusers.d/$pkgbase.conf"
|
||||
|
||||
#install bash-completion
|
||||
install -Dm644 "${srcdir}/$pkgbase.bash" "${pkgdir}/usr/share/bash-completion/completions/$pkgbase"
|
||||
|
||||
#remove initscripts stuff
|
||||
rm -rf "$pkgdir/etc"
|
||||
}
|
19
community/boinc/boinc-AM_CONDITIONAL.patch
Normal file
19
community/boinc/boinc-AM_CONDITIONAL.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
--- A/configure.ac
|
||||
+++ B/configure.ac
|
||||
@@ -39,6 +39,7 @@ AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_F77
|
||||
AC_PROG_CPP
|
||||
+AC_PROG_OBJCXX
|
||||
AC_PROG_MAKE_SET
|
||||
SAH_LINKS
|
||||
AC_LANG_PUSH(C)
|
||||
@@ -744,6 +745,8 @@ AM_CONDITIONAL(ENABLE_LIBRARIES, [test "
|
||||
AM_CONDITIONAL(INSTALL_HEADERS, [test "${enable_install_headers}" = yes])
|
||||
AM_CONDITIONAL(HAVE_CUDA_LIB, [test "${enable_client}" = yes -a -f ./coprocs/CUDA/posix/${boinc_platform}/libcudart.so])
|
||||
|
||||
+PKG_CHECK_MODULES([GTK2], [gtk+-2.0])
|
||||
+
|
||||
dnl ======================================================================
|
||||
dnl some more vodoo required for building portable client-binary (client, clientgui)
|
||||
dnl ======================================================================
|
99
community/boinc/boinc.bash
Normal file
99
community/boinc/boinc.bash
Normal file
|
@ -0,0 +1,99 @@
|
|||
# Source this file in BASH to get command completion (using tab) for
|
||||
# boinc and boinccmd. Written by Frank S. Thomas <fst@debian.org>.
|
||||
# See also: http://boinc.berkeley.edu/trac/wiki/BashCommandCompletion
|
||||
|
||||
_boinc()
|
||||
{
|
||||
local cur prev opts
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
||||
opts="$(boinc_client --help | \
|
||||
sed -n -r 's/^[[:space:]]*(--[a-z_]*).*/\1/p')"
|
||||
|
||||
# Handle options that require one or more arguments.
|
||||
case "$prev" in
|
||||
--attach_project|--detach_project|--reset_project|--update_prefs|\
|
||||
--gui_rpc_port)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
# Handle options that require two arguments.
|
||||
if [[ COMP_CWORD -gt 1 ]]; then
|
||||
pprev="${COMP_WORDS[COMP_CWORD-2]}"
|
||||
|
||||
case "$pprev" in
|
||||
--attach_project)
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
complete -F _boinc -o default boinc_client
|
||||
|
||||
_boinccmd()
|
||||
{
|
||||
local cur prev opts cmds
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
||||
opts="--host --passwd -h --help -V --version"
|
||||
cmds="$(boinc_cmd --help 2>&1 | \
|
||||
sed -n -r 's/^[[:space:]]*(--[a-z_]*).*/\1/p')"
|
||||
|
||||
# The following construct assures that:
|
||||
# - no command follows if one of $opts or $cmds was given
|
||||
# - after --host follows only one command or --passwd and one command
|
||||
# - after --passwd follows only one command
|
||||
if [[ $COMP_CWORD -eq 1 ]]; then
|
||||
COMPREPLY=( $(compgen -W "$opts $cmds" -- "$cur") )
|
||||
return 0
|
||||
else
|
||||
if [[ "${COMP_WORDS[@]}" =~ ".* --host .* --passwd .*" ]]; then
|
||||
if [[ $COMP_CWORD -eq 5 ]]; then
|
||||
COMPREPLY=( $(compgen -W "$cmds" -- "$cur") )
|
||||
fi
|
||||
elif [[ "${COMP_WORDS[@]}" =~ ".* --passwd .*" ]]; then
|
||||
if [[ $COMP_CWORD -eq 3 ]]; then
|
||||
COMPREPLY=( $(compgen -W "$cmds" -- "$cur") )
|
||||
fi
|
||||
elif [[ "${COMP_WORDS[@]}" =~ ".* --host .*" ]]; then
|
||||
if [[ $COMP_CWORD -eq 3 ]]; then
|
||||
COMPREPLY=( $(compgen -W "--passwd $cmds" -- "$cur") )
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Handle options/commands that require one or more arguments.
|
||||
case "$prev" in
|
||||
--get_messages|--passwd)
|
||||
return 0
|
||||
;;
|
||||
|
||||
--host)
|
||||
_known_hosts
|
||||
return 0
|
||||
;;
|
||||
|
||||
--set_run_mode|--set_network_mode)
|
||||
COMPREPLY=( $(compgen -W "always auto never" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
|
||||
--set_screensaver_mode)
|
||||
COMPREPLY=( $(compgen -W "on off" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
}
|
||||
complete -F _boinccmd boinc_cmd
|
||||
|
||||
# vim: syntax=sh
|
16
community/boinc/boinc.desktop
Normal file
16
community/boinc/boinc.desktop
Normal file
|
@ -0,0 +1,16 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.0
|
||||
Exec=/usr/bin/boincmgr
|
||||
Path=/var/lib/boinc
|
||||
Icon=boinc
|
||||
Categories=System;Monitor;GTK;
|
||||
Name=BOINC Manager
|
||||
GenericName=BOINC monitor and control utility
|
||||
GenericName[cs]=Monitorovací a ovládací nástroj pro BOINC
|
||||
GenericName[de]=BOINC Überwachungs- und Kontrollprogramm
|
||||
GenericName[pt]=Monitorização BOINC e utilitário de controlo
|
||||
Comment=Configure or monitor a BOINC core client
|
||||
Comment[cs]=Monitoruje a nastavuje klienta BOINC
|
||||
Comment[de]=BOINC Basis Client konfigurieren oder überwachen
|
||||
Comment[pt]=Configurar ou monitorizar o cliente básico do BOINC
|
5
community/boinc/boinc.install
Normal file
5
community/boinc/boinc.install
Normal file
|
@ -0,0 +1,5 @@
|
|||
post_install() {
|
||||
systemd-sysusers boinc.conf
|
||||
mkdir -p var/lib/boinc
|
||||
chown -R boinc:boinc var/lib/boinc
|
||||
}
|
10
community/boinc/boinc.service
Normal file
10
community/boinc/boinc.service
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=BOINC Daemon
|
||||
|
||||
[Service]
|
||||
User=boinc
|
||||
Nice=19
|
||||
ExecStart=/usr/bin/boinc_client --dir /var/lib/boinc --redirectio
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
2
community/boinc/boinc.sysusers
Normal file
2
community/boinc/boinc.sysusers
Normal file
|
@ -0,0 +1,2 @@
|
|||
u boinc - "BOINC Daemon" /var/lib/boinc
|
||||
g boinc -
|
Loading…
Reference in a new issue