# $Id: PKGBUILD 184431 2013-05-06 19:39:38Z foutrelis $ # Maintainer: Ronald van Haren # Contributor: Damir Perisa # Contributor: K. Piche pkgname=r pkgver=3.0.0 pkgrel=1 pkgdesc="Language and environment for statistical computing and graphics" arch=('i686' 'x86_64' 'mips64el') license=('GPL') url=('http://www.r-project.org/') depends=('blas' 'lapack' 'bzip2' 'libpng' 'libjpeg' 'libtiff' 'ncurses' 'pcre' 'readline' 'zlib' 'perl' 'gcc-libs' 'libxt' 'libxmu' 'pango' 'xz' 'desktop-file-utils') makedepends=('jdk7-openjdk' 'gcc-fortran' 'tk') optdepends=('tk: tcl/tk interface' 'texlive-bin: latex sty files') backup=('etc/R/Makeconf' 'etc/R/Renviron' 'etc/R/ldpaths' 'etc/R/repositories' 'etc/R/javaconf') options=('!makeflags' '!emptydirs') install=r.install source=("http://cran.r-project.org/src/base/R-${pkgver%%.*}/R-${pkgver}.tar.gz" 'r.desktop' 'r.png' 'R.conf') sha1sums=('0cb1d1b815af4ce640ceafd5402a2eb94924c945' '13aa29219bcaa102e575de8c1c8e0833d233e836' 'a69a07ec363440efc18ce0a7f2af103375dea978' '43668da6cfd1b4455a99f23e79e2059294dddac9') prepare() { cd R-${pkgver} # set texmf dir correctly in makefile sed -i 's|$(rsharedir)/texmf|${datarootdir}/texmf|' share/Makefile.in # fix for texinfo 5.X sed -i 's|test ${makeinfo_version_min} -lt 7|test ${makeinfo_version_min} -lt 0|' configure } build() { cd R-${pkgver} ./configure --prefix=/usr \ --libdir=/usr/lib \ --sysconfdir=/etc/R \ --datarootdir=/usr/share \ rsharedir=/usr/share/R/ \ rincludedir=/usr/include/R/ \ rdocdir=/usr/share/doc/R/ \ --with-x \ --enable-R-shlib \ --with-lapack \ --with-blas \ F77=gfortran \ LIBnn=lib make # make libRmath.so cd src/nmath/standalone make shared } package() { cd R-${pkgver} make DESTDIR="${pkgdir}" install # install libRmath.so cd src/nmath/standalone make DESTDIR="${pkgdir}" install # Fixup R wrapper scripts. sed -i "s|${pkgdir} ||" "${pkgdir}/usr/bin/R" rm "${pkgdir}/usr/lib/R/bin/R" cd "${pkgdir}/usr/lib/R/bin" ln -s ../../../bin/R # install some freedesktop.org compatibility install -Dm644 "${srcdir}/r.desktop" \ "${pkgdir}/usr/share/applications/r.desktop" install -Dm644 "${srcdir}/r.png" \ "${pkgdir}/usr/share/pixmaps/r.png" # move the config directory to /etc and create symlinks install -d "${pkgdir}/etc/R" cd "${pkgdir}/usr/lib/R/etc" for i in *; do mv -f ${i} "${pkgdir}/etc/R" ln -s /etc/R/${i} ${i} done # Install ld.so.conf.d file to ensure other applications access the shared lib install -Dm644 "${srcdir}/R.conf" "${pkgdir}/etc/ld.so.conf.d/R.conf" }