From 15c596ee45a45ed4bfae5526089c3a7b4a62ac76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Giancarlo=20Dess=C3=AC?= Date: Thu, 21 Apr 2022 23:51:27 +0100 Subject: academic/molequeue: Updated for version 0.9.0. Signed-off-by: Dave Woodfall Signed-off-by: Willy Sudiarto Raharjo --- academic/molequeue/README | 10 ++++++++++ academic/molequeue/doinst.sh | 9 +++++++++ academic/molequeue/molequeue.SlackBuild | 33 ++++++++++++++++++++++++++++++++- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 academic/molequeue/doinst.sh (limited to 'academic') diff --git a/academic/molequeue/README b/academic/molequeue/README index 4df40445b3..62e5ed704e 100644 --- a/academic/molequeue/README +++ b/academic/molequeue/README @@ -8,3 +8,13 @@ facilitate the execution of the program. Input files can be staged, and output files collected using a standard interface. It is a subproject of OpenChemistry needed by Avogadro 2. + +By default MoleQueue should be started as a resident service and +launched from a script or a shell command line. If you want to lauch +the Graphic Interface User using a desktop entry pass the variable +DESKTOP=yes to the slackbuild script: + +DESKTOP=yes ./molequeue.SlackBuild + +This may be useful if you want to launch the service only when you +are going to start Avogadro 2. diff --git a/academic/molequeue/doinst.sh b/academic/molequeue/doinst.sh new file mode 100644 index 0000000000..65c7e2eeb9 --- /dev/null +++ b/academic/molequeue/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/molequeue/molequeue.SlackBuild b/academic/molequeue/molequeue.SlackBuild index 67495c14b4..b1ac314514 100644 --- a/academic/molequeue/molequeue.SlackBuild +++ b/academic/molequeue/molequeue.SlackBuild @@ -84,6 +84,7 @@ cd build -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DENABLE_TESTING=OFF \ + -Wno-dev \ .. make make install/strip DESTDIR=$PKG @@ -94,11 +95,41 @@ 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 +# Remove redundant files installed by make install in /usr/share/doc/Molequeue +rm -rf $PKG/usr/share/doc +mkdir -p $PKG/install + +if [ "${DESKTOP:-no}" = "yes" ]; then + + #Copy application icon and create a desktop entry + + mkdir -p $PKG/usr/share/icons/hicolor/32x32/apps + cp -a $TMP/$PRGNAM-$VERSION/molequeue/app/icons/molequeue.png \ + $PKG/usr/share/icons/hicolor/32x32/apps + + mkdir -p $PKG/usr/share/applications + cat << EOF > $PKG/usr/share/applications/molequeue.desktop +[Desktop Entry] +Type=Application +Name=MoleQueue +GenericName=MoleQueue Server for Avogadro 2 +Comment=Desktop integration of high performance computing resources. +Exec=molequeue +Icon=/usr/share/icons/hicolor/32x32/apps/molequeue.png +Terminal=false +Categories=Qt;Science;Chemistry;Physics;Education; +X-KDE-StartupNotify=false +StartupNotify=false +EOF + cat $CWD/doinst.sh > $PKG/install/doinst.sh +else + rm -rf $PKG/usr/share +fi + 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 -mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG -- cgit v1.2.3