File codes_ui.spec of Package codes_ui

#
# spec file for package codes_ui
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


#---eccodes (unconditionally needed) does not build on 32bit archs atm, so simply exclude them:
ExcludeArch: %{ix86} %{arm}

Name:           codes_ui
Version:        1.8.1
Release:        0
Summary:        Interactive application built on ecCodes to inspect GRIB 1/2 and BUFR files
License:        Apache-2.0
Group:          Productivity/Scientific/Other
URL:            https://confluence.ecmwf.int/display/METV/CodesUI
Source:         https://confluence.ecmwf.int/download/attachments/92333258/%{name}-%{version}-Source.tar.gz
# PATCH-FEATURE-UPSTREAM reproducible.patch
Patch0:         reproducible.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  cmake(Qt5)
BuildRequires:  cmake(Qt5Widgets)
BuildRequires:  cmake(Qt5Gui)
BuildRequires:  cmake(Qt5Network)
BuildRequires:  cmake(Qt5Xml)
BuildRequires:  cmake(Qt5XmlPatterns)
BuildRequires:  cmake(Qt5Svg)
BuildRequires:  pkgconfig(eccodes) >= 2.6.0
BuildRequires:  libaec-devel
BuildRequires:  libsz2-devel
BuildRequires:  libpng-devel
BuildRequires:  libjpeg-devel
BuildRequires:  openjpeg2
BuildRequires:  openjpeg2-devel
BuildRequires:  zlib-devel
BuildRequires:  netcdf-devel
BuildRequires:  hdf5-devel
BuildRequires:  perl
Requires:       /usr/bin/nc

%description
With CodesUI it is possible to:
- inspect the overall structure of GRIB and BUFR files
- examine the data and metadata of the individual messages
For BUFR data these additional features are also available:
- filtering BUFR messages
- extracting tabular data from BUFR messages
- plotting BUFR observation locations on an interactive map
Please note that although CodesUI has some basic plotting capabilities it is
not a visualisation system.

%prep
%autosetup -p1 -n "%{name}-%{version}-Source"
chmod 644 NOTICE LICENSE

%build
%cmake \
    -DINSTALL_LIB_DIR="%{_lib}" \
    -DCMAKE_SKIP_RPATH=ON \
    -DCMAKE_SKIP_INSTALL_RPATH=ON \
    -DENABLE_RPATHS=OFF \
    -DENABLE_RELATIVE_RPATHS=OFF \
    -DHAVE_BIT_REPRODUCIBLE=ON

%cmake_build

%install
%cmake_install
#---no need to have *.cmake files:
rm -r %{buildroot}%{_libdir}/cmake

%check
export LD_LIBRARY_PATH=%{buildroot}%{_libdir}
%ctest

%files
%license LICENSE
%doc NOTICE
%{_bindir}/*
%{_datadir}/*

%changelog
openSUSE Build Service is sponsored by