diff options
author | Petar Petrov <ppetrov@paju.oulu.fi> | 2011-09-02 22:19:20 -0300 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-09-02 22:19:20 -0300 |
commit | 00668f37751b72fa4f3f08d2152190277f9f1f17 (patch) | |
tree | ad0a894324fd50dd230ae3318ddac82b06a6131f /academic/primer3/primer3.SlackBuild | |
parent | eb9abaad731ae9bc3f0d30a94fb117f00f41d822 (diff) | |
download | slackbuilds-00668f37751b72fa4f3f08d2152190277f9f1f17.tar.gz |
academic/primer3: Added (Design PCR primers)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'academic/primer3/primer3.SlackBuild')
-rw-r--r-- | academic/primer3/primer3.SlackBuild | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/academic/primer3/primer3.SlackBuild b/academic/primer3/primer3.SlackBuild new file mode 100644 index 0000000000..fbba3a73f5 --- /dev/null +++ b/academic/primer3/primer3.SlackBuild @@ -0,0 +1,93 @@ +#!/bin/sh + +# Slackware build script for primer3 +# Written by Petar Petrov, <ppetrov@paju.oulu.fi> and +# hereby submitted to the public domain + +# THIS SLACKBUILD IS DISTRIBUTETD IN THE HOPE OF BEING +# USEFUL BUT WITHOUT ANY WARRANTY. THE AUTHOR IS _NOT_ +# RESPONSIBLE FOR ANY DAMAGE OR DATA LOSS CAUSED BY IT. + +PRGNAM=primer3 +VERSION=${VERSION:-2.2.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -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 $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +cd ./src + +#Use our CFLAGS +sed -i "/^CFLAGS/s/=/+=/" Makefile + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ + make + +# This is recommended, but the tests take a really long time. +# Be patient if you uncomment the next line. +# make test + +install -D -m755 primer3_core $PKG/usr/bin/primer3_core +install -D -m755 long_seq_tm_test $PKG/usr/bin/long_seq_tm_test +install -D -m755 ntdpal $PKG/usr/bin/ntdpal +install -D -m755 ntthal $PKG/usr/bin/ntthal +install -D -m755 oligotm $PKG/usr/bin/oligotm + +cd .. + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + COPYING.txt example primer3_manual.htm \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +cat $CWD/References > $PKG/usr/doc/$PRGNAM-$VERSION/References + +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.${PKGTYPE:-tgz} |