File gnome-chemistry-utils.spec of Package gnome-chemistry-utils

#
# spec file for package gnome-chemistry-utils
#
# Copyright (c) 2022 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/
#


%define         major_version 0.14
Name:           gnome-chemistry-utils
Version:        0.14.17
Release:        0
Summary:        Gtk Utilities related to Chemistry
License:        GPL-3.0-or-later
Group:          Productivity/Scientific/Chemistry
URL:            https://www.nongnu.org/gchemutils/
Source:         http://download.savannah.gnu.org/releases/gchemutils/0.14/%{name}-%{version}.tar.xz
# PATCH-FIX-OPENSUSE
Patch0:         fix_gnumeric_1.12.42_GnmFuncDescriptor_ABI_break.patch
# PATCH-FIX-UPSTREAM gnome-chemistry-utils-0.14.17-openbabel-3.patch -- Build against Open Babel 3
Patch1:         gnome-chemistry-utils-0.14.17-openbabel-3.patch
# PATCH-FIX-UPSTREAM gnome-chemistry-utils-0.14.17-remove-gnome-common.patch -- Remove gnome-common macros (deb#830039)
Patch2:         gnome-chemistry-utils-0.14.17-remove-gnome-common.patch
# PATCH-FIX-UPSTREAM gnome-chemistry-utils-0.14.17-gdk-use-x11-backend.patch -- Fix crash under wayland (deb#887117)
Patch3:         gnome-chemistry-utils-0.14.17-gdk-use-x11-backend.patch
BuildRequires:  autoconf-archive
BuildRequires:  bodr >= 5
BuildRequires:  chemical-mime-data >= 0.1.94
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  gettext-runtime
BuildRequires:  hicolor-icon-theme
BuildRequires:  intltool
BuildRequires:  libtool
BuildRequires:  libxml2-tools
BuildRequires:  libxslt-tools
BuildRequires:  pkgconfig
BuildRequires:  shared-mime-info >= 0.12
BuildRequires:  xz
BuildRequires:  pkgconfig(cairo) >= 1.6.0
BuildRequires:  pkgconfig(gdk-pixbuf-2.0) >= 2.22.0
BuildRequires:  pkgconfig(gl)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(glu)
BuildRequires:  pkgconfig(gnome-doc-utils)
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.0.0
BuildRequires:  pkgconfig(libglade-2.0)
BuildRequires:  pkgconfig(libgoffice-0.10) >= 0.10.0
BuildRequires:  pkgconfig(libgsf-1) >= 1.14.9
BuildRequires:  pkgconfig(libspreadsheet-1.12)
BuildRequires:  pkgconfig(libxml-2.0) >= 2.4.16
BuildRequires:  pkgconfig(openbabel-3)
BuildRequires:  pkgconfig(x11) >= 1.0.0
Requires:       bodr
Requires:       chemical-mime-data
Provides:       gchempaint
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif

%description
This package is a set of chemical utils.
* A 3D molecular structure viewer (GChem3DViewer).
* A Chemical calculator (GChemCalc).
* A periodic table of the elements application (GChemTable).
* A crystalline structure editor (GCrystal).
* A 2D molecule drawing program (GChemPaint)

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries/GNOME
Requires:       %{name} = %{version}

%description devel
Gtk widgets and some C++ classes related to chemistry.

%lang_package

%prep
%autosetup -p1
autoreconf -ivf

%build
# Dynamic exception specification has been removed in C++17
export CXXFLAGS="-std=c++14 %{optflags}"
%configure --disable-static \
           --disable-update-databases \
           --disable-scrollkeeper \
           --disable-mozilla-plugin \
           --with-kde-mime-dir=no \
           --docdir=%{_defaultdocdir}/%{name}

%make_build

%install
%make_install INSTALL="install -p"

# remove static libs
find %{buildroot} -type f -name "*.la" -delete -print

%find_lang gchemutils-%{major_version} --without-gnome
%fdupes %{buildroot}

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%license COPYING COPYING-DOCS
%doc ChangeLog AUTHORS README NEWS TODO
%{_mandir}/man?/*
%doc %{_datadir}/gnome/help/*
%dir %{_libdir}/goffice
%dir %{_libdir}/gchemutils
%dir %{_datadir}/gchemutils
%dir %{_datadir}/gchemutils/%{major_version}
%dir %{_datadir}/gchemutils/%{major_version}/ui
%dir %{_datadir}/gchemutils/%{major_version}/paint
%dir %{_datadir}/gchemutils/%{major_version}/pixmaps
%dir %{_datadir}/glib-2.0/schemas
%{_bindir}/*
%{_libdir}/gchemutils/%{major_version}
%{_libdir}/*.so.*
%{_libdir}/goffice/*
%dir %{_libdir}/gnumeric/1.12/
%dir %{_libdir}/gnumeric/1.12/plugins/
%{_libdir}/gnumeric/1.12/plugins/gchemutils/
%{_libexecdir}/babelserver
%{_datadir}/gchemutils/%{major_version}/*.xml
%{_datadir}/gchemutils/%{major_version}/ui
%{_datadir}/gchemutils/%{major_version}/paint/*
%{_datadir}/gchemutils/%{major_version}/pixmaps/*
%{_datadir}/applications/*.desktop
%{_datadir}/mime/packages/gchemutils.xml
%{_datadir}/omf/
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/icons/hicolor/*/mimetypes/*
%dir %{_datadir}/appdata/
%{_datadir}/appdata/*.appdata.xml

%files devel
%{_libdir}/*.so

%files lang -f gchemutils-%{major_version}.lang

%changelog
openSUSE Build Service is sponsored by