3 %bcond_with gtk # WebKitGTK+ instead of WPEWebKit
4 %bcond_without drm # DRM platform module
5 %bcond_without fdo # FDO platform module
6 %bcond_with weston # direct display support for FDO platform module (requires private protocol files)
13 Summary: Cog Core - WPE WebKit base launcher
14 Summary(pl.UTF-8): Cog Core - narzędzie do uruchamiania środowiska WPE WebKit
20 Source0: https://wpewebkit.org/releases/cog-%{version}.tar.xz
21 # Source0-md5: 21664fb04c9149dea6d68e13e6074276
22 Patch0: cog-link.patch
23 URL: https://wpewebkit.org/
24 BuildRequires: cmake >= 3.3
25 BuildRequires: gcc >= 5:3.2
26 BuildRequires: glib2-devel >= 1:2.44
27 BuildRequires: libsoup-devel >= 2.4
28 BuildRequires: pkgconfig
29 BuildRequires: tar >= 1:1.22
32 BuildRequires: gtk-webkit4-devel >= 2.20.0
34 BuildRequires: wpe-webkit-devel >= 2.28.0
36 BuildRequires: EGL-devel
37 BuildRequires: Mesa-libgbm-devel >= 13.0
38 BuildRequires: libdrm-devel >= 2.4.71
39 BuildRequires: libinput-devel
40 BuildRequires: udev-devel
41 BuildRequires: wayland-devel
42 BuildRequires: wpebackend-fdo-devel >= 1.3.1
45 BuildRequires: EGL-devel
46 BuildRequires: wayland-devel >= 1.10
47 BuildRequires: wayland-egl-devel
48 BuildRequires: wpebackend-fdo-devel >= 1.3.1
49 BuildRequires: xorg-lib-libxkbcommon-devel
51 BuildRequires: weston-protocols >= 9.0.0
55 Requires: %{name}-libs = %{version}-%{release}
57 Requires: Mesa-libgbm >= 13.0
58 Requires: libdrm >= 2.4.71
59 Requires: wpebackend-fdo >= 1.3.1
62 Requires: wayland >= 1.10
63 Requires: wpebackend-fdo >= 1.3.1
68 # cog in PLD used to be different project: http://www.krakoa.dk/old-linux-software.html#COG
70 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73 Cog Core - WPE WebKit base launcher.
75 %description -l pl.UTF-8
76 Cog Core - narzędzie do uruchamiania środowiska WPE WebKit.
79 Summary: Cog Core library
80 Summary(pl.UTF-8): Biblioteka Cog Core
82 Requires: glib2 >= 1:2.44
84 Requires: gtk-webkit4 >= 2.20.0
86 Requires: wpe-webkit >= 2.28.0
92 %description libs -l pl.UTF-8
96 Summary: Header files for Cog Core library
97 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Cog Core
98 Group: Development/Libraries
99 Requires: %{name}-libs = %{version}-%{release}
101 Requires: gtk-webkit4-devel >= 2.20.0
103 Requires: wpe-webkit-devel >= 2.28.0
107 Header files for Cog Core library.
109 %description devel -l pl.UTF-8
110 Pliki nagłówkowe biblioteki Cog Core.
113 %setup -q -n cog-%{version}
119 # .pc file creation expects relative CMAKE_INSTALL_LIBDIR
121 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
122 -DCOG_HOME_URI="https://www.pld-linux.org/" \
123 %{?with_drm:-DCOG_PLATFORM_DRM=ON} \
124 %{!?with_fdo:-DCOG_PLATFORM_FDO=OFF} \
125 %{?with_gtk:-DCOG_USE_WEBKITGTK=ON} \
126 %{?with_weston:-DCOG_WESTON_DIRECT_DISPLAY=ON}
131 rm -rf $RPM_BUILD_ROOT
133 %{__make} -C build install \
134 DESTDIR=$RPM_BUILD_ROOT
137 rm -rf $RPM_BUILD_ROOT
139 %post libs -p /sbin/ldconfig
140 %postun libs -p /sbin/ldconfig
143 %defattr(644,root,root,755)
144 %doc ARCHITECTURE.md COPYING NEWS README.md
145 %attr(755,root,root) %{_bindir}/cog
146 %attr(755,root,root) %{_bindir}/cogctl
148 %attr(755,root,root) %{_libdir}/libcogplatform-drm.so
151 %attr(755,root,root) %{_libdir}/libcogplatform-fdo.so
153 %{_mandir}/man1/cog.1*
154 %{_mandir}/man1/cogctl.1*
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_libdir}/libcogcore.so.*.*.*
159 %attr(755,root,root) %ghost %{_libdir}/libcogcore.so.1
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_libdir}/libcogcore.so
165 %{_pkgconfigdir}/cogcore.pc