123 lines
3.4 KiB
RPMSpec
123 lines
3.4 KiB
RPMSpec
|
|
%define qt6_version 6.8.0
|
|
|
|
%define rname kunitconversion
|
|
|
|
%bcond_with kde_python_bindings
|
|
%if %{with kde_python_bindings}
|
|
%global mypython python3
|
|
%global __mypython %{expand:%%__python3}
|
|
%global mypython_sitearch %{python3_sitearch}
|
|
%endif
|
|
|
|
# Full KF6 version (e.g. 6.22.0)
|
|
%{!?_kf6_version: %global _kf6_version %{version}}
|
|
|
|
Name: kf6-kunitconversion
|
|
Version: 6.20.0
|
|
Release: 0
|
|
Summary: Tool for converting physical units
|
|
License: LGPL-2.1-or-later
|
|
URL: https://www.kde.org
|
|
Source: https://ftp.ntu.edu.tw/pub/kde/stable/frameworks/6.20/%{rname}-%{version}.tar.xz
|
|
BuildRequires: fdupes
|
|
BuildRequires: kf6-extra-cmake-modules >= %{_kf6_version}
|
|
BuildRequires: cmake(KF6I18n) >= %{_kf6_version}
|
|
BuildRequires: cmake(Qt6Core) >= %{qt6_version}
|
|
BuildRequires: cmake(Qt6Network) >= %{qt6_version}
|
|
BuildRequires: cmake(Qt6ToolsTools) >= %{qt6_version}
|
|
BuildRequires: qt6-tools
|
|
BuildRequires: qt6-doctools
|
|
BuildRequires: qt6-linguist
|
|
# SECTION bindings
|
|
%if %{with kde_python_bindings}
|
|
BuildRequires: python3 >= 3.9
|
|
BuildRequires: python3-devel >= 3.9
|
|
BuildRequires: python3-build
|
|
BuildRequires: python3-setuptools
|
|
BuildRequires: python3-wheel
|
|
BuildRequires: cmake(Shiboken6)
|
|
BuildRequires: cmake(PySide6)
|
|
%endif
|
|
# /SECTION
|
|
|
|
%description
|
|
KUnitConversion provides functions to convert values in different physical
|
|
units. It supports converting different prefixes (e.g. kilo, mega, giga) as
|
|
well as converting between different unit systems (e.g. liters, gallons).
|
|
|
|
%package -n libKF6UnitConversion6
|
|
Summary: Converting physical units
|
|
Requires: kf6-kunitconversion >= %{version}
|
|
|
|
%description -n libKF6UnitConversion6
|
|
KUnitConversion provides functions to convert values in different physical
|
|
units. It supports converting different prefixes (e.g. kilo, mega, giga) as
|
|
well as converting between different unit systems (e.g. liters, gallons).
|
|
|
|
%package devel
|
|
Summary: Converting physical units: Build Environment
|
|
Requires: libKF6UnitConversion6 = %{version}
|
|
Requires: cmake(Qt6Core) >= %{qt6_version}
|
|
|
|
%description devel
|
|
KUnitConversion provides functions to convert values in different physical
|
|
units. It supports converting different prefixes (e.g. kilo, mega, giga) as
|
|
well as converting between different unit systems (e.g. liters, gallons).
|
|
Development files.
|
|
|
|
%if %{with kde_python_bindings}
|
|
%package -n python3-kf6-kunitconversion
|
|
Summary: Python interface for kf6-kunitconversion
|
|
|
|
%description -n python3-kf6-kunitconversion
|
|
This package provides a python interface for kf6-kunitconversion.
|
|
%endif
|
|
|
|
%lang_package -n libKF6UnitConversion6
|
|
|
|
%prep
|
|
%autosetup -p1 -n %{rname}-%{version}
|
|
|
|
%build
|
|
%cmake_kf6 \
|
|
%if %{with kde_python_bindings}
|
|
-DPython_EXECUTABLE:STRING=%{__mypython}
|
|
%else
|
|
-DBUILD_PYTHON_BINDINGS=OFF
|
|
%endif
|
|
%{nil}
|
|
|
|
%kf6_build
|
|
|
|
%install
|
|
%kf6_install
|
|
|
|
%fdupes %{buildroot}
|
|
|
|
%find_lang kunitconversion6
|
|
|
|
%ldconfig_scriptlets -n libKF6UnitConversion6
|
|
|
|
%files
|
|
%{_kf6_debugdir}/kunitconversion.categories
|
|
|
|
%files -n libKF6UnitConversion6
|
|
%license LICENSES/*
|
|
%doc README.md
|
|
%{_kf6_libdir}/libKF6UnitConversion.so.*
|
|
|
|
%files devel
|
|
%{_kf6_includedir}/KUnitConversion/
|
|
%{_kf6_cmakedir}/KF6UnitConversion/
|
|
%{_kf6_libdir}/libKF6UnitConversion.so
|
|
|
|
%if %{with kde_python_bindings}
|
|
%files -n python3-kf6-kunitconversion
|
|
%{mypython_sitearch}/*.so
|
|
%endif
|
|
|
|
%files -n libKF6UnitConversion6-lang -f kunitconversion6.lang
|
|
|
|
%changelog
|