File gdl-language.spec of Package gdl-language

#
# spec file for package gdl-language
#
# Copyright (c) 2017 SUSE LINUX 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/
#

#missing eccodes for the following architechtures
ExcludeArch: %{ix86} %{arm}

Name:           gdl-language
Version:        1.1.1
Release:        0
Summary:        GNU Data Language
License:        GPL-2.0+ AND ( MIT OR WTFPL )
Group:          Productivity/Scientific/Other
Url:            https://gnudatalanguage.github.io/
Source0:        https://github.com/gnudatalanguage/gdl/archive/v%{version}/gdl-v%{version}.tar.gz
Source1:        gdl.csh
Source2:        gdl.sh
Source3:        whereami-20230908.tar.xz
Patch3:         gdl-antlr-static.patch
Patch6:         gdl-funList.patch

BuildRequires:  cmake
BuildRequires:  fftw3-devel
BuildRequires:  gcc-c++
BuildRequires:  gsl-devel
BuildRequires:  hdf5-devel
BuildRequires:  qhull_r-devel
BuildRequires:  qhullcpp-devel-static
BuildRequires:  ncurses-devel
BuildRequires:  netcdf-devel
BuildRequires:  libtiff-devel
BuildRequires:  geotiff-devel
BuildRequires:  eccodes-devel
BuildRequires:  glpk-devel
BuildRequires:  libshp-devel
BuildRequires:  python3-numpy-devel
BuildRequires:  libtirpc-devel
BuildRequires:  readline-devel
#TODO - Build with mpi support
#BuildRequires:  mpich2-devel
BuildRequires:  udunits-devel >= 2.0
BuildRequires:  wxWidgets-devel
BuildRequires:  eigen3-devel >= 3.2.4
BuildRequires:  libGraphicsMagick++-devel
BuildRequires:  desktop-file-utils
# Needed to pull in drivers
Requires:       %{name}-common = %{version}-%{release}
Provides:       %{name}-runtime = %{version}-%{release}

%description
A free IDL (Interactive Data Language) compatible incremental compiler
(i.e. runs IDL programs). IDL is a registered trademark of Harris
Geospatial Solutions.


%package        common
Summary:        Common files for GDL
Group:          Productivity/Scientific/Other
Requires:       %{name}-runtime = %{version}-%{release}
%if !0%{?rhel}
BuildArch:      noarch
%endif

%description    common
Common files for GNU Data Language

%prep
%setup -q -n gdl-v%{version}
%patch -P3 -p1
%patch -P6 -p1

%build
tar fx %SOURCE3 -C src
cp src/whereami/LICENSE.MIT LICENSE.whereami

%cmake -DX11=ON -DHDF=OFF -DGDL_LIB_DIR=%{_libdir}/gnudatalanguage
%cmake_build

%install
%cmake_install

# Install the profile file to set GDL_PATH
install -d -m 0755 %{buildroot}%{_sysconfdir}/profile.d
install -m 0644 %SOURCE1 %{buildroot}%{_sysconfdir}/profile.d
install -m 0644 %SOURCE2 %{buildroot}%{_sysconfdir}/profile.d

install -d -m 0755 %{buildroot}%{_datadir}/pixmaps
install -m 0644 resource/gdl.png %{buildroot}/%{_datadir}/pixmaps
desktop-file-install --add-category=Math doc/gdl.desktop


%files
%license COPYING LICENSE.whereami
%doc AUTHORS HACKING NEWS README
%config(noreplace) %{_sysconfdir}/profile.d/gdl.*sh
%{_bindir}/gdl
%{_mandir}/man1/gdl.1*
%{_datadir}/applications/gdl.desktop
%{_datadir}/pixmaps/gdl.png
#%%{_libdir}/gnudatalanguage/

%files common
%{_datadir}/gnudatalanguage/

%changelog
openSUSE Build Service is sponsored by