]>
Commit | Line | Data |
---|---|---|
e932793f WF |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build with tests | |
e35ff744 | 4 | # TODO: |
61d3db40 | 5 | # - fix build with aspell |
a6aa1aa4 | 6 | %define kdeframever 5.97 |
6291070e | 7 | %define qtver 5.15.2 |
61d3db40 | 8 | %define kfname sonnet |
e35ff744 WF |
9 | |
10 | Summary: Multi-language spell checker | |
379e0ba4 | 11 | Summary(pl.UTF-8): Wielojęzyczne narzędzie do sprawdzania pisowni |
61d3db40 | 12 | Name: kf5-%{kfname} |
a6aa1aa4 | 13 | Version: 5.97.0 |
385ab089 | 14 | Release: 1 |
e35ff744 WF |
15 | License: LGPL v2.1+ |
16 | Group: X11/Libraries | |
a021bbe3 | 17 | Source0: https://download.kde.org/stable/frameworks/%{kdeframever}/%{kfname}-%{version}.tar.xz |
a6aa1aa4 | 18 | # Source0-md5: 8975618339356417006c31da3b8ca8c1 |
e35ff744 | 19 | URL: http://www.kde.org/ |
61d3db40 | 20 | BuildRequires: Qt5Core-devel >= %{qtver} |
61d3db40 AM |
21 | BuildRequires: Qt5Test-devel >= %{qtver} |
22 | BuildRequires: Qt5Widgets-devel >= %{qtver} | |
3f3358fd | 23 | BuildRequires: aspell |
e35ff744 | 24 | BuildRequires: aspell-devel |
6291070e | 25 | BuildRequires: cmake >= 3.16 |
e35ff744 WF |
26 | BuildRequires: hspell-devel |
27 | BuildRequires: hunspell-devel | |
7551183b | 28 | BuildRequires: kf5-extra-cmake-modules >= %{version} |
f88c2bcc | 29 | BuildRequires: libvoikko-devel |
3345f3c2 | 30 | BuildRequires: ninja |
61d3db40 | 31 | BuildRequires: qt5-linguist >= %{qtver} |
ee8f0811 | 32 | BuildRequires: rpmbuild(macros) >= 1.736 |
cb665e08 ER |
33 | BuildRequires: tar >= 1:1.22 |
34 | BuildRequires: xz | |
e35ff744 | 35 | BuildRequires: zlib-devel |
3557adce JP |
36 | Requires: Qt5Core >= %{qtver} |
37 | Requires: Qt5Widgets >= %{qtver} | |
fa53934d | 38 | Requires: kf5-dirs |
e35ff744 WF |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %define qt5dir %{_libdir}/qt5 | |
42 | ||
43 | %description | |
44 | Sonnet is a plugin-based spell checking library for Qt-based | |
45 | applications. It supports several different plugins, including HSpell, | |
379e0ba4 | 46 | ASpell and HUNSPELL. |
e35ff744 WF |
47 | |
48 | It also supports automated language detection, based on a combination | |
49 | of different algorithms. | |
50 | ||
51 | The simplest way to use Sonnet in your application is to use the | |
52 | SpellCheckDecorator class on your QTextEdit. | |
53 | ||
379e0ba4 JB |
54 | %description -l pl.UTF-8 |
55 | Sonnet to oparta na wtyczkach biblioteka do sprawdzania pisowni dla | |
56 | aplikacji opartych na Qt. Obsługuje kilka różnych wtyzek, w tym | |
57 | HSpell, ASpell i HUNSPELL. | |
58 | ||
59 | Pozwala automatycznie wykrywać język w oparciu o połączenie różnych | |
60 | algorytmów. | |
61 | ||
62 | Najprostszy sposób użycia Sonneta w aplikacji to użycie klasy | |
63 | SpellCheckDecorator w obiekcie QTextEdit. | |
64 | ||
e35ff744 | 65 | %package devel |
61d3db40 AM |
66 | Summary: Header files for %{kfname} development |
67 | Summary(pl.UTF-8): Pliki nagłówkowe dla programistów używających %{kfname} | |
e35ff744 WF |
68 | Group: X11/Development/Libraries |
69 | Requires: %{name} = %{version}-%{release} | |
3557adce | 70 | Requires: Qt5Core-devel >= %{qtver} |
e35ff744 WF |
71 | |
72 | %description devel | |
61d3db40 | 73 | Header files for %{kfname} development. |
e35ff744 WF |
74 | |
75 | %description devel -l pl.UTF-8 | |
61d3db40 | 76 | Pliki nagłówkowe dla programistów używających %{kfname}. |
e35ff744 WF |
77 | |
78 | %prep | |
61d3db40 | 79 | %setup -q -n %{kfname}-%{version} |
e35ff744 WF |
80 | |
81 | %build | |
82 | install -d build | |
83 | cd build | |
3345f3c2 | 84 | %cmake -G Ninja \ |
e932793f | 85 | %{!?with_tests:-DBUILD_TESTING=OFF} \ |
61d3db40 | 86 | -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ |
e35ff744 | 87 | ../ |
3345f3c2 | 88 | %ninja_build |
e35ff744 | 89 | |
e932793f WF |
90 | %if %{with tests} |
91 | ctest | |
92 | %endif | |
93 | ||
94 | ||
e35ff744 WF |
95 | %install |
96 | rm -rf $RPM_BUILD_ROOT | |
3345f3c2 | 97 | %ninja_install -C build |
e35ff744 | 98 | |
535c7d7c | 99 | %find_lang %{kfname}5_qt --with-qm --all-name --with-kde |
e35ff744 WF |
100 | |
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
f88c2bcc JB |
104 | %post -p /sbin/ldconfig |
105 | %postun -p /sbin/ldconfig | |
e35ff744 | 106 | |
61d3db40 | 107 | %files -f %{kfname}5_qt.lang |
e35ff744 WF |
108 | %defattr(644,root,root,755) |
109 | %doc README.md | |
69e779c3 | 110 | %attr(755,root,root) %{_bindir}/gentrigrams |
fa53934d | 111 | %attr(755,root,root) %{_bindir}/parsetrigrams |
f91897c1 | 112 | %ghost %{_libdir}/libKF5SonnetCore.so.5 |
689dcc14 | 113 | %attr(755,root,root) %{_libdir}/libKF5SonnetCore.so.*.* |
f91897c1 | 114 | %ghost %{_libdir}/libKF5SonnetUi.so.5 |
689dcc14 | 115 | %attr(755,root,root) %{_libdir}/libKF5SonnetUi.so.*.* |
e35ff744 | 116 | %dir %{qt5dir}/plugins/kf5/sonnet |
561a8ff3 AM |
117 | %attr(755,root,root) %{qt5dir}/plugins/kf5/sonnet/sonnet_aspell.so |
118 | %attr(755,root,root) %{qt5dir}/plugins/kf5/sonnet/sonnet_hspell.so | |
119 | %attr(755,root,root) %{qt5dir}/plugins/kf5/sonnet/sonnet_hunspell.so | |
3f3358fd | 120 | %attr(755,root,root) %{qt5dir}/plugins/kf5/sonnet/sonnet_voikko.so |
e86d6925 WF |
121 | %attr(755,root,root) %{_libdir}/qt5/qml/org/kde/sonnet/libsonnetquickplugin.so |
122 | %dir %{_libdir}/qt5/qml/org/kde/sonnet | |
123 | %{_libdir}/qt5/qml/org/kde/sonnet/plugins.qmltypes | |
124 | %{_libdir}/qt5/qml/org/kde/sonnet/qmldir | |
e0059170 | 125 | %attr(755,root,root) %{qt5dir}/plugins/designer/sonnetui5widgets.so |
bf0726eb | 126 | %{_datadir}/qlogging-categories5/sonnet.categories |
2eecfd0e | 127 | %{_datadir}/qlogging-categories5/sonnet.renamecategories |
e35ff744 WF |
128 | |
129 | %files devel | |
130 | %defattr(644,root,root,755) | |
131 | %{_includedir}/KF5/SonnetCore | |
132 | %{_includedir}/KF5/SonnetUi | |
0425db44 | 133 | %{_includedir}/KF5/Sonnet |
e35ff744 | 134 | %{_libdir}/cmake/KF5Sonnet |
f91897c1 WF |
135 | %{_libdir}/libKF5SonnetCore.so |
136 | %{_libdir}/libKF5SonnetUi.so | |
e35ff744 WF |
137 | %{qt5dir}/mkspecs/modules/qt_SonnetCore.pri |
138 | %{qt5dir}/mkspecs/modules/qt_SonnetUi.pri |