diff options
author | Petar Petrov <slackalaxy@gmail.com> | 2023-09-16 20:08:34 +0900 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-09-17 00:10:24 +0700 |
commit | 670cb9aa4cb85008a4360be4e4ef4b897c9a8c9b (patch) | |
tree | d8f0f123a87a1670f3ed78112fde19ad8c52fb54 /academic | |
parent | 3122ccbc72a8a517282a056308f8a821b9db13bc (diff) |
academic/ncbi-edirect: Added (Entrez Direct cli utilities).
Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r-- | academic/ncbi-edirect/README | 8 | ||||
-rw-r--r-- | academic/ncbi-edirect/ncbi-edirect.SlackBuild | 114 | ||||
-rw-r--r-- | academic/ncbi-edirect/ncbi-edirect.info | 18 | ||||
-rw-r--r-- | academic/ncbi-edirect/slack-desc | 19 |
4 files changed, 159 insertions, 0 deletions
diff --git a/academic/ncbi-edirect/README b/academic/ncbi-edirect/README new file mode 100644 index 000000000000..f318903e06ee --- /dev/null +++ b/academic/ncbi-edirect/README @@ -0,0 +1,8 @@ +Entrez Direct: E-utilities on the Unix Command Line + +Entrez Direct (EDirect) provides access to the NCBI's suite of inter- +connected databases (publication, sequence, structure, gene, variation, +expression, etc.) from a Unix terminal window. Search terms are entered +as command-line arguments. Individual operations are connected with Unix +pipes to construct multi-step queries. Selected records can then be +retrieved in a variety of formats. diff --git a/academic/ncbi-edirect/ncbi-edirect.SlackBuild b/academic/ncbi-edirect/ncbi-edirect.SlackBuild new file mode 100644 index 000000000000..aa3a827f04d9 --- /dev/null +++ b/academic/ncbi-edirect/ncbi-edirect.SlackBuild @@ -0,0 +1,114 @@ +#!/bin/bash + +# Slackware build script for ncbi-edirect + +# Copyright 2023 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=ncbi-edirect +VERSION=${VERSION:-20.4.20230915} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +MANPG=ncbi-entrez-direct_19.0.20230216+dfsg-2.debian.tar.xz + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +if [ "$ARCH" != "x86_64" ]; then + printf "\n$ARCH is not supported... \n" + exit 1 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +mkdir $PRGNAM-$VERSION +cd $PRGNAM-$VERSION + +tar xvf $CWD/edirect-$VERSION.tar.gz +cd edirect +tar xvf $CWD/$MANPG +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 {} \; + +# Move these to their proper place +mkdir -p $PKG/usr/share/$PRGNAM +mv ./{cmd,eutils} $PKG/usr/share/$PRGNAM + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +mv ./{help,readme.pdf,README} $PKG/usr/doc/$PRGNAM-$VERSION + +# remove these +rm -rf ./{CA.pm,cacert.pem,Mozilla-CA.tar.gz} + +# include the binaries +mkdir -p $PKG/usr/bin +gunzip -c $CWD/rchive.Linux.gz > $PKG/usr/bin/rchive.Linux +gunzip -c $CWD/transmute.Linux.gz > $PKG/usr/bin/transmute.Linux +gunzip -c $CWD/xtract.Linux.gz > $PKG/usr/bin/xtract.Linux +chmod 755 $PKG/usr/bin/* + +# thanks Debian for the man pages +mkdir -p $PKG/usr/man/man1 +cp -a debian/man/* $PKG/usr/man/man1 +rm -rf debian + +# move what's left +cp -a * $PKG/usr/bin + +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 + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +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 diff --git a/academic/ncbi-edirect/ncbi-edirect.info b/academic/ncbi-edirect/ncbi-edirect.info new file mode 100644 index 000000000000..01a96d1fa3ea --- /dev/null +++ b/academic/ncbi-edirect/ncbi-edirect.info @@ -0,0 +1,18 @@ +PRGNAM="ncbi-edirect" +VERSION="20.4.20230915" +HOMEPAGE="https://www.ncbi.nlm.nih.gov/books/NBK179288/" +DOWNLOAD="UNSUPPORTED" +MD5SUM="" +DOWNLOAD_x86_64="https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/20.4.20230915/edirect-20.4.20230915.tar.gz \ +https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/20.4.20230915/rchive.Linux.gz \ +https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/20.4.20230915/transmute.Linux.gz \ +https://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/versions/20.4.20230915/xtract.Linux.gz \ +http://deb.debian.org/debian/pool/main/n/ncbi-entrez-direct/ncbi-entrez-direct_19.0.20230216+dfsg-2.debian.tar.xz" +MD5SUM_x86_64="8bf8634cc90c5b7bc2af3c03dcccdc7b \ +397531a92c8ed47a51c5d047845e9f62 \ +d6a0721a4b4f558e1a42ac4fe71da728 \ +9a5b5db65708b92eff88883e3dae6747 \ +f640a8d59b75655b411c984c984efef0" +REQUIRES="" +MAINTAINER="Petar Petrov" +EMAIL="slackalaxy@gmail.com" diff --git a/academic/ncbi-edirect/slack-desc b/academic/ncbi-edirect/slack-desc new file mode 100644 index 000000000000..8cbe8e8cd5ef --- /dev/null +++ b/academic/ncbi-edirect/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +ncbi-edirect: ncbi-edirect (E-utilities on the Unix Command Line) +ncbi-edirect: +ncbi-edirect: Entrez Direct (EDirect) provides access to the NCBI's suite of +ncbi-edirect: interconnected databases from a Unix terminal window. +ncbi-edirect: +ncbi-edirect: https://www.ncbi.nlm.nih.gov/books/NBK179288/ +ncbi-edirect: +ncbi-edirect: +ncbi-edirect: +ncbi-edirect: +ncbi-edirect: |