]>
Commit | Line | Data |
---|---|---|
7c2704a0 WF |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build with tests | |
5bff2a83 | 4 | # TODO: |
cdeaa9d4 | 5 | # find_lang needs to be updated (to handle pmap, pmapc, js files) |
253e1ed9 | 6 | %define kdeframever 5.98 |
7c63c1b2 | 7 | %define qtver 5.15.2 |
cdeaa9d4 | 8 | %define kfname ki18n |
5bff2a83 WF |
9 | |
10 | Summary: KDE Gettext-based UI text internationalization | |
cdeaa9d4 | 11 | Name: kf5-%{kfname} |
253e1ed9 WF |
12 | Version: 5.98.0 |
13 | Release: 1 | |
5bff2a83 WF |
14 | License: LGPL v2.1+ |
15 | Group: X11/Libraries | |
1b5ebfe3 | 16 | Source0: https://download.kde.org/stable/frameworks/%{kdeframever}/%{kfname}-%{version}.tar.xz |
253e1ed9 | 17 | # Source0-md5: dc8c646da4963fdfb59f735f124e2ae8 |
5bff2a83 | 18 | URL: http://www.kde.org/ |
cdeaa9d4 AM |
19 | BuildRequires: Qt5Concurrent-devel >= %{qtver} |
20 | BuildRequires: Qt5Core-devel >= %{qtver} | |
04d1d4c8 | 21 | BuildRequires: Qt5Qml-devel >= %{qtver} |
cdeaa9d4 | 22 | BuildRequires: Qt5Test-devel >= %{qtver} |
7c63c1b2 | 23 | BuildRequires: cmake >= 3.16 |
66a5c431 | 24 | BuildRequires: kf5-extra-cmake-modules >= %{version} |
aca7f551 | 25 | BuildRequires: ninja |
04d1d4c8 | 26 | BuildRequires: python3 |
3ebab2e0 | 27 | BuildRequires: rpmbuild(macros) >= 1.736 |
70360af3 ER |
28 | BuildRequires: tar >= 1:1.22 |
29 | BuildRequires: xz | |
04d1d4c8 JP |
30 | Requires: Qt5Core >= %{qtver} |
31 | Requires: Qt5Qml >= %{qtver} | |
08e4e1a9 | 32 | Requires: kf5-dirs |
5bff2a83 WF |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | %define qt5dir %{_libdir}/qt5 | |
36 | ||
37 | %description | |
38 | KI18n provides functionality for internationalizing user interface | |
39 | text in applications, based on the GNU Gettext translation system. It | |
40 | wraps the standard Gettext functionality, so that the programmers and | |
41 | translators can use the familiar Gettext tools and workflows. | |
42 | ||
43 | KI18n provides additional functionality as well, for both programmers | |
44 | and translators, which can help to achieve a higher overall quality of | |
45 | source and translated text. This includes argument capturing, | |
46 | customizable markup, and translation scripting. | |
47 | ||
48 | %package devel | |
cdeaa9d4 AM |
49 | Summary: Header files for %{kfname} development |
50 | Summary(pl.UTF-8): Pliki nagłówkowe dla programistów używających %{kfname} | |
5bff2a83 WF |
51 | Group: X11/Development/Libraries |
52 | Requires: %{name} = %{version}-%{release} | |
7c63c1b2 | 53 | Requires: cmake >= 3.16 |
04d1d4c8 | 54 | Requires: gettext-tools |
5bff2a83 WF |
55 | |
56 | %description devel | |
cdeaa9d4 | 57 | Header files for %{kfname} development. |
5bff2a83 WF |
58 | |
59 | %description devel -l pl.UTF-8 | |
cdeaa9d4 | 60 | Pliki nagłówkowe dla programistów używających %{kfname}. |
5bff2a83 WF |
61 | |
62 | %prep | |
cdeaa9d4 | 63 | %setup -q -n %{kfname}-%{version} |
5bff2a83 WF |
64 | |
65 | %build | |
66 | install -d build | |
67 | cd build | |
aca7f551 | 68 | %cmake -G Ninja \ |
7c2704a0 | 69 | %{!?with_tests:-DBUILD_TESTING=OFF} \ |
cdeaa9d4 | 70 | -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \ |
5bff2a83 | 71 | ../ |
aca7f551 | 72 | %ninja_build |
5bff2a83 | 73 | |
7c2704a0 WF |
74 | %if %{with tests} |
75 | ctest | |
76 | %endif | |
77 | ||
78 | ||
5bff2a83 WF |
79 | %install |
80 | rm -rf $RPM_BUILD_ROOT | |
aca7f551 | 81 | %ninja_install -C build |
5bff2a83 | 82 | |
5d425044 | 83 | %find_lang %{kfname}5 --with-qm --all-name --with-kde |
5bff2a83 WF |
84 | |
85 | %clean | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | ||
88 | %post -p /sbin/ldconfig | |
89 | %postun -p /sbin/ldconfig | |
90 | ||
cdeaa9d4 | 91 | %files -f %{kfname}5.lang |
5bff2a83 WF |
92 | %defattr(644,root,root,755) |
93 | %doc README.md | |
d2df0d02 | 94 | %ghost %{_libdir}/libKF5I18n.so.5 |
ecb0c7bd | 95 | %attr(755,root,root) %{_libdir}/libKF5I18n.so.*.* |
97cd71b6 WF |
96 | %ghost %{_libdir}/libKF5I18nLocaleData.so.5 |
97 | %attr(755,root,root) %{_libdir}/libKF5I18nLocaleData.so.5.*.* | |
5bff2a83 | 98 | %attr(755,root,root) %{qt5dir}/plugins/kf5/ktranscript.so |
223a6ebd | 99 | %{_datadir}/qlogging-categories5/ki18n.categories |
f0d65952 | 100 | %{_datadir}/qlogging-categories5/ki18n.renamecategories |
97cd71b6 WF |
101 | %dir %{_libdir}/qt5/qml/org/kde/i18n |
102 | %dir %{_libdir}/qt5/qml/org/kde/i18n/localeData | |
103 | %attr(755,root,root) %{_libdir}/qt5/qml/org/kde/i18n/localeData/libki18nlocaledataqmlplugin.so | |
104 | %{_libdir}/qt5/qml/org/kde/i18n/localeData/qmldir | |
5bff2a83 WF |
105 | |
106 | %files devel | |
107 | %defattr(644,root,root,755) | |
108 | %{_includedir}/KF5/KI18n | |
97cd71b6 | 109 | %{_includedir}/KF5/KI18nLocaleData |
5bff2a83 | 110 | %{_libdir}/cmake/KF5I18n |
d2df0d02 | 111 | %{_libdir}/libKF5I18n.so |
97cd71b6 | 112 | %{_libdir}/libKF5I18nLocaleData.so |
5bff2a83 | 113 | %{qt5dir}/mkspecs/modules/qt_KI18n.pri |