aboutsummaryrefslogtreecommitdiff
path: root/academic/R/R.SlackBuild
diff options
context:
space:
mode:
authorJoel J. Adamson <adamsonj@email.unc.edu>2010-05-13 00:19:44 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:19:44 +0200
commit828f3f65bcd3b435614a7ff1a581b89a84b0f702 (patch)
tree9249abdc2cb99f90a74551255d9ce12d238d9b48 /academic/R/R.SlackBuild
parent3e9095b3608126e6b30d77bc10afd20a078fcc15 (diff)
academic/R: Updated for version 2.9.0
Diffstat (limited to 'academic/R/R.SlackBuild')
-rw-r--r--academic/R/R.SlackBuild58
1 files changed, 30 insertions, 28 deletions
diff --git a/academic/R/R.SlackBuild b/academic/R/R.SlackBuild
index b0f8b51812f1c..f61baede14a6a 100644
--- a/academic/R/R.SlackBuild
+++ b/academic/R/R.SlackBuild
@@ -17,66 +17,68 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
+set -e
+
rm -rf $PKG
-mkdir -p $TMP $PKG
+mkdir -p $TMP $PKG $OUTPUT
rm -rf $TMP/$PRGNAM-$VERSION
-cd $TMP || exit 1
-tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
-cd $PRGNAM-$VERSION || exit 1
+cd $TMP
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# adjust the path variable; you need pdflatex to build the LaTeX
-# documentation
-PATH=/usr/share/texmf/bin:$PATH
+# Adjust the path variable; you need pdflatex to build the LaTeX documentation
+PATH="$PATH:/usr/share/texmf/bin"
-# Set configure options
-# If your app is written in C++, you'll also need to add a line for CXXFLAGS
CFLAGS="$SLKCFLAGS" \
- ./configure \
+./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
+ --mandir=/usr/man \
--with-perl=/usr/bin/perl \
--enable-R-shlib \
- --build=$ARCH-slackware-linux \
- --host=$ARCH-slackware-linux
+ --build=$ARCH-slackware-linux
-make || exit 1
-make install DESTDIR=$PKG || exit 1
+make
+make install DESTDIR=$PKG
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
-mv $PKG/usr/share/man $PKG/usr
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)
-mv $PKG/usr/share/info $PKG/usr
-rm -f $PKG/usr/info/dir*
-gzip -9 $PKG/usr/info/*.info*
-rmdir $PKG/usr/share
-
mkdir -p $PKG/usr/doc
-mv $PKG/usr/lib/R/doc $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/lib${LIBDIRSUFFIX}/R/doc $PKG/usr/doc/$PRGNAM-$VERSION
cp -a INSTALL README $CWD/$PRGNAM.SlackBuild $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
chown -R root:root $PKG/usr/doc
-( cd $PKG/usr/lib/R ; ln -s /usr/doc/$PRGNAM-$VERSION doc )
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/R ; ln -s /usr/doc/$PRGNAM-$VERSION doc )
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}