# # spec file for package kpublictransport # # Copyright (c) 2020 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/ # %global sover 0 %global fullsover 0.0.1 %global lname libKPublicTransport%{sover} %bcond_without lang Name: kpublictransport Version: 0.0.1 Release: 0 Summary: QML imports for querying public transport data License: LGPL-2.0-or-later Group: System/GUI/KDE URL: https://www.kde.org # Not there yet Source: %{name}-%{version}.tar.xz BuildRequires: bison BuildRequires: cmake >= 3.5 BuildRequires: extra-cmake-modules BuildRequires: fdupes BuildRequires: flex BuildRequires: kf5-filesystem BuildRequires: pkgconfig BuildRequires: cmake(Qt5Quick) >= 5.10.0 BuildRequires: cmake(Qt5Test) >= 5.10.0 BuildRequires: cmake(Qt5Widgets) >= 5.10.0 BuildRequires: pkgconfig(zlib) Requires: %{lname} = %{version} %description A library for access realtime public transport data and for performing public ransport journey queries. QML imports. %package -n %{lname} Summary: Library for querying public transport data Group: System/GUI/KDE %description -n %{lname} A library for access realtime public transport data and for performing public ransport journey queries. %package devel Summary: Library for querying public transport data Group: Development/Libraries/KDE Requires: %{lname} = %{version} Requires: extra-cmake-modules Requires: cmake(Qt5Gui) %description devel A library for access realtime public transport data and for performing public ransport journey queries.Development files. %lang_package -n %{lname} %prep %autosetup -p1 %build %cmake_kf5 -d build -- -DBUILD_TESTING=ON %cmake_build %install %kf5_makeinstall -C build %if %{with lang} # Fill once released # %find_lang %{name} --with-man --all-name %endif %check export CTEST_OUTPUT_ON_FAILURE=1 export QT_QPA_PLATFORM=offscreen %make_build -C build test %post -n %{lname} -p /sbin/ldconfig %postun -n %{lname} -p /sbin/ldconfig %if %{with lang} %files -n %{lname}-lang -f %{name}.lang %endif %files %license LICENSES/* %dir %{_kf5_qmldir}/org/ %dir %{_kf5_qmldir}/org/kde/ %{_kf5_qmldir}/org/kde/kpublictransport/ %files -n %{lname} %license LICENSES/* %{_kf5_debugdir}/org_kde_kpublictransport.categories %{_kf5_libdir}/libKPublicTransport.so.%{fullsover} %{_kf5_libdir}/libKPublicTransport.so.%{sover} %files devel %license LICENSES/* %{_includedir}/KPublicTransport/ %{_includedir}/kpublictransport/ %{_includedir}/kpublictransport_version.h %{_kf5_libdir}/cmake/KPublicTransport/ %{_kf5_libdir}/libKPublicTransport.so %changelog