Username: Password: Remember me
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Michal Krenek <mikos@sg1.cz>
 
pkgbase=boinc
pkgname=boinc
pkgver=7.14.2
_tag="client_release/7.14/$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' 'libwebkit-gtk2' 'wxgtk')
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
        boinc-wxgtk-3.1.patch::"https://github.com/BOINC/boinc/commit/fbed9f32.patch")
 
sha512sums=('dcb6d60893e8baad6282d5e4728387352e942375d988df9c2ad00022deaa9bc5ace967a1346e1b43b25342d2e477ab42e28640935d94e6950ee3716732c9c1af'
            'bdf6cfa1461633a816d3ccc776dceacbea91fa8b01127159daf93cfa9d01ab92a8e712edfe1dc6df9ca2c25b7fb41197afddc1e08413d07a4be575c5dcfb2f36'
            'aef2d1e8a396238d0185d605165ce8a4fd9a32ff15f8aecc692ef075a61d15cda8b6570a13361dcd876b389049dc4058ac89baba8f465c4712f150240d8dea20'
            '246b54799f02b4d35dbad4650d09a631bfa7845801bc18c9c0fc69852a467ab6c346b734bbd5fe694ed8d889c2a9d97c8d7712f6a061df081c9da4f129e3d4e7'
            'd64c727904efb183b6f082aa5b5a3982595053ca3e9086344b04363aefc45e20869744d595e9400b2d88d183715d27b040247071cf948daa2d7750deb5e4038f')
 
 
prepare() {
  mv boinc-client_release-*-$pkgver $pkgbase-$pkgver
 
  cd $pkgbase-$pkgver
 
  patch -p1 -i ../boinc-wxgtk-3.1.patch # Fix build with wxgtk 3.1
  cp -r "$srcdir"/$pkgbase-$pkgver{,-nox}
 
  ./_autosetup
 
}
 
build() {
  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)
  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"
}