contrib/r/Pkgfile

72 lines
1.7 KiB
Plaintext
Raw Normal View History

2019-06-11 23:45:49 +02:00
# Description: R is a free software environment for statistical computing and graphics
# URL: https://www.r-project.org/
# Maintainer: Tim Biermann, tbier at posteo dot de
# Depends on: brotli gnutls graphite2 icu keyutils krb5 libpcre2 libpsl libwebp openblas openldap pango rtmpdump xorg-libxmu zstd openjdk8
name=r
2019-07-06 21:50:36 +02:00
version=3.6.1
release=1
2019-06-11 23:45:49 +02:00
source=(https://cran.r-project.org/src/base/R-3/R-$version.tar.gz
r.desktop
r.png
R.conf
)
build() {
cd R-$version
sed -i 's|$(rsharedir)/texmf|${datarootdir}/texmf|' share/Makefile.in
./configure --prefix=/usr \
--libdir=/usr/lib \
--sysconfdir=/etc/R \
--datarootdir=/usr/share \
rsharedir=/usr/share/R/ \
rincludedir=/usr/include/R/ \
--with-x \
--enable-R-shlib \
--with-lapack \
--with-blas \
F77=gfortran \
LIBnn=lib
make
pushd src/nmath/standalone
make shared
popd
make DESTDIR=$PKG install
pushd src/nmath/standalone
make DESTDIR=$PKG install
popd
sed -i "s|$PKG ||" "$PKG/usr/bin/R"
rm "$PKG/usr/lib/R/bin/R"
cd "$PKG/usr/lib/R/bin"
ln -s ../../../bin/R
install -Dm644 "$SRC/r.desktop" \
"$PKG/usr/share/applications/r.desktop"
install -Dm644 "$SRC/r.png" \
"$PKG/usr/share/pixmaps/r.png"
install -Dm644 "$SRC/R.conf" \
"$PKG/etc/ld.so.conf.d/R.conf"
install -d $PKG/etc/R
cd $PKG/usr/lib/R/etc
for i in *; do
mv -f ${i} $PKG/etc/R
ln -s /etc/R/$i $i
done
#clean up
find $PKG \(\
-iname '*README*' -o \
-iname '*COPYING*' -o \
-iname '*AUTHORS*' -o \
-iname '*THANKS*' -o \
-iname '*NEWS*' -o \
-iname '*LICENSE*' -o \
-iname '*CHANGELOG*' \
\) -exec rm '{}' \+ || true
#doh! don't remove INSTALl or you won't be able to install R packages
#-iname '*INSTALL*' -o \
}