]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with tests # build with tests | |
4 | %define kdeframever 5.111 | |
5 | %define qtver 5.15.2 | |
6 | %define kfname threadweaver | |
7 | ||
8 | Summary: Helper for multithreaded programming | |
9 | Name: kf5-%{kfname} | |
10 | Version: 5.111.0 | |
11 | Release: 1 | |
12 | License: LGPL v2.1+ | |
13 | Group: X11/Libraries | |
14 | Source0: https://download.kde.org/stable/frameworks/%{kdeframever}/%{kfname}-%{version}.tar.xz | |
15 | # Source0-md5: 8f43d5fc5648940cbf6b700b4ef20eb3 | |
16 | URL: http://www.kde.org/ | |
17 | BuildRequires: Qt5Core-devel >= %{qtver} | |
18 | BuildRequires: Qt5Test-devel >= %{qtver} | |
19 | BuildRequires: cmake >= 3.16 | |
20 | BuildRequires: kf5-extra-cmake-modules >= %{version} | |
21 | BuildRequires: ninja | |
22 | BuildRequires: rpmbuild(macros) >= 1.164 | |
23 | BuildRequires: tar >= 1:1.22 | |
24 | BuildRequires: xz | |
25 | BuildRequires: zlib-devel | |
26 | Requires: kf5-dirs | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %define qt5dir %{_libdir}/qt5 | |
30 | ||
31 | %description | |
32 | ThreadWeaver is a helper for multithreaded programming. It uses a | |
33 | job-based interface to queue tasks and execute them in an efficient | |
34 | way. | |
35 | ||
36 | You simply divide the workload into jobs, state the dependencies | |
37 | between the jobs and ThreadWeaver will work out the most efficient way | |
38 | of dividing the work between threads within a set of resource limits. | |
39 | ||
40 | See the information on [use cases](@ref usecases) and [why | |
41 | multithreading can help](@ref multithreading), as well as the usage | |
42 | section below, for more detailed information. | |
43 | ||
44 | %package devel | |
45 | Summary: Header files for %{kfname} development | |
46 | Summary(pl.UTF-8): Pliki nagłówkowe dla programistów używających %{kfname} | |
47 | Group: X11/Development/Libraries | |
48 | Requires: %{name} = %{version}-%{release} | |
49 | ||
50 | %description devel | |
51 | Header files for %{kfname} development. | |
52 | ||
53 | %description devel -l pl.UTF-8 | |
54 | Pliki nagłówkowe dla programistów używających %{kfname}. | |
55 | ||
56 | %prep | |
57 | %setup -q -n %{kfname}-%{version} | |
58 | ||
59 | %build | |
60 | %cmake -B build \ | |
61 | -G Ninja \ | |
62 | %{!?with_tests:-DBUILD_TESTING=OFF} \ | |
63 | -DKDE_INSTALL_USE_QT_SYS_PATHS=ON | |
64 | ||
65 | %ninja_build -C build | |
66 | ||
67 | %if %{with tests} | |
68 | %ninja_build -C build test | |
69 | %endif | |
70 | ||
71 | ||
72 | %install | |
73 | rm -rf $RPM_BUILD_ROOT | |
74 | %ninja_install -C build | |
75 | ||
76 | %clean | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %post -p /sbin/ldconfig | |
80 | %postun -p /sbin/ldconfig | |
81 | ||
82 | %files | |
83 | %defattr(644,root,root,755) | |
84 | %doc README.md | |
85 | %ghost %{_libdir}/libKF5ThreadWeaver.so.5 | |
86 | %attr(755,root,root) %{_libdir}/libKF5ThreadWeaver.so.*.* | |
87 | ||
88 | %files devel | |
89 | %defattr(644,root,root,755) | |
90 | %{_includedir}/KF5/ThreadWeaver | |
91 | %{_libdir}/cmake/KF5ThreadWeaver | |
92 | %{_libdir}/libKF5ThreadWeaver.so | |
93 | %{qt5dir}/mkspecs/modules/qt_ThreadWeaver.pri |