commit b23a671c538c90e0e0cbfd4d71f787e5f02ca367
Author: Witold Filipczyk <[email protected]>
Date:   Sat Sep 14 21:14:42 2024 +0200

    - updated to 0.7.1
    - qt5 and qt6 version (qt5 disabled)

 kImageAnnotator.spec | 125 ++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 94 insertions(+), 31 deletions(-)
---
diff --git a/kImageAnnotator.spec b/kImageAnnotator.spec
index 46a145a..7bd1e91 100644
--- a/kImageAnnotator.spec
+++ b/kImageAnnotator.spec
@@ -1,17 +1,20 @@
 #
 # Conditional build:
 %bcond_with    tests           # build with tests
+%bcond_with    qt5             # build with qt5 version
+%bcond_without qt6             # build without qt6 version
 Summary:       Tool for annotating images
 Name:          kImageAnnotator
-Version:       0.6.0
-Release:       3
+Version:       0.7.1
+Release:       1
 License:       LGPL 3.0
 Group:         X11/Libraries
 Source0:       
https://github.com/ksnip/kImageAnnotator/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 129cf1fa60991091da91ef18cc587b65
+# Source0-md5: 68990dfe7fe03f1aff5e0e5338b9f3bb
 URL:           https://github.com/ksnip/kImageAnnotator/
-BuildRequires: cmake >= 2.8.12
-BuildRequires: kColorPicker-devel
+BuildRequires: cmake >= 3.20
+%{?with_qt5:BuildRequires:     kColorPicker-qt5-devel >= 0.3.1}
+%{?with_qt6:BuildRequires:     kColorPicker-qt6-devel >= 0.3.1}
 BuildRequires: ninja
 BuildRequires: pkgconfig
 BuildRequires: rpmbuild(macros) >= 1.164
@@ -22,60 +25,120 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %description
 Tool for annotating images.
 
-%package devel
-Summary:       Header files for %{name} development
-Summary(pl.UTF-8):     Pliki nagłówkowe dla programistów używających %{name}
+%package qt5
+Summary:       Tool for annotating images
+Obsoletes:     %{name} < 0.7.1
+Conflicts:     %{name}-qt6
+
+%description qt5
+Tool for annotating images. Qt5 version.
+
+%package qt5-devel
+Summary:       Header files for %{name}-qt5 development
+Summary(pl.UTF-8):     Pliki nagłówkowe dla programistów używających 
%{name}-qt5
 Group:         X11/Development/Libraries
-Requires:      %{name} = %{version}-%{release}
-Requires:      cmake >= 3.16
+Requires:      %{name}-qt5 = %{version}-%{release}
+Requires:      cmake >= 3.20
+
+%description qt5-devel
+Header files for %{name}-qt5 development.
 
-%description devel
-Header files for %{name} development.
+%description qt5-devel -l pl.UTF-8
+Pliki nagłówkowe dla programistów używających %{name}-qt5.
 
-%description devel -l pl.UTF-8
-Pliki nagłówkowe dla programistów używających %{name}.
+%package qt6
+Summary:       Tool for annotating images
+Conflicts:     %{name}-qt5
+
+%description qt6
+Tool for annotating images. Qt6 version.
+
+%package qt6-devel
+Summary:       Header files for %{name}-qt6 development
+Summary(pl.UTF-8):     Pliki nagłówkowe dla programistów używających 
%{name}-qt6
+Group:         X11/Development/Libraries
+Requires:      %{name}-qt6 = %{version}-%{release}
+Requires:      cmake >= 3.20
+
+%description qt6-devel
+Header files for %{name}-qt6 development.
+
+%description qt6-devel -l pl.UTF-8
+Pliki nagłówkowe dla programistów używających %{name}-qt6.
 
 %prep
 %setup -q
 
 %build
-install -d build
-cd build
-%cmake \
+%if %{with qt5}
+%cmake -B build-qt5 \
        -G Ninja \
        %{!?with_tests:-DBUILD_TESTING=OFF} \
        -DHTML_INSTALL_DIR=%{_kdedocdir} \
        -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-       -DCMAKE_INSTALL_DATAROOTDIR="share" \
-       ..
-%ninja_build
+       -DCMAKE_INSTALL_DATAROOTDIR="share"
+
+%ninja_build -C build-qt5
 
 %if %{with tests}
-ctest
+ctest --test-dir build-qt5
+%endif
 %endif
 
+%if %{with qt6}
+%cmake -B build-qt6 \
+       -G Ninja \
+       %{!?with_tests:-DBUILD_TESTING=OFF} \
+       -DBUILD_WITH_QT6=ON \
+       -DHTML_INSTALL_DIR=%{_kdedocdir} \
+       -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+       -DCMAKE_INSTALL_DATAROOTDIR="share"
+
+%ninja_build -C build-qt6
+
+%if %{with tests}
+ctest --test-dir build-qt6
+%endif
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%ninja_install -C build
+%{?with_qt5:%ninja_install -C build-qt5}
+%{?with_qt6:%ninja_install -C build-qt6}
 
 %find_lang %{name} --all-name --with-qm
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post  -p /sbin/ldconfig
-%postun        -p /sbin/ldconfig
+%post  qt5 -p /sbin/ldconfig
+%postun        qt5 -p /sbin/ldconfig
 
-%files -f %{name}.lang
+%post  qt6 -p /sbin/ldconfig
+%postun        qt6 -p /sbin/ldconfig
+
+%if %{with qt5}
+%files qt5 -f %{name}.lang
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libkImageAnnotator.so.*.*.*
 %ghost %{_libdir}/libkImageAnnotator.so.0
-%dir %{_datadir}/kImageAnnotator
-%dir %{_datadir}/kImageAnnotator/translations
+%attr(755,root,root) %{_libdir}/libkImageAnnotator.so.*.*
 
-%files devel
+%files qt5-devel
 %defattr(644,root,root,755)
+%{_includedir}/kImageAnnotator-Qt5
+%{_libdir}/cmake/kImageAnnotator-Qt5
 %{_libdir}/libkImageAnnotator.so
-%{_includedir}/kImageAnnotator
-%{_libdir}/cmake/kImageAnnotator
+%endif
+
+%if %{with qt6}
+%files qt6 -f %{name}.lang
+%defattr(644,root,root,755)
+%ghost %{_libdir}/libkImageAnnotator.so.0
+%attr(755,root,root) %{_libdir}/libkImageAnnotator.so.*.*
+
+%files qt6-devel
+%defattr(644,root,root,755)
+%{_includedir}/kImageAnnotator-Qt6
+%{_libdir}/cmake/kImageAnnotator-Qt6
+%{_libdir}/libkImageAnnotator.so
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kImageAnnotator.git/commitdiff/b23a671c538c90e0e0cbfd4d71f787e5f02ca367

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to