summaryrefslogtreecommitdiff
path: root/kamoso.spec
blob: aeee365f35d92aff05b291f79b493f1335eac811 (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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# uncomment to enable bootstrap mode
#global bootstrap 1

%if !0%{?bootstrap}
%global tests 1
%endif

Name:           kamoso
Summary:        Application for taking pictures and videos from a webcam
Version:        22.08.0
Release:        1

License:        GPLv2+
URL:            https://userbase.kde.org/Kamoso

%global revision %(echo %{version} | cut -d. -f3)
%global majmin_ver %(echo %{version} | cut -d. -f1,2)

%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:  boost-devel
BuildRequires:  desktop-file-utils
BuildRequires:  extra-cmake-modules
BuildRequires:  gettext
BuildRequires:  kf5-rpm-macros
BuildRequires:  kf5-kconfig-devel
BuildRequires:  kf5-kcoreaddons-devel
BuildRequires:  kf5-kdeclarative-devel
BuildRequires:  kf5-kdoctools-devel
BuildRequires:  kf5-ki18n-devel
BuildRequires:  kf5-kio-devel
BuildRequires:  kf5-kwidgetsaddons-devel
BuildRequires:  kf5-solid-devel

BuildRequires:  cmake(KF5Config)
BuildRequires:  cmake(KF5DocTools)
BuildRequires:  cmake(KF5KIO)
BuildRequires:  cmake(KF5I18n)
BuildRequires:  cmake(KF5Purpose)
BuildRequires:  cmake(KF5Notifications)
BuildRequires:  cmake(KF5Kirigami2)

BuildRequires:  libappstream-glib
BuildRequires:  pkgconfig(libaccounts-glib)
BuildRequires:  pkgconfig(libudev)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Qml)
BuildRequires:  pkgconfig(gstreamer-1.0)
BuildRequires:  pkgconfig(gstreamer-base-1.0)
BuildRequires:  pkgconfig(gstreamer-video-1.0)
BuildRequires:  pkgconfig(Qt5Quick)

%if 0%{?tests}
BuildRequires:  time
BuildRequires:  xorg-x11-server-Xvfb
%endif
BuildRequires:  make

Requires:       kf5-purpose%{?_isa} >= 1.1
Requires:       qt5-qtdeclarative%{?_isa}
Requires:       qt5-qtquickcontrols%{?_isa}
Requires:       qt5-qtgraphicaleffects%{?_isa}

%description
Kamoso is an application to take pictures and videos out of your webcam.


%prep
%autosetup -p1


%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{cmake_kf5} .. \
  -DBUILD_TESTING:BOOL=%{?tests:ON}%{!?tests:OFF} -Wno-dev
popd
%make_build -C %{_target_platform}


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

%find_lang kamoso --with-html


%check
appstream-util validate-relax --nonet %{buildroot}%{_kf5_metainfodir}/org.kde.kamoso.appdata.xml
desktop-file-validate %{buildroot}%{_kf5_datadir}/applications/org.kde.kamoso.desktop
%if 0%{?tests}
export CTEST_OUTPUT_ON_FAILURE=1
xvfb-run -a \
time \
make test ARGS="--output-on-failure --timeout 300" -C %{_target_platform} ||:
%endif


%files -f kamoso.lang
%doc AUTHORS
%license LICENSES/*
%{_kf5_metainfodir}/org.kde.kamoso.appdata.xml
%{_kf5_datadir}/applications/org.kde.kamoso.desktop
%{_kf5_bindir}/kamoso
%{_kf5_datadir}/icons/hicolor/*/apps/kamoso.*
%{_kf5_datadir}/icons/hicolor/*/actions/*
%{_libdir}/gstreamer-1.0/gstkamosoqt5videosink.so
%{_kf5_datadir}/knotifications5/%{name}*
%{_kf5_datadir}/sounds/%{name}*


%changelog
* Fri Dec 16 2022 misaka00251 <liuxin@iscas.ac.cn> - 22.08.0-1
- 22.08.0