[packages/PackageKit-qt5] - added qt6 binding
qboosh
qboosh at pld-linux.org
Thu Apr 13 18:32:45 CEST 2023
commit 650d0748dea748ce5b5201e7a754888fb2b87cf0
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Apr 13 18:35:21 2023 +0200
- added qt6 binding
PackageKit-qt5.spec | 98 ++++++++++++++++++++++++++++++++++++++++++++++-------
1 file changed, 85 insertions(+), 13 deletions(-)
---
diff --git a/PackageKit-qt5.spec b/PackageKit-qt5.spec
index 4271838..2084dfe 100644
--- a/PackageKit-qt5.spec
+++ b/PackageKit-qt5.spec
@@ -1,6 +1,10 @@
-# TODO: qt6 variant (-DBUILD_WITH_QT6=ON)
-Summary: packagekit-qt5 library
-Summary(pl.UTF-8): Biblioteka packagekit-qt5
+#
+# Conditional build:
+%bcond_without qt5 # Qt5 library
+%bcond_without qt6 # Qt6 library
+
+Summary: Qt 5 bindings for PackageKit
+Summary(pl.UTF-8): Wiązania Qt 5 do biblioteki PackageKit
Name: PackageKit-qt5
Version: 1.1.1
Release: 1
@@ -10,23 +14,28 @@ Source0: https://www.freedesktop.org/software/PackageKit/releases/PackageKit-Qt-
# Source0-md5: f0dc0e54a8eb84e418242c7678e905f7
URL: https://www.freedesktop.org/software/PackageKit/
BuildRequires: PackageKit-devel >= 0.8.11
-BuildRequires: Qt5Core-devel >= 5.10.0
-BuildRequires: Qt5DBus-devel >= 5.10.0
-BuildRequires: Qt5Xml-devel >= 5.10.0
BuildRequires: cmake >= 3.2
BuildRequires: libstdc++-devel >= 6:4.7
BuildRequires: pkgconfig
+%if %{with qt5}
+BuildRequires: Qt5Core-devel >= 5.10.0
+BuildRequires: Qt5DBus-devel >= 5.10.0
BuildRequires: qt5-build >= 5.10.0
+%endif
+%if %{with qt6}
+BuildRequires: Qt6Core-devel >= 6.0.0
+BuildRequires: Qt6DBus-devel >= 6.0.0
+BuildRequires: qt6-build >= 6.0.0
+%endif
Requires: Qt5Core >= 5.10.0
Requires: Qt5DBus >= 5.10.0
-Requires: Qt5Xml >= 5.10.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-packagekit-qt5 library.
+Qt 5 bindings for PackageKit.
%description -l pl.UTF-8
-Biblioteka packagekit-qt5.
+Wiązania Qt 5 do biblioteki PackageKit.
%package devel
Summary: Header files for packagekit-qt5 library
@@ -35,7 +44,6 @@ Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: Qt5Core-devel >= 5.10.0
Requires: Qt5DBus-devel >= 5.10.0
-Requires: Qt5Xml-devel >= 5.10.0
%description devel
Header files for packagekit-qt5 library.
@@ -43,21 +51,68 @@ Header files for packagekit-qt5 library.
%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki packagekit-qt5.
+%package -n PackageKit-qt6
+Summary: Qt 6 bindings for PackageKit
+Summary(pl.UTF-8): Wiązania Qt 6 do biblioteki PackageKit
+Group: Libraries
+Requires: Qt6Core >= 6.0.0
+Requires: Qt6DBus >= 6.0.0
+
+%description -n PackageKit-qt6
+Qt 6 bindings for PackageKit.
+
+%description -n PackageKit-qt6 -l pl.UTF-8
+Wiązania Qt 6 do biblioteki PackageKit.
+
+%package -n PackageKit-qt6-devel
+Summary: Header files for packagekit-qt6 library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki packagekit-qt6
+Group: Development/Libraries
+Requires: PackageKit-qt6 = %{version}-%{release}
+Requires: Qt6Core-devel >= 6.0.0
+Requires: Qt6DBus-devel >= 6.0.0
+
+%description -n PackageKit-qt6-devel
+Header files for packagekit-qt6 library.
+
+%description -n PackageKit-qt6-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki packagekit-qt6.
+
%prep
%setup -q -n PackageKit-Qt-%{version}
%build
-install -d build
-cd build
+%if %{with qt5}
+install -d build-qt5
+cd build-qt5
%cmake ..
%{__make}
+cd ..
+%endif
+
+%if %{with qt6}
+install -d build-qt6
+cd build-qt6
+%cmake .. \
+ -DBUILD_WITH_QT6=ON
+
+%{__make}
+cd ..
+%endif
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} -C build install \
+%if %{with qt5}
+%{__make} -C build-qt5 install \
+ DESTDIR=$RPM_BUILD_ROOT
+%endif
+
+%if %{with qt6}
+%{__make} -C build-qt6 install \
DESTDIR=$RPM_BUILD_ROOT
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -65,6 +120,7 @@ rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+%if %{with qt5}
%files
%defattr(644,root,root,755)
%doc AUTHORS MAINTAINERS NEWS README.md TODO
@@ -77,3 +133,19 @@ rm -rf $RPM_BUILD_ROOT
%{_pkgconfigdir}/packagekitqt5.pc
%{_includedir}/packagekitqt5
%{_libdir}/cmake/packagekitqt5
+%endif
+
+%if %{with qt6}
+%files -n PackageKit-qt6
+%defattr(644,root,root,755)
+%doc AUTHORS MAINTAINERS NEWS README.md TODO
+%attr(755,root,root) %{_libdir}/libpackagekitqt6.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libpackagekitqt6.so.1
+
+%files -n PackageKit-qt6-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libpackagekitqt6.so
+%{_pkgconfigdir}/packagekitqt6.pc
+%{_includedir}/packagekitqt6
+%{_libdir}/cmake/packagekitqt6
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/PackageKit-qt5.git/commitdiff/650d0748dea748ce5b5201e7a754888fb2b87cf0
More information about the pld-cvs-commit
mailing list