File xygrib.spec of Package xygrib
#
# spec file for package xygrib
#
# Author Dominig ar Foll (Intel Open Source)
#
# Copyright (c) 2018 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 for packaging http://bugs.opensuse.org/
# project https://github.com/opengribs/XyGrib.git
Name: xygrib
Version: 1.2.1
Release: 0
Summary: a leading opensource weather visualization package (forked from stalled zygrib)
License: GPL-3.0
Group: Productivity/Other
Url: https://opengribs.org/en/
BuildRequires: cmake
BuildRequires: libqt5-qtbase-devel
BuildRequires: libqt5-qttools-devel
BuildRequires: libpng-devel
BuildRequires: openjpeg2-devel
BuildRequires: libnova-devel
BuildRequires: libproj-devel
BuildRequires: zlib-devel
BuildRequires: libbz2-devel
BuildRequires: update-desktop-files
Requires(post): update-desktop-files
Requires(postun): update-desktop-files
Source0: XyGrib-%{version}.tar.xz
Source1: xygrib.desktop
Source2: xygrib.png
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
XyGrib with OpenGribs - 'open-source meets open-data'
Serious about your weather? The combination of the best in free and open software with the best in free and open data can be found here.
XyGrib is a leading opensource weather visualization package that now interacts with OpenGribs's Grib server providing a choice of global and large area atmospheric and wave models.
XyGrib also uses free and open pre-cut Gribs of high resolution regional models found on sister site OpenSkiron.org
Home https://opengribs.org/en/
git@github.com:opengribs/XyGrib.git
%prep
%setup -n XyGrib-%{version}
%build
%define __builddir build
# -DNO_UPDATE=1 deactivates XyGrib internal SW update
# -DOPENSUSE=1 macro for optional OpenSUSE friendly options in the source code
%cmake -DCMAKE_SKIP_RPATH=ON \
-DCMAKE_INSTALL_PREFIX=%{_prefix}/share \
-DCFLAGS="-O2 -march=native" -DCMAKE_CXX_FLAGS="-DNO_UPDATE=1 -DOPENSUSE=1" \
../
%make_jobs
%install
%cmake_install
# xygrib make file install is not very Linux
mkdir %{buildroot}/%{_prefix}/bin
mv %{buildroot}/%{_prefix}/share/XyGrib/XyGrib %{buildroot}/%{_prefix}/bin/XyGrib
strip -s %{buildroot}/%{_prefix}/bin/XyGrib
# remove debug mess
rm -rf %{buildroot}/%{_prefix}/lib/debug
# manual install desktop files
cd ..
# uses a handmade xygrib.desktop file from OSB
%suse_update_desktop_file -i xygrib
# from OpeSUSE 15.0 desktop DB update is automatic
%if 0%{?suse_version} < 1330
%post
%desktop_database_post
%endif
%if 0%{?suse_version} < 1330
%postun
%desktop_database_postun
%endif
%files
%defattr(-,root,root)
%doc README.md INSTALL.md
%license LICENSE
%{_prefix}/bin/XyGrib
%{_prefix}/share
%changelog
* Sat Dec 15 2018 Dominig
- removing internal SW update
* Thu Dec 13 2018 Dominig
- Initial creation at V 1.2.1