From a00d3f940cf70573de5381480c4710130a58dc84 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 29 Mar 2024 18:23:13 +0100 Subject: [PATCH] update to 0.7.1 [release 0.7.1-1mamba;Sun Mar 03 2024] --- ...geannotator-0.7.1-rename-qt5-version.patch | 21 ++++++ kimageannotator.spec | 73 +++++++++++++++---- 2 files changed, 78 insertions(+), 16 deletions(-) create mode 100644 kimageannotator-0.7.1-rename-qt5-version.patch diff --git a/kimageannotator-0.7.1-rename-qt5-version.patch b/kimageannotator-0.7.1-rename-qt5-version.patch new file mode 100644 index 0000000..f33bbaf --- /dev/null +++ b/kimageannotator-0.7.1-rename-qt5-version.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8f3516e..7e1960f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,7 +21,7 @@ if (WIN32) + elseif (APPLE) + set(KIMAGEANNOTATOR_LANG_INSTALL_DIR "../Resources") + elseif (UNIX) +- set(KIMAGEANNOTATOR_LANG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/kImageAnnotator/translations") ++ set(KIMAGEANNOTATOR_LANG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/kImageAnnotator-Qt5/translations") + string(REGEX REPLACE "//" "/" KIMAGEANNOTATOR_LANG_INSTALL_DIR "${KIMAGEANNOTATOR_LANG_INSTALL_DIR}") + endif () + +@@ -97,6 +97,7 @@ set_target_properties(kImageAnnotator + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin + VERSION ${PROJECT_VERSION} + SOVERSION 0 ++ OUTPUT_NAME kImageAnnotator-Qt5 + ) + + install(TARGETS kImageAnnotator diff --git a/kimageannotator.spec b/kimageannotator.spec index 4727339..812c2a8 100644 --- a/kimageannotator.spec +++ b/kimageannotator.spec @@ -1,5 +1,5 @@ Name: kimageannotator -Version: 0.7.0 +Version: 0.7.1 Release: 1mamba Summary: Tool for annotating images Group: Applications/Graphics @@ -8,15 +8,20 @@ Distribution: openmamba Packager: Silvan Calarco URL: https://github.com/ksnip/kImageAnnotator Source: https://github.com/ksnip/kImageAnnotator.git/v%{version}/kImageAnnotator-%{version}.tar.bz2 +Patch0: kimageannotator-0.7.1-rename-qt5-version.patch License: LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libQt5Svg-devel BuildRequires: libX11-devel BuildRequires: libgcc +BuildRequires: libglvnd-devel BuildRequires: libkcolorpicker-devel +BuildRequires: libkcolorpicker-qt6-devel BuildRequires: libstdc++6-devel BuildRequires: qt5-qtbase-devel +BuildRequires: qt6-qtbase-devel +BuildRequires: qt6-qtsvg-devel ## AUTOBUILDREQ-END BuildRequires: cmake Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} @@ -39,28 +44,49 @@ Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} %description -n lib%{name}-devel This package contains libraries and header files for developing applications that use %{name}. +%package -n lib%{name}-qt6 +Group: System/Libraries +Summary: Shared libraries for %{name} + +%description -n lib%{name}-qt6 +This package contains shared libraries for %{name}. + +%package -n lib%{name}-qt6-devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: lib%{name}-qt6 = %{?epoch:%epoch:}%{version}-%{release} + +%description -n lib%{name}-qt6-devel +This package contains libraries and header files for developing applications that use %{name}. %debug_package %prep -%setup -q -n kImageAnnotator-%{version} +%setup -q -c +mv kImageAnnotator-%{version} %{name}-qt5 +cp -a %{name}-qt5 %{name}-qt6 +cd %{name}-qt5 +%patch 0 -p1 -b .rename-qt5-version %build +cd %{name}-qt5 + %cmake -d build %make +cd ../../%{name}-qt6 + +%cmake -d build \ + -DBUILD_WITH_QT6=ON + +%make + %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" -%makeinstall -C build +%makeinstall -C %{name}-qt5/build +%makeinstall -C %{name}-qt6/build -# Symlinks for backwards compatibility -mkdir -p %{buildroot}%{_libdir}/cmake/kImageAnnotator -ln -s ../kImageAnnotator-Qt5/kImageAnnotator-Qt5Config.cmake %{buildroot}%{_libdir}/cmake/kImageAnnotator/kImageAnnotatorConfig.cmake -ln -s ../kImageAnnotator-Qt5/kImageAnnotator-Qt5Config-version.cmake %{buildroot}%{_libdir}/cmake/kImageAnnotator/kImageAnnotatorConfig-version.cmake -ln -s ../kImageAnnotator-Qt5/kImageAnnotator-targets.cmake %{buildroot}%{_libdir}/cmake/kImageAnnotator/ -ln -s ../kImageAnnotator-Qt5/kImageAnnotator-targets-noconfig.cmake %{buildroot}%{_libdir}/cmake/kImageAnnotator/ - -%find_lang %{name}5_qt --with-qt --all-name || touch %{name}5_qt.lang +%find_lang %{name} --with-qt --all-name || touch %{name}.lang %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" @@ -68,10 +94,10 @@ ln -s ../kImageAnnotator-Qt5/kImageAnnotator-targets-noconfig.cmake %{buildroot} %post -n lib%{name} -p /sbin/ldconfig %postun -n lib%{name} -p /sbin/ldconfig -%files -n lib%{name} -f %{name}5_qt.lang +%files -n lib%{name} -f %{name}.lang %defattr(-,root,root) %{_libdir}/libkImageAnnotator-Qt5.so.* -%doc LICENSE +%doc %{name}-qt5/LICENSE %files -n lib%{name}-devel %defattr(-,root,root) @@ -81,11 +107,26 @@ ln -s ../kImageAnnotator-Qt5/kImageAnnotator-targets-noconfig.cmake %{buildroot} %{_libdir}/libkImageAnnotator-Qt5.so %dir %{_libdir}/cmake/kImageAnnotator-Qt5 %{_libdir}/cmake/kImageAnnotator-Qt5/kImageAnnotator*.cmake -%dir %{_libdir}/cmake/kImageAnnotator -%{_libdir}/cmake/kImageAnnotator/*.cmake -%doc README.md +%doc %{name}-qt5/README.md + +%files -n lib%{name}-qt6 -f %{name}.lang +%defattr(-,root,root) +%{_libdir}/libkImageAnnotator.so.* +%doc %{name}-qt5/LICENSE + +%files -n lib%{name}-qt6-devel +%defattr(-,root,root) +%dir %{_includedir}/kImageAnnotator-Qt6 +%dir %{_includedir}/kImageAnnotator-Qt6/kImageAnnotator +%{_includedir}/kImageAnnotator-Qt6/kImageAnnotator/* +%{_libdir}/libkImageAnnotator.so +%dir %{_libdir}/cmake/kImageAnnotator-Qt6 +%{_libdir}/cmake/kImageAnnotator-Qt6/kImageAnnotator*.cmake %changelog +* Sun Mar 03 2024 Silvan Calarco 0.7.1-1mamba +- update to 0.7.1 + * Fri Jan 26 2024 Automatic Build System 0.7.0-1mamba - automatic version update by autodist