Browse Source

ap/ncbi-toolkit: Added.

slackware-14.2
Damien Goutte-Gattat 12 years ago
parent
commit
07ca5d3137
7 changed files with 270 additions and 0 deletions
  1. +12
    -0
      ap/ncbi-toolkit/doinst.sh
  2. +240
    -0
      ap/ncbi-toolkit/ncbi-toolkit.SlackBuild
  3. BIN
      ap/ncbi-toolkit/ncbi-tools6_6.1.20070822-1.diff.gz
  4. +1
    -0
      ap/ncbi-toolkit/ncbi-tools6_6.1.20070822-1.diff.gz.sha1
  5. +1
    -0
      ap/ncbi-toolkit/ncbi.tar.gz.sha1
  6. +3
    -0
      ap/ncbi-toolkit/ncbirc
  7. +13
    -0
      ap/ncbi-toolkit/slack-desc

+ 12
- 0
ap/ncbi-toolkit/doinst.sh View File

@ -0,0 +1,12 @@
#!/bin/sh
config()
{
NEW="$1"
OLD="`dirname $NEW`/`basename $NEW .new`"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
rm $NEW
fi
}
config /etc/ncbi/ncbirc.new

+ 240
- 0
ap/ncbi-toolkit/ncbi-toolkit.SlackBuild View File

@ -0,0 +1,240 @@
#!/bin/bash
# Build script for Slackware
# Damien Goutte-Gattat "gouttegd" <damien.goutte-gattat at e.ujf-grenoble.fr>
#
# Redistribution and use of this script, with or without modifications, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Latest ncbi sourcecode is available at:
# ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools/CURRENT
#
# The build process used in this slackbuild is based on the Debian
# NCBI-related packages, maintained by Aaron M. Ucko <ucko@debian.org>.
# Source package infos
NAMESRC=${NAMESRC:-ncbi}
VERSION=${VERSION:-6.1}
ARCHIVE=${ARCHIVE:-$NAMESRC.tar.gz}
WGET=${WGET:-ftp://ftp.ncbi.nih.gov/toolbox/ncbi_tools/old/20070822/$ARCHIVE}
DEBPATCH=ncbi-tools6_6.1.20070822-1.diff.gz
DEBPATCH_URL=http://ftp.de.debian.org/debian/pool/main/n/ncbi-tools6/$DEBPATCH
# Built package infos
NAMETGZ=${NAMETGZ:-ncbi-toolkit}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exist or is not a directory!"
exit 1
fi
# Compilation flags
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
*)
CPUOPT="-O2"
;;
esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget "$WGET"
fi
if [ ! -r $DEBPATCH ]; then
wget "$DEBPATCH_URL"
fi
sha1sum -c $ARCHIVE.sha1
sha1sum -c $DEBPATCH.sha1
NAME=$(tar ft $ARCHIVE | head -1 | cut -d / -f 1)
# Extract archive and apply the Debian patch
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
zcat $CWD/$DEBPATCH | patch -p1
# Compile
export NCBI_VERSION=$VERSION
export NCBI_VERSION_MAJOR=$(echo $VERSION | cut -d. -f1)
export NCBI_VERSION_MINOR=$(echo $VERSION | cut -d. -f2)
export BLAST_VERSION=$(cat demo/.BLAST_VERSION)
export NCBI_LBSM_SRC=ncbi_lbsmd_stub.c
export NCBI_LBSM_OBJ=ncbi_lbsmd_stub.o
export LD_LIBRARY_PATH=$TMP/$NAME/shlib:$LD_LIBRARY_PATH
cd build
ln -s ../make/*.unx .
ln -s ../make/ln-if-absent .
mv makeall.unx makefile
pmake all LCL=lnx CC=gcc RAN=ranlib \
OTHERLIBS=-lm VIBLIBS="-lXm -lXmu -lXt -lX11" VIBFLAG=-DWIN_MOTIF \
NCBI_LINKINGLIBDIR="../shlib -L../lib" \
CFLAGS1="-c $CPUOPT -D_PNG -fPIC" \
LIB4=libvibrant.a LIB20=libncbidesk.a LIB28=libvibgif.a \
LIB30=libncbicn3d.a LIB45=libddvlib.a \
LIB400=libvibrantOGL.a LIB3000=libncbicn3dOGL.a
pmake -f makenet.unx LCL=lnx CC=gcc RAN=ranlib \
OTHERLIBS=-lm VIBLIBS="-lXm -lXmu -lXt -lX11" VIBFLAG=-DWIN_MOTIF \
NCBI_LINKINGLIBDIR="../shlib -L../lib" \
CFLAGS1="-c $CPUOPT -fPIC" \
NETENTREZVERSION=2.02c2ASN1SPEC6 \
BLIB31=libvibnet.a OGLLIBS="-lGLU -lGL -lpng" \
all libncbimla.a libnetblast.a libncbitxc2.a libncbiid1.a shlib
pmake clean
pmake all LCL=lnx CC=gcc RAN=ranlib \
OTHERLIBS=-lm VIBLIBS="-lXm -lXmu -lXt -lX11" VIBFLAG=-DWIN_MOTIF \
NCBI_LINKINGLIBDIR="../shlib -L../lib" \
CFLAGS1="-c $CPUOPT -D_PNG" \
LIB4=libvibrant.a LIB20=libncbidesk.a LIB28=libvibgif.a \
LIB30=libncbicn3d.a LIB45=libddvlib.a \
LIB400=libvibrantOGL.a LIB3000=libncbicn3dOGL.a
pmake -f makedemo.unx LCL=lnx CC=gcc RAN=ranlib \
OTHERLIBS=-lm VIBLIBS= VIBFLAG= \
NCBI_LINKINGLIBDIR="../shlib -L../lib" \
CFLAGS1="-c $CPUOPT" \
LIB50=-lpcre
rm -f blast blastall blastall_old blastpgp seedtop megablast rpsblast \
blastclust
pmake -f makedemo.unx LCL=lnx CC=gcc RAN=ranlib \
OTHERLIBS=-lm THREAD_OBJ=ncbithr.o THREAD_OTHERLIBS=-lpthread \
NCBI_LINKINGLIBDIR="../shlib -L../lib" \
VIBLIBS= VIBFLAG= \
blast blastall blastall_old blastpgp seedtop megablast rpsblast \
blastclust
pmake -f makenet.unx LCL=lnx CC=gcc RAN=ranlib \
OTHERLIBS=-lm VIBFLAG=-DWIN_MOTIF \
NCBI_LINKINGLIBDIR="../shlib -L../lib" \
CFLAGS1="-c $CPUOPT" \
THREAD_OBJ=ncbithr.o THREAD_OTHERLIBS=-lpthread \
NETENTREZVERSION=2.02c2ASN1SPEC6 \
BLIB31=libvibnet.a OGLLIBS= VIBLIBS= \
VIB="Psequin sbtedit udv ddv blastcl3 idfetch bl2seq asn2gb tbl2asn \
gene2xml entrez2 gbseqget asn2all asn2asn asn2fsa asn2xml cleanasn \
insdseqget nps2gps spidey trna2sap trna2tbl Cn3D"
# Prepare the package tree
cd $TMP/$NAME
mkdir -p $PKG/usr/lib
install -m 644 lib/* shlib/*.so.$VERSION $PKG/usr/lib
for x in ncbiacc ncbiCacc netentr; do
rm -f $PKG/usr/lib/lib$x.so.$VERSION
ln -s libncbiNacc.so.$NCBI_VERSION_MAJOR \
$PKG/usr/lib/lib$x.so.$NCBI_VERSION_MAJOR
ln -s libncbiNacc.so $PKG/usr/lib/lib$x.so
done
for x in ncbicn3d vibrant; do
rm -f $PKG/usr/lib/lib$x.so.$VERSION
ln -s lib${x}OGL.so.$NCBI_VERSION_MAJOR \
$PKG/usr/lib/lib$x.so.$NCBI_VERSION_MAJOR
ln -s lib${x}OGL.so $PKG/usr/lib/lib$x.so
done
cd $PKG/usr/lib
for f in *.so.$VERSION; do
base=$(basename $f .so.$VERSION)
ln -s $f $base.so.$NCBI_VERSION_MAJOR
ln -s $f $base.so
done
cd $TMP/$NAME
mkdir -p $PKG/usr/include/ncbi
cp -LRp include/* $PKG/usr/include/ncbi
cd $PKG/usr/include/ncbi
rm -f FSpCompat.h FullPath.h More*.h Optimization*.h pcre*.h
find . -type f | xargs chmod 644
cd $TMP/$NAME
mkdir -p $PKG/usr/bin
install $(find build -type f -perm +111 -print) $PKG/usr/bin
install -m 755 debian/vibrate $PKG/usr/bin
rm -f $PKG/usr/bin/{dosimple,ncbisort,cdscan,entrcmd,*test*,*demo*}
mv $PKG/usr/bin/Cn3D $PKG/usr/bin/Cn3D-3.0
mv $PKG/usr/bin/blast $PKG/usr/bin/blast2
# Strip binaries
find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Install and compress man pages
mkdir -p $PKG/usr/man/man1
install -m 644 doc/man/* $PKG/usr/man/man1
install -m 644 debian/man/* $PKG/usr/man/man1
rm -f $PKG/usr/man/man1/entrcmd.1
find $PKG/usr/man/man1 -type f | xargs gzip -9 2> /dev/null
# Install the NCBI data
mkdir -p $PKG/usr/share/ncbi/data
install -m 644 data/* $PKG/usr/share/ncbi/data
# Install the documentation
DOCDIR=$PKG/usr/doc/$NAMETGZ-$VERSION
mkdir -p $DOCDIR
install -m 644 README{,.htm} VERSION $DOCDIR
install -m 644 config/README $DOCDIR/README.config
install -m 644 network/nsclilib/readme $DOCDIR/README.net-cfg
install -m 644 doc/fa2htgs/README $DOCDIR/README.fa2htgs
install -m 644 sequin/README $DOCDIR/README.sequin
# Install the default config file
mkdir -p $PKG/etc/ncbi
install -m 644 $CWD/ncbirc $PKG/etc/ncbi/ncbirc.new
# Copy slack-desc and doinst.sh files
mkdir -p $PKG/install
install -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

BIN
ap/ncbi-toolkit/ncbi-tools6_6.1.20070822-1.diff.gz View File


+ 1
- 0
ap/ncbi-toolkit/ncbi-tools6_6.1.20070822-1.diff.gz.sha1 View File

@ -0,0 +1 @@
ca0a8fd40aa5e3ddf989f42c0f05c75d7f01d1fe ncbi-tools6_6.1.20070822-1.diff.gz

+ 1
- 0
ap/ncbi-toolkit/ncbi.tar.gz.sha1 View File

@ -0,0 +1 @@
5e61f4f73ef52d145d0df86bb00f03f2db833ee9 ncbi.tar.gz

+ 3
- 0
ap/ncbi-toolkit/ncbirc View File

@ -0,0 +1,3 @@
[NCBI]
DATA=/usr/share/ncbi/data

+ 13
- 0
ap/ncbi-toolkit/slack-desc View File

@ -0,0 +1,13 @@
|-----handy-ruler------------------------------------------------------|
ncbi-toolkit: ncbi-toolkit (NCBI Software Development Toolkit)
ncbi-toolkit:
ncbi-toolkit: The NCBI Software Development Toolkit has been used for the
ncbi-toolkit: production and distribution of GenBank, Entrez, BLAST, and related
ncbi-toolkit: services by NCBI. It is freely available without restriction to
ncbi-toolkit: facilitate the use of NCBI by the scientific community.
ncbi-toolkit:
ncbi-toolkit:
ncbi-toolkit:
ncbi-toolkit:
ncbi-toolkit:

Loading…
Cancel
Save