]>
Commit | Line | Data |
---|---|---|
4cfd274a JP |
1 | # |
2 | # Conditional build | |
3 | %bcond_with qt6 # build againast Qt6 | |
4 | ||
5 | %define qt5ver 5.8.0 | |
6 | %define qt6ver 6.1.0 | |
f462567f | 7 | |
7e34af63 JP |
8 | Summary: Advanced clipboard manager with editing and scripting features |
9 | Name: copyq | |
fe46483e | 10 | Version: 6.2.0 |
7e34af63 JP |
11 | Release: 1 |
12 | License: GPL v3+ | |
13 | Group: X11/Applications | |
14 | Source0: https://github.com/hluk/CopyQ/archive/v%{version}/%{name}-%{version}.tar.gz | |
fe46483e | 15 | # Source0-md5: 7cd065bd03019292de8c8f32c05f8297 |
7e34af63 JP |
16 | Patch0: %{name}-plugindir.patch |
17 | URL: https://hluk.github.io/CopyQ/ | |
4cfd274a JP |
18 | %if %{without qt6} |
19 | BuildRequires: Qt5Core-devel >= %{qt5ver} | |
20 | BuildRequires: Qt5Gui-devel >= %{qt5ver} | |
21 | BuildRequires: Qt5Network-devel >= %{qt5ver} | |
22 | BuildRequires: Qt5Qml-devel >= %{qt5ver} | |
23 | BuildRequires: Qt5Svg-devel >= %{qt5ver} | |
24 | BuildRequires: Qt5WaylandClient-devel >= %{qt5ver} | |
25 | BuildRequires: Qt5Widgets-devel >= %{qt5ver} | |
26 | BuildRequires: Qt5X11Extras-devel >= %{qt5ver} | |
27 | BuildRequires: Qt5Xml-devel >= %{qt5ver} | |
28 | BuildRequires: qt5-linguist | |
29 | %else | |
30 | BuildRequires: Qt6Core-devel >= %{qt6ver} | |
31 | BuildRequires: Qt6Gui-devel >= %{qt6ver} | |
32 | BuildRequires: Qt6Network-devel >= %{qt6ver} | |
33 | BuildRequires: Qt6Qml-devel >= %{qt6ver} | |
34 | BuildRequires: Qt6Svg-devel >= %{qt6ver} | |
35 | BuildRequires: Qt6WaylandClient-devel >= %{qt6ver} | |
36 | BuildRequires: Qt6Widgets-devel >= %{qt6ver} | |
37 | BuildRequires: Qt6Xml-devel >= %{qt6ver} | |
38 | BuildRequires: qt6-linguist | |
39 | %endif | |
7e34af63 | 40 | BuildRequires: cmake >= 2.8.12 |
f462567f JP |
41 | BuildRequires: kf5-extra-cmake-modules >= 5.18.0 |
42 | BuildRequires: kf5-knotifications-devel >= 5.18.0 | |
43 | BuildRequires: libstdc++-devel >= 6:7 | |
44 | BuildRequires: libxcb-devel | |
f462567f | 45 | BuildRequires: rpm-build >= 4.6 |
4cfd274a | 46 | BuildRequires: rpmbuild(macros) >= 1.742 |
a0283f24 | 47 | BuildRequires: wayland-devel >= 1.15 |
f462567f | 48 | BuildRequires: xorg-lib-libX11-devel |
a0283f24 JP |
49 | BuildRequires: xorg-lib-libXfixes-devel |
50 | BuildRequires: xorg-lib-libXtst-devel | |
f462567f | 51 | BuildRequires: xorg-proto-xproto-devel |
4cfd274a JP |
52 | %if %{without qt6} |
53 | Requires: Qt5Core >= %{qt5ver} | |
54 | Requires: Qt5Gui >= %{qt5ver} | |
55 | Requires: Qt5Network >= %{qt5ver} | |
56 | Requires: Qt5Qml >= %{qt5ver} | |
57 | Requires: Qt5Script >= %{qt5ver} | |
58 | Requires: Qt5Svg >= %{qt5ver} | |
59 | Requires: Qt5WaylandClient >= %{qt5ver} | |
60 | Requires: Qt5Widgets >= %{qt5ver} | |
61 | Requires: Qt5X11Extras >= %{qt5ver} | |
62 | Requires: Qt5Xml >= %{qt5ver} | |
63 | %else | |
64 | Requires: Qt6Core >= %{qt6ver} | |
65 | Requires: Qt6Gui >= %{qt6ver} | |
66 | Requires: Qt6Network >= %{qt6ver} | |
67 | Requires: Qt6Qml >= %{qt6ver} | |
68 | Requires: Qt6Script >= %{qt6ver} | |
69 | Requires: Qt6Svg >= %{qt6ver} | |
70 | Requires: Qt6WaylandClient >= %{qt6ver} | |
71 | Requires: Qt6Widgets >= %{qt6ver} | |
72 | Requires: Qt6Xml >= %{qt6ver} | |
73 | %endif | |
7e34af63 JP |
74 | Requires: desktop-file-utils |
75 | Requires: hicolor-icon-theme | |
f462567f | 76 | Requires: kf5-knotifications >= 5.18.0 |
7e34af63 JP |
77 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
78 | ||
79 | %description | |
80 | CopyQ monitors system clipboard and saves its content in customized | |
81 | tabs. Saved clipboard can be later copied and pasted directly into any | |
82 | application. | |
83 | ||
f462567f JP |
84 | %package -n bash-completion-copyq |
85 | Summary: Bash completion for CopyQ | |
86 | Group: Applications/Shells | |
87 | Requires: %{name} = %{version}-%{release} | |
88 | Requires: bash-completion >= 2.0 | |
89 | BuildArch: noarch | |
90 | ||
91 | %description -n bash-completion-copyq | |
92 | Bash completion for CopyQ. | |
93 | ||
7e34af63 JP |
94 | %prep |
95 | %setup -q -n CopyQ-%{version} | |
96 | %patch0 -p1 | |
97 | ||
98 | %build | |
99 | install -d build | |
100 | cd build | |
101 | %cmake .. \ | |
4cfd274a | 102 | %{cmake_on_off qt6 WITH_QT6} \ |
7e34af63 JP |
103 | -DDATA_INSTALL_PREFIX:PATH=%{_datadir} |
104 | %{__make} | |
105 | ||
106 | %install | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | %{__make} -C build install \ | |
109 | DESTDIR=$RPM_BUILD_ROOT | |
110 | ||
111 | %find_lang %{name} --with-qm | |
112 | ||
113 | %clean | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %post | |
117 | %update_icon_cache hicolor | |
118 | %update_desktop_database | |
119 | ||
120 | %postun | |
121 | %update_icon_cache hicolor | |
122 | %update_desktop_database_postun | |
123 | ||
124 | %files -f %{name}.lang | |
125 | %defattr(644,root,root,755) | |
126 | %attr(755,root,root) %{_bindir}/copyq | |
127 | %dir %{_libdir}/copyq | |
128 | %dir %{_libdir}/copyq/plugins | |
129 | %attr(755,root,root) %{_libdir}/copyq/plugins/libitemencrypted.so | |
130 | %attr(755,root,root) %{_libdir}/copyq/plugins/libitemfakevim.so | |
131 | %attr(755,root,root) %{_libdir}/copyq/plugins/libitemimage.so | |
132 | %attr(755,root,root) %{_libdir}/copyq/plugins/libitemnotes.so | |
133 | %attr(755,root,root) %{_libdir}/copyq/plugins/libitempinned.so | |
134 | %attr(755,root,root) %{_libdir}/copyq/plugins/libitemsync.so | |
135 | %attr(755,root,root) %{_libdir}/copyq/plugins/libitemtags.so | |
136 | %attr(755,root,root) %{_libdir}/copyq/plugins/libitemtext.so | |
137 | %dir %{_datadir}/copyq | |
138 | %{_datadir}/copyq/themes | |
139 | %dir %{_datadir}/copyq/translations | |
140 | %{_desktopdir}/com.github.hluk.copyq.desktop | |
141 | %{_iconsdir}/hicolor/*x*/apps/copyq.png | |
142 | %{_iconsdir}/hicolor/scalable/apps/copyq.svg | |
143 | %{_iconsdir}/hicolor/scalable/apps/copyq_mask.svg | |
144 | %{_mandir}/man1/copyq.1* | |
145 | %{_datadir}/metainfo/com.github.hluk.copyq.appdata.xml | |
f462567f JP |
146 | |
147 | %files -n bash-completion-copyq | |
148 | %defattr(644,root,root,755) | |
149 | %{bash_compdir}/copyq |