File kweathercore.spec of Package kweathercore-0.5-7.76
# spec file for kweathercore
#
# Copyright (c) 2021 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.
%define _shared_libname libKF5KWeatherCore5
%define _min_sover 0
Name: kweathercore
Version: 0.5
Release: 7.76
License: LGPL-2.0-or-later
Summary: Library to facilitate retrieval of weather information
Url: https://invent.kde.org/libraries/kweathercore
Source0: %{name}-%{version}.tar.xz
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: extra-cmake-modules
BuildRequires: cmake(Qt5Core)
BuildRequires: cmake(Qt5Network)
BuildRequires: cmake(Qt5Positioning)
BuildRequires: cmake(KF5I18n)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Get weather forecast and alerts anywhere on the earth easy. KWeatherCore
provides you a highly abstracted library for things related to weather:
Get local weather forecast, get weather of a location by name or coordinate,
get sunrise/set moonrise/set and many more informations about a location.
%package devel
Summary: Development headers for %{name}
Requires: %{name} = %{version}-%{release}
Requires: %{_shared_libname} = %{version}-%{release}
%description devel
Required headers to build components based
on %{name}.
%package docs
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
Requires: %{_shared_libname} = %{version}-%{release}
BuildRequires: doxygen
BuildRequires: libqt5-qttools-qhelpgenerator
#also requires QHelpGenerator, too lazy to search
%description docs
Documentation build components based
on %{name}.
%package -n %{_shared_libname}
Summary: Library to facilitate retrieval of weather information
Provides: %{name} = %{version}-%{release}
Obsoletes: %{name} < %{version}-%{release}
%description -n %{_shared_libname}
Shared objects for %{name}.
Get weather forecast and alerts anywhere on the earth easy. KWeatherCore
provides you a highly abstracted library for things related to weather:
Get local weather forecast, get weather of a location by name or coordinate,
get sunrise/set moonrise/set and many more informations about a location.
%prep
%setup -q -n %{name}-%{version}
%build
%cmake_kf5 -d build -- -DBUILD_QCH=ON
%cmake_build
%install
%kf5_makeinstall -C build
%kf5_post_install
%fdupes %{buildroot}%{_prefix}
%ldconfig_scriptlets -n %{_shared_libname}
%files devel
%license LICENSES/*
%{_kf5_includedir}/KWeatherCore/
%{_kf5_includedir}/kweathercore_version.h
%{_kf5_libdir}/libKF5KWeatherCore.so
%{_kf5_cmakedir}/KF5KWeatherCore/
%{_kf5_mkspecsdir}/qt_KWeatherCore.pri
%files -n %{_shared_libname}
%license LICENSES/*
%{_kf5_libdir}/libKF5KWeatherCore.so.%{version}.%{_min_sover}
%{_kf5_libdir}/libKF5KWeatherCore.so.5
%files docs
%doc README.md
%license LICENSES/*
%{_kf5_sharedir}/doc/qch/
%changelog
* Sat Feb 20 2021 Andrés B.S. <andresbs@opensuse.org>
- First build