diff options
author | Giancarlo Dessì <slack@giand.it> | 2022-04-22 16:48:33 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-04-24 01:47:09 +0700 |
commit | 2112fdb101217f264858f7c59232b6f34a246d5e (patch) | |
tree | 0063dde281ed289077d1f6edf2330fa8654eb035 /academic | |
parent | 78591dd7f4c4bb3ae6a207ace4e5e61859740348 (diff) |
academic/avogadroapp: Added (graphic user interface of Avogadro 2)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic')
-rw-r--r-- | academic/avogadroapp/README | 13 | ||||
-rw-r--r-- | academic/avogadroapp/avogadroapp.SlackBuild | 114 | ||||
-rw-r--r-- | academic/avogadroapp/avogadroapp.info | 12 | ||||
-rw-r--r-- | academic/avogadroapp/doinst.sh | 9 | ||||
-rw-r--r-- | academic/avogadroapp/slack-desc | 19 |
5 files changed, 167 insertions, 0 deletions
diff --git a/academic/avogadroapp/README b/academic/avogadroapp/README new file mode 100644 index 000000000000..440974626046 --- /dev/null +++ b/academic/avogadroapp/README @@ -0,0 +1,13 @@ +Avogadro Application is the graphic user interface of Avogadro 2. + +Avogadro is an advanced molecular editor designed for cross-platform +use in computational chemistry, molecular modeling, bioinformatics, +materials science, and related areas. It offers flexible rendering and +a powerful plugin architecture. + +Managed by OpenChemistry, Avogadro 2 it is based on QT5 libraries and +it is a rewrite of the old Avogadro 1.x. + +Warning: the computational settings made through the Input Generator +require the MoleQueue server running to submit jobs to local +applications or remote HPC clusters. diff --git a/academic/avogadroapp/avogadroapp.SlackBuild b/academic/avogadroapp/avogadroapp.SlackBuild new file mode 100644 index 000000000000..4168f008c330 --- /dev/null +++ b/academic/avogadroapp/avogadroapp.SlackBuild @@ -0,0 +1,114 @@ +#!/bin/bash + +# Slackware build script for avogadroapp + +# Copyright 2020-2022 Giancarlo Dessì, Cagliari, IT +# 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=avogadroapp +VERSION=${VERSION:-1.95.1} +BUILD=${BUILD:-1} +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 [ ! -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 + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION avogadro-i18n +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +# Following archive must be unpacked in /tmp since the build process +# searches it as parallel directory and tries to connect to github if +# not found +tar xvf $CWD/avogadro-i18n.tar.gz + +# Now we can change directory to $PRGNAM-$VERSION +cd $PRGNAM-$VERSION +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 {} \; + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + .. + make + make install DESTDIR=$PKG +cd .. + +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +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 *.md LICENSE $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# Remove doc files installed by make install in /usr/share/doc/AvogadroApp that is redundant +rm -rf $PKG/usr/share/doc + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/academic/avogadroapp/avogadroapp.info b/academic/avogadroapp/avogadroapp.info new file mode 100644 index 000000000000..165d8ff57475 --- /dev/null +++ b/academic/avogadroapp/avogadroapp.info @@ -0,0 +1,12 @@ +PRGNAM="avogadroapp" +VERSION="1.95.1" +HOMEPAGE="https://github.com/OpenChemistry/avogadroapp" +DOWNLOAD="https://github.com/OpenChemistry/avogadroapp/archive/v1.95.1/avogadroapp-1.95.1.tar.gz \ + https://github.com/giandex/misc/raw/main/avogadro-i18n.tar.gz" +MD5SUM="3281a73a93810276a014506041094ee3 \ + 538f178ec33f948f1391f877557718a2" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="avogadrolibs hdf5" +MAINTAINER="Giancarlo Dessì" +EMAIL="slack@giand.it" diff --git a/academic/avogadroapp/doinst.sh b/academic/avogadroapp/doinst.sh new file mode 100644 index 000000000000..65c7e2eeb9aa --- /dev/null +++ b/academic/avogadroapp/doinst.sh @@ -0,0 +1,9 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/academic/avogadroapp/slack-desc b/academic/avogadroapp/slack-desc new file mode 100644 index 000000000000..030caebdb3e3 --- /dev/null +++ b/academic/avogadroapp/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------------------------------------------------------| +avogadroapp: avogadroapp (graphic user interface of Avogadro 2) +avogadroapp: +avogadroapp: Avogadro Application is the graphic interface of Avogadro 2, an +avogadroapp: advanced molecular editor designed for cross-platform use in +avogadroapp: computational chemistry, molecular modeling, bioinformatics, +avogadroapp: materials science, and related areas. It offers flexible rendering +avogadroapp: and a powerful application on one plugin architecture. +avogadroapp: +avogadroapp: Homepage: https://github.com/OpenChemistry/avogadroapp +avogadroapp: +avogadroapp: |