archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / boinc / trunk / PKGBUILD
blobaba6949ce4d130ca7032eec506b9c4f757f6db90
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
3 # Contributor: Michal Krenek <mikos@sg1.cz>
5 pkgbase=boinc
6 pkgname=(boinc boinc-nox)
7 pkgver=7.22.1
8 _commit=45352deb19161b74eb26c8ecebf1255040f3c69a
9 pkgrel=1
10 arch=('x86_64')
11 url="https://boinc.berkeley.edu/"
12 license=('LGPL')
13 makedepends=('git' 'curl' 'freeglut' 'glu' 'inetutils' 'libnotify' 'libnsl' 'libxmu' 'libxslt' 'libxss'
14              'mesa' 'perl-xml-sax' 'sqlite3' 'webkit2gtk' 'wxwidgets-gtk3')
15 install=$pkgbase.install
16 options=('!staticlibs')
17 source=("git+https://github.com/BOINC/boinc.git#commit=$_commit"
18         boinc.bash
19         boinc.desktop
20         boinc.sysusers)
21 sha512sums=('SKIP'
22             'dec4bb6e571c2d99e1f57295149399eee03a8ec41b07ec3f7f197b910d246dcd6a5eb880301c9cd3a039d8c5aa6b07babf6ab4cae5f242c419c8cd71f56b90f5'
23             'b3fcd703a6f683d246242543c2f7b5fcfe403cb95b7786f1418b24c3dfb7c54c6b8c4816c0e9ae56b5ee4e4cae63f153ec522b04bf02f4f835dd90ac0e0ae204'
24             '85804d7e6b7e07f06e93e8c42507f5cd0b9415257d6ac7421603a2b6084699d847ae9720c1cf9e9793b750dfb768375116843b988b287ee7c66c1374e18f7934')
26 prepare() {
27   cp -a boinc{,-nox}
29   cd boinc
30   ./_autosetup
32   # Prepare boinc-nox
33   cd "$srcdir"/boinc-nox
34   # Don't force xss
35   sed -i 's/^  enable_xss="yes"$/  enable_xss="no"/' configure.ac
36   ./_autosetup
39 build() {
40   cd "$srcdir"/boinc
41   export CXXFLAGS+=' -ffat-lto-objects'
42   LDFLAGS+=' -lX11' ./configure \
43     --prefix=/usr \
44     --sysconfdir=/etc \
45     --enable-libraries \
46     --enable-unicode \
47     --enable-shared \
48     --enable-dynamic-client-linkage \
49     --enable-client \
50     --enable-manager \
51     --disable-static \
52     --disable-server \
53     --with-ssl \
54     --with-x \
55     --with-wxdir=/usr/lib \
56     --with-wx-config=$(which wx-config)
57   make
59   # Build boinc-nox
60   cd "$srcdir"/boinc-nox
61   PKG_CONFIG=/usr/bin/pkg-config ./configure \
62     --prefix=/usr \
63     --sysconfdir=/etc \
64     --enable-libraries \
65     --enable-unicode \
66     --enable-shared \
67     --enable-dynamic-client-linkage \
68     --enable-client \
69     --disable-server \
70     --disable-static \
71     --disable-manager \
72     --with-ssl \
73     --without-wxdir \
74     --without-x
75   make
78 package_boinc() {
79   pkgdesc="Berkeley Open Infrastructure for Network Computing for desktop"
80   depends=('curl' 'libnotify' 'libnsl' 'libxss' 'sqlite3' 'webkit2gtk' 'wxwidgets-gtk3')
82   cd boinc
84   make DESTDIR="$pkgdir" install
86   #install sysusers conf
87   install -Dm644 "$srcdir/$pkgbase.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgbase.conf"
89   #install bash-completion
90   install -Dm644 "$srcdir/$pkgbase.bash" "$pkgdir/usr/share/bash-completion/completions/$pkgbase"
92   #install .desktop File
93   install -Dm644 "$srcdir/$pkgbase.desktop" "$pkgdir/usr/share/applications/$pkgbase.desktop"
95   #install icons
96   install -Dm644 "$srcdir/boinc/packages/generic/sea/boincmgr.48x48.png" "$pkgdir/usr/share/pixmaps/$pkgbase.png"
98   #remove initscripts stuff
99   rm -rf "$pkgdir/etc"
102 package_boinc-nox() {
103   pkgdesc="Berkeley Open Infrastructure for Network Computing for desktop without Xorg dependencies"
104   depends=('curl' 'libjpeg-turbo')
105   provides=('boinc')
106   conflicts=('boinc')
108   cd boinc-nox
110   make DESTDIR="$pkgdir" install
112   #install sysusers conf
113   install -Dm644 "$srcdir/$pkgbase.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgbase.conf"
115   #install bash-completion
116   install -Dm644 "$srcdir/$pkgbase.bash" "$pkgdir/usr/share/bash-completion/completions/$pkgbase"
118   #remove initscripts stuff
119   rm -rf "$pkgdir/etc"