summaryrefslogtreecommitdiff
path: root/ktouch.spec
blob: dcb6ab1779796122c354eb9b9e5324562199637e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
%undefine __cmake_in_source_build
%global majmin_ver %(echo %{version} | cut -d. -f1,2)

Name:          ktouch
Summary:       Touch Typing Tutor 
Version:       22.08.0
Release:       1

License:       GPLv2+
URL:           https://www.kde.org/applications/education/ktouch/

%global revision %(echo %{version} | cut -d. -f3)

%if %{revision} >= 50
%global stable unstable
%else
%global stable stable
%endif

Source0:       http://download.kde.org/%{stable}/release-service/%{version}/src/%{name}-%{version}.tar.xz

BuildRequires: desktop-file-utils
BuildRequires: extra-cmake-modules
BuildRequires: kf5-rpm-macros
BuildRequires: cmake(KF5Completion)
BuildRequires: cmake(KF5Config)
BuildRequires: cmake(KF5ConfigWidgets)
BuildRequires: cmake(KF5CoreAddons)
BuildRequires: cmake(KF5Declarative)
BuildRequires: cmake(KF5DocTools)
BuildRequires: cmake(KF5I18n)
BuildRequires: cmake(KF5IconThemes)
BuildRequires: cmake(KF5ItemViews)
BuildRequires: cmake(KF5KCMUtils)
BuildRequires: cmake(KF5TextWidgets)
BuildRequires: cmake(KF5WidgetsAddons)
BuildRequires: cmake(KF5WindowSystem)
BuildRequires: cmake(KF5XmlGui)
BuildRequires: cmake(Qt5Gui)
BuildRequires: cmake(Qt5Qml)
BuildRequires: cmake(Qt5Quick)
BuildRequires: cmake(Qt5QuickWidgets)
BuildRequires: cmake(Qt5QuickControls2)
BuildRequires: cmake(Qt5Script)
BuildRequires: cmake(Qt5Sql)
BuildRequires: cmake(Qt5Test)
BuildRequires: cmake(Qt5Widgets)
BuildRequires: cmake(Qt5X11Extras)
BuildRequires: cmake(Qt5Xml)
BuildRequires: cmake(Qt5XmlPatterns)
BuildRequires: libappstream-glib
BuildRequires: pkgconfig(xcb-xkb)
BuildRequires: pkgconfig(xkbfile)

Requires:      kqtquickcharts%{?_isa} >= %{majmin_ver}
Requires:      qt5-qtquickcontrols qt5-qtgraphicaleffects

Conflicts:     kdeedu < 4.7.0-10

%description
%{summary}.


%prep
%autosetup


%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} .. \
  -DCOMPILE_QML:BOOL=OFF
popd
%make_build -C %{_target_platform}


%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}

%find_lang %{name} --all-name --with-html --with-man


%check
appstream-util validate-relax --nonet %{buildroot}%{_kf5_metainfodir}/org.kde.%{name}.appdata.xml ||:
desktop-file-validate %{buildroot}%{_kf5_datadir}/applications/org.kde.%{name}.desktop


%files -f %{name}.lang
%doc AUTHORS
%license LICENSES/* 
%{_kf5_bindir}/ktouch
%{_kf5_datadir}/ktouch/
%{_kf5_metainfodir}/org.kde.%{name}.appdata.xml
%{_kf5_datadir}/applications/org.kde.%{name}.desktop
%{_kf5_datadir}/config.kcfg/ktouch.kcfg
%{_kf5_datadir}/icons/hicolor/*/*/ktouch.*
%{_mandir}/man1/ktouch.*


%changelog
* Mon Dec 19 2022 misaka00251 <liuxin@iscas.ac.cn> - 22.08.0-1
- Init package