123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408 |
- #!/bin/bash
- # Slackware build script for EMBASSY
- # Copyright 2011-2021 Petar Petrov slackalaxy@gmail.com
- # All rights reserved.
- #
- # Redistribution and use of this script, with or without modification, 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
- cd $(dirname $0) ; CWD=$(pwd)
- PRGNAM=EMBASSY
- VERSION=${VERSION:-6.6.0} # Keep this the same version as EMBOSS
- BUILD=${BUILD:-3}
- TAG=${TAG:-_SBo}
- PKGTYPE=${PKGTYPE:-tgz}
- if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
- fi
- # If the variable PRINT_PACKAGE_NAME is set, then this script will report what
- # the name of the created package would be, and then exit. This information
- # could be useful to other scripts.
- if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
- echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
- exit 0
- fi
- TMP=${TMP:-/tmp/SBo}
- PKG=$TMP/package-$PRGNAM
- OUTPUT=${OUTPUT:-/tmp}
- if [ "$ARCH" = "i586" ]; then
- SLKCFLAGS="-O2 -march=i586 -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
- # EMBASSY components and their versions
- CBSTOOLS=CBSTOOLS-1.0.0.650
- CLUSTALOMEGA=CLUSTALOMEGA-1.1.0
- DOMAINATRIX=DOMAINATRIX-0.1.650
- DOMALIGN=DOMALIGN-0.1.650
- DOMSEARCH=DOMSEARCH-0.1.650
- EMNU=EMNU-1.05.650
- ESIM4=ESIM4-1.0.0.650
- HMMER=HMMER-2.3.2.650
- IPRSCAN=IPRSCAN-4.3.1.650
- MEME=MEME-4.7.650
- MSE=MSE-3.0.0.650
- MYEMBOSS=MYEMBOSS-6.5.1
- MYEMBOSSDEMO=MYEMBOSSDEMO-6.5.0
- PHYLIPNEW=PHYLIPNEW-3.69.650
- SIGNATURE=SIGNATURE-0.1.650
- STRUCTURE=STRUCTURE-0.1.650
- TOPO=TOPO-2.0.650
- VIENNA=VIENNA-1.7.2.650
- set -e
- rm -rf $PKG
- mkdir -p $TMP $PKG $OUTPUT
- cd $TMP
- rm -rf $PRGNAM-$VERSION
- mkdir $TMP/$PRGNAM-$VERSION
- cd $TMP/$PRGNAM-$VERSION
- # Extract the components
- tar xvf $CWD/$CBSTOOLS.tar.gz
- tar xvf $CWD/$CLUSTALOMEGA.tar.gz
- tar xvf $CWD/$DOMAINATRIX.tar.gz
- tar xvf $CWD/$DOMALIGN.tar.gz
- tar xvf $CWD/$DOMSEARCH.tar.gz
- tar xvf $CWD/$EMNU.tar.gz
- tar xvf $CWD/$ESIM4.tar.gz
- tar xvf $CWD/$HMMER.tar.gz
- tar xvf $CWD/$IPRSCAN.tar.gz
- tar xvf $CWD/$MEME.tar.gz
- tar xvf $CWD/$MSE.tar.gz
- tar xvf $CWD/$MYEMBOSS.tar.gz
- tar xvf $CWD/$MYEMBOSSDEMO.tar.gz
- tar xvf $CWD/$PHYLIPNEW.tar.gz
- tar xvf $CWD/$SIGNATURE.tar.gz
- tar xvf $CWD/$STRUCTURE.tar.gz
- tar xvf $CWD/$TOPO.tar.gz
- tar xvf $CWD/$VIENNA.tar.gz
- chown -R root:root .
- find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
- # Build CBSTOOLS
- cd $TMP/$PRGNAM-$VERSION/$CBSTOOLS
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/CBSTOOLS \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build CLUSTALOMEGA
- cd $TMP/$PRGNAM-$VERSION/$CLUSTALOMEGA
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/CLUSTALOMEGA \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build DOMAINATRIX
- cd $TMP/$PRGNAM-$VERSION/$DOMAINATRIX
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/DOMAINATRIX \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build DOMALIGN
- cd $TMP/$PRGNAM-$VERSION/$DOMALIGN
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/DOMALIGN \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build DOMSEARCH
- cd $TMP/$PRGNAM-$VERSION/$DOMSEARCH
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/DOMSEARCH \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build EMNU
- cd $TMP/$PRGNAM-$VERSION/$EMNU
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/EMNU \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build ESIM4
- cd $TMP/$PRGNAM-$VERSION/$ESIM4
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/ESIM4 \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build HMMER
- cd $TMP/$PRGNAM-$VERSION/$HMMER
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/HMMER \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build IPRSCAN
- cd $TMP/$PRGNAM-$VERSION/$IPRSCAN
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/IPRSCAN \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build MEME
- cd $TMP/$PRGNAM-$VERSION/$MEME
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/MEME \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build MSE
- cd $TMP/$PRGNAM-$VERSION/$MSE
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/MSE \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build MYEMBOSS
- cd $TMP/$PRGNAM-$VERSION/$MYEMBOSS
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/MYEMBOSS \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build MYEMBOSSDEMO
- cd $TMP/$PRGNAM-$VERSION/$MYEMBOSSDEMO
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/MYEMBOSSDEMO \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build PHYLIPNEW
- cd $TMP/$PRGNAM-$VERSION/$PHYLIPNEW
- CFLAGS="$SLKCFLAGS -fcommon" \
- CXXFLAGS="$SLKCFLAGS -fcommon" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/PHYLIPNEW \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build SIGNATURE
- cd $TMP/$PRGNAM-$VERSION/$SIGNATURE
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/SIGNATURE \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build STRUCTURE
- cd $TMP/$PRGNAM-$VERSION/$STRUCTURE
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/STRUCTURE \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build TOPO
- cd $TMP/$PRGNAM-$VERSION/$TOPO
- CFLAGS="$SLKCFLAGS" \
- CXXFLAGS="$SLKCFLAGS" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/TOPO \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- # Build VIENNA
- cd $TMP/$PRGNAM-$VERSION/$VIENNA
- # -std=gnu89 fixes build with gcc-5.2 (inline functions HairpinE and LoopEnergy)
- CFLAGS="$SLKCFLAGS -std=gnu89" \
- CXXFLAGS="$SLKCFLAGS -std=gnu89" \
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION/VIENNA \
- --build=$ARCH-slackware-linux
- make
- make install DESTDIR=$PKG
- 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
- cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
- cat $CWD/CONTENTS > $PKG/usr/doc/$PRGNAM-$VERSION/CONTENTS
- rm -f $PKG/usr/lib*/*.la
- 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
|