#
# Spec file for package openfoam-selector
#
# Copyright (c) 2018 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           openfoam-selector
Url:            http://www.openfoam.com
Summary:        Tool to manage which OpenFOAM version to use
Version:        1.0.4
Release:        0
License:        BSD-3-Clause
Group:          System/Console
Source0:        https://sourceforge.net/projects/openfoam/files/utils/%{name}-%{version}.tgz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  automake autoconf perl
%if 0%{?suse_version}
%{perl_requires}
%endif


%description
A simple tool that allows system administrators or users to set a site-wide
default for which OpenFOAM version is to be used, but also allow
users to set their own preferred OpenFOAM version, thereby overriding
the site-wide default.

The default can be changed easily via the openfoam-selector command --
editing of shell startup files is not required.

%prep
%setup -q

%build
%configure --with-shell-startup-dir=/etc/profile.d
make

%install
make DESTDIR=%{buildroot} install

%files
%defattr(-, root, root, -)
%doc README* LICENSE
%{_bindir}/openfoam-selector
%{_bindir}/openfoam-selector-menu
%{_mandir}/man1/openfoam-selector.*
%{_mandir}/man1/openfoam-selector-menu.*
%config %attr(644,root,root) /etc/profile.d/*

%changelog