updated on Thu Jan 12 20:00:29 UTC 2012
[aur-mirror.git] / r-devel / PKGBUILD
blob2a9de36467893773902d6dbc2a6d962a06674283
1 # $Id$
2 # Contributor: Florian Breitwieser <florian.bw@gmail.com>
4 pkgname=r-devel
5 pkgver=20110919
6 _pkgver=2011-09-19
7 pkgrel=2
8 pkgdesc="Language and environment for statistical computing and graphics - development 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=("ftp://ftp.stat.math.ethz.ch/pub/Software/R/R-devel_${_pkgver}.tar.gz"
19         'r-devel.desktop'
20         'r-devel.png')
21 install=r-devel.install
23 build() {
24    cd ${srcdir}/R-devel
25    sed -i 's|#define NeedFunctionPrototypes 0|#define NeedFunctionPrototypes 1|g' src/modules/X11/dataentry.c
26    ./configure  --prefix=/opt/r-devel \
27                 --enable-R-shlib \
28                 --with-lapack \
29                 --with-blas \
30                 F77=gfortran \
31                 LIBnn=lib
32    make
35 package() {
36    cd ${srcdir}/R-devel
37    make -j1 DESTDIR=${pkgdir} install
39   # install some freedesktop.org compatibility
40   install -Dm644 ${srcdir}/r-devel.desktop ${pkgdir}/usr/share/applications/r-devel.desktop
41   install -Dm644 ${srcdir}/r-devel.png ${pkgdir}/usr/share/pixmaps/r-devel.png
43   # move the config directory to /etc and create symlinks
44   install -d ${pkgdir}/etc/R-devel
45   cd ${pkgdir}/opt/r-devel/lib/R/etc
46   for i in *; do
47     mv -f ${i} ${pkgdir}/etc/R-devel
48     ln -s /etc/R-devel/${i} ${i}
49   done
51   # links
52   install -d ${pkgdir}/usr/bin
53   ln -s /opt/r-devel/bin/R ${pkgdir}/usr/bin/R-devel
54   ln -s /opt/r-devel/bin/Rscript ${pkgdir}/usr/bin/Rscript-devel
57 md5sums=('7938bd295b1a7f5938a2fc018c708faa'
58          'db4aaeb54dec28f831e3fac64705d4be'
59          '8862f998939a07a2391840f99ab4a4f6')