]> git.pld-linux.org Git - packages/wpe-cog.git/blob - wpe-cog.spec
7fbddf986ddf5e0560f1bc03e39421859c09e6d0
[packages/wpe-cog.git] / wpe-cog.spec
1 #
2 # Conditional build:
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)
7 #
8 %if %{with gtk}
9 %undefine       with_drm
10 %undefine       with_fdo
11 %undefine       with_weston
12 %endif
13 Summary:        Cog Core - WPE WebKit base launcher
14 Summary(pl.UTF-8):      Cog Core - narzędzie do uruchamiania środowiska WPE WebKit
15 Name:           wpe-cog
16 Version:        0.8.0
17 Release:        1
18 License:        MIT
19 Group:          Libraries
20 Source0:        https://wpewebkit.org/releases/cog-%{version}.tar.xz
21 # Source0-md5:  f7aa8a425927cab247563411fc67c5a3
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
30 BuildRequires:  xz
31 %if %{with gtk}
32 BuildRequires:  gtk-webkit4-devel >= 2.20.0
33 %else
34 BuildRequires:  wpe-webkit-devel >= 2.28.0
35 %if %{with drm}
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
43 %endif
44 %if %{with fdo}
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
50 %if %{with weston}
51 BuildRequires:  weston-protocols >= 9.0.0
52 %endif
53 %endif
54 %endif
55 Requires:       %{name}-libs = %{version}-%{release}
56 %if %{with drm}
57 Requires:       Mesa-libgbm >= 13.0
58 Requires:       libdrm >= 2.4.71
59 Requires:       wpebackend-fdo >= 1.3.1
60 %endif
61 %if %{with fdo}
62 Requires:       wayland >= 1.10
63 Requires:       wpebackend-fdo >= 1.3.1
64 %if %{with weston}
65 Requires:       weston >= 9
66 %endif
67 %endif
68 # cog in PLD used to be different project: http://www.krakoa.dk/old-linux-software.html#COG
69 Conflicts:      cog
70 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
71
72 %description
73 Cog Core - WPE WebKit base launcher.
74
75 %description -l pl.UTF-8
76 Cog Core - narzędzie do uruchamiania środowiska WPE WebKit.
77
78 %package libs
79 Summary:        Cog Core library
80 Summary(pl.UTF-8):      Biblioteka Cog Core
81 Group:          Libraries
82 Requires:       glib2 >= 1:2.44
83 %if %{with gtk}
84 Requires:       gtk-webkit4 >= 2.20.0
85 %else
86 Requires:       wpe-webkit >= 2.28.0
87 %endif
88
89 %description libs
90 Cog Core library.
91
92 %description libs -l pl.UTF-8
93 Biblioteka Cog Core.
94
95 %package devel
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}
100 %if %{with gtk}
101 Requires:       gtk-webkit4-devel >= 2.20.0
102 %else
103 Requires:       wpe-webkit-devel >= 2.28.0
104 %endif
105
106 %description devel
107 Header files for Cog Core library.
108
109 %description devel -l pl.UTF-8
110 Pliki nagłówkowe biblioteki Cog Core.
111
112 %prep
113 %setup -q -n cog-%{version}
114 %patch0 -p1
115
116 %build
117 install -d build
118 cd build
119 # .pc file creation expects relative CMAKE_INSTALL_LIBDIR
120 %cmake .. \
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}
127
128 %{__make}
129
130 %install
131 rm -rf $RPM_BUILD_ROOT
132
133 %{__make} -C build install \
134         DESTDIR=$RPM_BUILD_ROOT
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %post   libs -p /sbin/ldconfig
140 %postun libs -p /sbin/ldconfig
141
142 %files
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
147 %if %{with drm}
148 %attr(755,root,root) %{_libdir}/libcogplatform-drm.so
149 %endif
150 %if %{with fdo}
151 %attr(755,root,root) %{_libdir}/libcogplatform-fdo.so
152 %endif
153 %{_mandir}/man1/cog.1*
154 %{_mandir}/man1/cogctl.1*
155
156 %files libs
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_libdir}/libcogcore.so.*.*.*
159 %attr(755,root,root) %ghost %{_libdir}/libcogcore.so.1
160
161 %files devel
162 %defattr(644,root,root,755)
163 %attr(755,root,root) %{_libdir}/libcogcore.so
164 %{_includedir}/cog
165 %{_pkgconfigdir}/cogcore.pc
This page took 0.105753 seconds and 2 git commands to generate.