[packages/libaccounts-qt] - updated to 1.17; qt6 hacks no longer needed

qboosh qboosh at pld-linux.org
Mon Aug 25 22:29:20 CEST 2025


commit bf1ce9615af2d0ca656d944648f4c5139548e42e
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Aug 25 22:31:56 2025 +0200

    - updated to 1.17; qt6 hacks no longer needed

 libaccounts-qt.spec | 79 +++++++++++++++++++++++++++++------------------------
 1 file changed, 44 insertions(+), 35 deletions(-)
---
diff --git a/libaccounts-qt.spec b/libaccounts-qt.spec
index f486ab5..67d7631 100644
--- a/libaccounts-qt.spec
+++ b/libaccounts-qt.spec
@@ -1,16 +1,18 @@
+#
 # Conditional build:
-%bcond_without	qt5	# build qt5 version
-%bcond_without	qt6	# build qt6 version
-Summary:	Accounts management library for Qt 4 applications
-Summary(pl.UTF-8):	Biblioteka do zarządzania kontami dla aplikacji opartych na bibliotece Qt 4
+%bcond_without	qt5	# Qt5 version
+%bcond_without	qt6	# Qt6 version
+
+Summary:	Accounts management library for Qt applications
+Summary(pl.UTF-8):	Biblioteka do zarządzania kontami dla aplikacji opartych na bibliotece Qt
 Name:		libaccounts-qt
-Version:	1.16
-Release:	2
+Version:	1.17
+Release:	1
 License:	LGPL v2.1
 Group:		Libraries
 #Source0Download: https://gitlab.com/accounts-sso/libaccounts-qt/tags?sort=updated_desc
 Source0:	https://gitlab.com/accounts-sso/libaccounts-qt/-/archive/VERSION_%{version}/libaccounts-qt-VERSION_%{version}.tar.bz2
-# Source0-md5:	36fd9d6b6fd5582bf6c503bfd3827a62
+# Source0-md5:	4b4bb19d80998c3db916f82a858d5b5b
 URL:		https://gitlab.com/accounts-sso/libaccounts-qt
 %if %{with qt5}
 BuildRequires:	Qt5Core-devel >= 5
@@ -20,11 +22,11 @@ BuildRequires:	qt5-build >= 5
 BuildRequires:	qt5-qmake >= 5
 %endif
 %if %{with qt6}
-BuildRequires:	Qt6Core-devel >= 5
-BuildRequires:	Qt6Test-devel >= 5
-BuildRequires:	Qt6Xml-devel >= 5
-BuildRequires:	qt6-build >= 5
-BuildRequires:	qt6-qmake >= 5
+BuildRequires:	Qt6Core-devel >= 6
+BuildRequires:	Qt6Test-devel >= 6
+BuildRequires:	Qt6Xml-devel >= 6
+BuildRequires:	qt6-build >= 6
+BuildRequires:	qt6-qmake >= 6
 %endif
 BuildRequires:	doxygen
 BuildRequires:	glib2-devel >= 2.0
@@ -61,6 +63,7 @@ Summary:	Development files for libaccounts-qt5 library
 Summary(pl.UTF-8):	Pliki programistyczne biblioteki libaccounts-qt5
 Group:		Development/Libraries
 Requires:	Qt5Core-devel >= 5
+Requires:	Qt5Xml-devel >= 5
 Requires:	libaccounts-qt5 = %{version}-%{release}
 
 %description -n libaccounts-qt5-devel
@@ -88,6 +91,7 @@ Summary:	Development files for libaccounts-qt6 library
 Summary(pl.UTF-8):	Pliki programistyczne biblioteki libaccounts-qt6
 Group:		Development/Libraries
 Requires:	Qt6Core-devel >= 5
+Requires:	Qt6Xml-devel >= 5
 Requires:	libaccounts-qt6 = %{version}-%{release}
 
 %description -n libaccounts-qt6-devel
@@ -110,33 +114,27 @@ Dokumentacja API biblioteki libaccounts-qt.
 
 %prep
 %setup -q -n %{name}-VERSION_%{version}
-echo 'INCLUDEPATH += ..' >>Accounts/Accounts.pro
-# tests are currently broken for qt6 (qmake not
-# knowing "testlib")
-sed -i -e 's, tests,,' *.pro
-
-mkdir -p qt5
-mv $(ls |grep -v qt5) qt5/
-cp -a qt5 qt6
-find qt6 -name "*5*" |while read i; do
-    mv $i ${i/5/6}
-done
-find qt6 -type f |xargs sed -i -e 's,Qt5,Qt6,g;s,qt5,qt6,g'
 
 %build
 %if %{with qt5}
-cd qt5
-qmake-qt5 accounts-qt.pro \
+install -d build-qt5
+cd build-qt5
+qmake-qt5 ../accounts-qt.pro \
+	BUILD_DIR=build-qt5 \
 	LIBDIR=%{_libdir} \
 	QMAKE_CXX="%{__cxx}" \
 	QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
 	QMAKE_LFLAGS_RELEASE="%{rpmldflags}"
+
 %{__make}
 cd ..
 %endif
+
 %if %{with qt6}
-cd qt6
-qmake-qt6 accounts-qt.pro \
+install -d build-qt6
+cd build-qt6
+qmake-qt6 ../accounts-qt.pro \
+	BUILD_DIR=build-qt6 \
 	LIBDIR=%{_libdir} \
 	QMAKE_CXX="%{__cxx}" \
 	QMAKE_CXXFLAGS_RELEASE="%{rpmcxxflags}" \
@@ -149,28 +147,31 @@ cd ..
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with qt5}
-%{__make} -C qt5 install \
+%if %{with qt6}
+%{__make} -C build-qt5 install \
 	INSTALL_ROOT=$RPM_BUILD_ROOT
 %endif
+
 %if %{with qt6}
-%{__make} -C qt6 install \
+%{__make} -C build-qt6 install \
 	INSTALL_ROOT=$RPM_BUILD_ROOT
 %endif
 
 # useless symlink
-%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/libaccounts-qt?.so.1.?
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libaccounts-qt?.so.1.?
 
 # test suite
-%{__rm} -f $RPM_BUILD_ROOT%{_bindir}/accountstest
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/accountstest
+
 # packaged as %doc
-%{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/accounts-qt
+%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/accounts-qt
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post	-n libaccounts-qt5 -p /sbin/ldconfig
 %postun	-n libaccounts-qt5 -p /sbin/ldconfig
+
 %post	-n libaccounts-qt6 -p /sbin/ldconfig
 %postun	-n libaccounts-qt6 -p /sbin/ldconfig
 
@@ -185,6 +186,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libaccounts-qt5.so
 %{_includedir}/accounts-qt5
 %{_libdir}/cmake/AccountsQt5
+%{_pkgconfigdir}/accounts-qt5.pc
 %endif
 
 %if %{with qt6}
@@ -198,8 +200,15 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libaccounts-qt6.so
 %{_includedir}/accounts-qt6
 %{_libdir}/cmake/AccountsQt6
+%{_pkgconfigdir}/accounts-qt6.pc
 %endif
 
+%if %{with qt5} || %{with qt6}
 %files apidocs
 %defattr(644,root,root,755)
-%doc qt5/doc/html/*
+%if %{with qt5}
+%doc build-qt5/doc/html/*
+%else
+%doc build-qt6/doc/html/*
+%endif
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libaccounts-qt.git/commitdiff/bf1ce9615af2d0ca656d944648f4c5139548e42e



More information about the pld-cvs-commit mailing list