Commit 6fe4ebf8 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Merge branch 'quicknxs' into 'master'

Add quicknxs to the wrapper scripts

See merge request !7
parents e30db0ce 0e6e797a
Loading
Loading
Loading
Loading
Loading
+16 −12
Original line number Diff line number Diff line
%global srcname nsd-app-wrap

Name:           nsd-app-wrap
Version:        1.21
Version:        1.22
Release:        1%{?dist}
Summary:        Wrapper scripts to launch python applications installed via anaconda
Vendor:         Peter F. Peterson
@@ -25,21 +25,22 @@ Wrapper scripts to launch python applications installed via anaconda
rm -rf $RPM_BUILD_ROOT
# put things in the bin directory
mkdir -p %{buildroot}%{_bindir}/
mv gsas2 %{buildroot}%{_bindir}/
mv neutron-imaging %{buildroot}%{_bindir}/
mv mantidtotalscattering %{buildroot}%{_bindir}/
mv nsd-app-wrap.sh %{buildroot}%{_bindir}/
mv nsd-conda-wrap.sh %{buildroot}%{_bindir}/
mv pyrs %{buildroot}%{_bindir}/
mv sasview %{buildroot}%{_bindir}/
mv drtsans %{buildroot}%{_bindir}/
mv refred %{buildroot}%{_bindir}/
install -m 755 gsas2 %{buildroot}%{_bindir}/
install -m 755 neutron-imaging %{buildroot}%{_bindir}/
install -m 755 mantidtotalscattering %{buildroot}%{_bindir}/
install -m 755 nsd-app-wrap.sh %{buildroot}%{_bindir}/
install -m 755 nsd-conda-wrap.sh %{buildroot}%{_bindir}/
install -m 755 pyrs %{buildroot}%{_bindir}/
install -m 755 sasview %{buildroot}%{_bindir}/
install -m 755 drtsans %{buildroot}%{_bindir}/
install -m 755 quicknxs3 %{buildroot}%{_bindir}/
install -m 755 refred %{buildroot}%{_bindir}/
# put icons in the right place
mkdir -p %{buildroot}/%{_datadir}/pixmaps/
mv pyrs.png %{buildroot}/%{_datadir}/pixmaps/
install -m 644 pyrs.png %{buildroot}/%{_datadir}/pixmaps/
# put desktop files in the right place
mkdir -p %{buildroot}%{_datadir}/applications/
mv pyrs.desktop %{buildroot}%{_datadir}/applications/
install -m 644 pyrs.desktop %{buildroot}%{_datadir}/applications/

%files
%{_bindir}/*
@@ -49,6 +50,9 @@ mv pyrs.desktop %{buildroot}%{_datadir}/applications/
%license LICENSE

%changelog
* Thu May 5 2022 Pete Peterson
- add script for quicknxs

* Mon Mar 14 2022 Pete Peterson
- look for conda in /usr/local

quicknxs3

0 → 100755
+25 −0
Original line number Diff line number Diff line
#!/bin/bash

# select the environment to use
# current default is system version
if [ -n "$1" ]; then
  if [ "$1" == "--dev" ]; then
    CONDA_ENVIRON=quicknxs2-dev
    shift  # drop this argument
  elif [ "$1" == "--qa" ]; then
    CONDA_ENVIRON=quicknxs2-qa
    shift  # drop this argument
  fi
fi

if [ -v CONDA_ENVIRON ];
then
    # import library to do the real work
    source "$(dirname $(realpath "$0"))/nsd-app-wrap.sh"

    # activate the environment - will be deactivated on exit
    activate_conda_environment "${CONDA_ENVIRON}"
fi

# start the application
quicknxs2