PKGBUILDs/community/boinc/PKGBUILD
2020-03-16 19:52:03 +00:00

132 lines
4.1 KiB
Bash

# 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.16.3
_tag="client_release/7.16/$pkgver"
pkgrel=1
arch=('x86_64')
url="https://boinc.berkeley.edu/"
license=('LGPL')
makedepends=('curl' 'freeglut' 'glu' 'inetutils' 'libnotify' 'libnsl' 'libxmu' 'libxslt' 'libxss'
'mesa' 'perl-xml-sax' 'sqlite3' 'webkit2gtk' 'wxgtk3')
install=$pkgbase.install
options=('!staticlibs')
source=("$pkgbase-$pkgver.tar.gz::https://github.com/BOINC/boinc/archive/$_tag.tar.gz"
boinc.bash
boinc.desktop
boinc.sysusers)
sha512sums=('370744607234c0c03fce98aa0f6ff961eb364b3ee199fd6ab52423a15371665231e53c049e99f4bc992adbed48695c75cf930ecb1f4845b183216642f861102c'
'dec4bb6e571c2d99e1f57295149399eee03a8ec41b07ec3f7f197b910d246dcd6a5eb880301c9cd3a039d8c5aa6b07babf6ab4cae5f242c419c8cd71f56b90f5'
'b3fcd703a6f683d246242543c2f7b5fcfe403cb95b7786f1418b24c3dfb7c54c6b8c4816c0e9ae56b5ee4e4cae63f153ec522b04bf02f4f835dd90ac0e0ae204'
'85804d7e6b7e07f06e93e8c42507f5cd0b9415257d6ac7421603a2b6084699d847ae9720c1cf9e9793b750dfb768375116843b988b287ee7c66c1374e18f7934')
prepare() {
mv boinc-client_release-*-$pkgver $pkgbase-$pkgver
cp -a "$srcdir"/$pkgbase-$pkgver{,-nox}
cd $pkgbase-$pkgver
./_autosetup
# Prepare boinc-nox
cd "$srcdir"/$pkgbase-$pkgver-nox
# Don't force xss
sed -i 's/^ enable_xss="yes"$/ enable_xss="no"/' configure.ac
./_autosetup
}
build() {
if [[ $CARCH == "arm" ]]; then
CONFIG="--with-boinc-alt-platform=arm-unknown-linux-gnueabisf"
elif [[ $CARCH == "armv6h" || $CARCH == "armv7h" ]]; then
CONFIG="--with-boinc-alt-platform=arm-unknown-linux-gnueabihf"
fi
cd "$srcdir"/$pkgbase-$pkgver
LDFLAGS='-lX11' ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--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-gtk3) \
${CONFIG}
make
# Build boinc-nox
cd "$srcdir"/$pkgbase-$pkgver-nox
PKG_CONFIG=/usr/bin/pkg-config ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--enable-libraries \
--enable-unicode \
--enable-shared \
--enable-dynamic-client-linkage \
--enable-client \
--disable-server \
--disable-static \
--disable-manager \
--with-ssl \
--without-wxdir \
--without-x \
${CONFIG}
make
}
package_boinc() {
pkgdesc="Berkeley Open Infrastructure for Network Computing for desktop"
depends=('curl' 'libnotify' 'libnsl' 'libxss' 'sqlite3' 'webkit2gtk' 'wxgtk3')
cd $pkgbase-$pkgver
make DESTDIR="$pkgdir" install
#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-$pkgver/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-$pkgver-nox
make DESTDIR="$pkgdir" install
#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"
}