updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / r-beta / PKGBUILD
blob7e3f44b4eda0821eae79e6fb9e6c2c1f63bc44f7
1 # $Id$
2 # Contributor: Florian Breitwieser <florian.bw@gmail.com>
4 pkgname=r-beta
5 pkgver=20111021
6 _pkgver=2011-10-20_r57355
7 pkgrel=1
8 pkgdesc="Language and environment for statistical computing and graphics - beta version"
9 arch=('i686' 'x86_64')
10 license=('GPL')
11 url=('http://www.r-project.org/')
12 depends=('blas' 'lapack' 'bzip2'  'libpng' 'libjpeg' 'libtiff'
13          'ncurses' 'pcre' 'readline' 'zlib' 'perl' 'gcc-libs'
14          'tk' 'libxt' 'libxmu' 'pango' 'xz')
15 makedepends=('openjdk6' 'gcc-fortran')
16 backup=('etc/R/Makeconf' 'etc/R/Renviron' 'etc/R/ldpaths' 'etc/R/repositories')
17 options=('!makeflags')
18 source=("http://cran.r-project.org/src/base-prerelease/R-beta_${_pkgver}.tar.gz"
19     'r-beta.desktop'
20         'r-beta.png')
21 install=r-beta.install
23 build() {
24    cd ${srcdir}/R-beta
25    sed -i 's|#define NeedFunctionPrototypes 0|#define NeedFunctionPrototypes 1|g' src/modules/X11/dataentry.c
26    ./configure  --prefix=/opt/r-beta \
27                 --enable-R-shlib \
28                 --with-lapack \
29                 --with-blas \
30                 F77=gfortran \
31                 LIBnn=lib
32    make
35 package() {
36    cd ${srcdir}/R-beta
37    make -j1 DESTDIR=${pkgdir} install
39   # install some freedesktop.org compatibility
40   install -Dm644 ${srcdir}/r-beta.desktop ${pkgdir}/usr/share/applications/r-beta.desktop
41   install -Dm644 ${srcdir}/r-beta.png ${pkgdir}/usr/share/pixmaps/r-beta.png
43   # move the config directory to /etc and create symlinks
44   install -d ${pkgdir}/etc/R-beta
45   cd ${pkgdir}/opt/r-beta/lib/R/etc
46   for i in *; do
47     mv -f ${i} ${pkgdir}/etc/R-beta
48     ln -s /etc/R-beta/${i} ${i}
49   done
51   # links
52   install -d ${pkgdir}/usr/bin
53   ln -s /opt/r-beta/bin/R ${pkgdir}/usr/bin/R-beta
54   ln -s /opt/r-beta/bin/Rscript ${pkgdir}/usr/bin/Rscript-beta
57 md5sums=('26eae0bc79f07ec8ed14722f9962c897'
58          'd1b074c69b497d56056e8a81db0a8eae'
59          'c2b4c9f9557e39322304b868c219fce1')