updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / boinc-svn / PKGBUILD
blobc9e245cefa785a3b0314a664cd9bd403cffbf6d4
1 # Maintainer: ponsfoot <cabezon dot hashimoto at gmail dot com>
2 # Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
3 # Contributor: Michal Krenek <mikos@sg1.cz>
5 _root=trunk
6 _mod=boinc
7 #_root=tags
8 #_mod=boinc_core_release_6_12_34
10 _apply_patch="yes"
12 _svntrunk="http://boinc.berkeley.edu/svn/${_root}/${_mod}"
13 _svnmod="${_mod}"
15 pkgname=boinc-svn
16 pkgver=25025
17 pkgrel=1
18 arch=('i686' 'x86_64')
19 url="http://boinc.berkeley.edu/"
20 license=('LGPL')
21 pkgdesc="Berkeley Open Infrastructure for Network Computing"
22 depends=('curl' 'wxgtk' 'libnotify' 'sqlite3')
23 makedepends=('libxslt' 'pkg-config' 'perl-xml-sax' 'subversion')
24 provides=('boinc')
25 conflicts=('boinc' 'boinc-nox')
26 options=('!libtool')
27 install=boinc.install
28 changelog=ChangeLog
29 source=(boinc.rc
30         boinc.bash
31         boinc.desktop
32         6.12.26-libnotify-0.7.patch
33         6.12.26-fix_subdirs.patch
34         r24240-ignore_ret_value.patch
36 md5sums=('43605168e310f50cf426d2f9a7b39847'
37          '05ed267db973ef7cbaf1118bb20bf9ce'
38          '17969d849f3cf27c2100b20a7b7a7e64'
39          '7d774000a1c69c84e71704f42129bbd3'
40          'c7da3bb2a697b49cb79ab009ba4e75c8'
41          '68bb3dfac41c20251b543665659f0281')
43 build() {
44   cd "${srcdir}"
46   msg "Connecting to boinc.berkeley.edu SVN server..."
47   if [[ -d ${_svnmod}/.svn ]]; then
48     (cd ${_svnmod} ; svn update)
49   else
50     svn co ${_svntrunk} --config-dir ./ -r ${pkgver} ${_svnmod}
51   fi
52   msg "SVN checkout done or server timeout."
54   msg "Starting make..."
55   rm -rf "${srcdir}/${_svnmod}-build"
56   cp -r "${srcdir}/$_svnmod" "${srcdir}/${_svnmod}-build"
57   cd "${srcdir}/${_svnmod}-build"
59   if [[ "$_apply_patch" = "yes" ]]; then
60     if [[ "$_mod" = "boinc_core_release_6_12_34" ]]; then
61       # Patches by Gentoo
62       # http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sci-misc/boinc/files/
63       patch -p1 -i "${srcdir}/6.12.26-fix_subdirs.patch"
64       patch -p1 -i "${srcdir}/6.12.26-libnotify-0.7.patch"
65     else
66       patch -p1 -i "${srcdir}/r24240-ignore_ret_value.patch"
67     fi
68   fi
70   _inclds_gtk2="$(pkg-config --cflags --libs gtk+-2.0)"
71   CFLAGS+=" $_inclds_gtk2 -lX11"
72   CXXFLAGS+=" $_inclds_gtk2 -lX11"
74   #configure
75   LC_ALL=C ./_autosetup # Possibility to fail ver. check depending on the localization.
76   ./configure --prefix=/usr \
77               --sysconfdir=/etc \
78               --localstatedir=/var \
79               --disable-server \
80               --enable-unicode \
81               --with-x \
82               --with-ssl \
83               --with-wxdir=/usr/lib \
84               --with-wx-config=$(which wx-config) \
85               --enable-dynamic-client-linkage \
86               --disable-static
87   make
90 package() {
91   cd "${srcdir}/${_svnmod}-build"
93   make DESTDIR=${pkgdir} install
95   #install rc-script
96   install -D -m755 "${srcdir}/boinc.rc" ${pkgdir}/etc/rc.d/boinc
98   #install bash-completion
99   install -D -m644 "${srcdir}/boinc.bash" ${pkgdir}/etc/bash_completion.d/boinc
101   #install .desktop File
102   install -D -m644 "${srcdir}/boinc.desktop" \
103     ${pkgdir}/usr/share/applications/boinc.desktop
105   #install icons
106   install -D -m644 "${srcdir}/${_svnmod}-build/clientgui/res/boincmgr.48x48.png" \
107     ${pkgdir}/usr/share/pixmaps/boinc.png
109   #killing /etc/init.d directory
110   rm -rf ${pkgdir}/etc/init.d