# Version of the .so library %global abi_ver 5 Name: wlroots Version: master Epoch: 1 Release: 1_%(date +%%y%%m%%d)%{?dist} Summary: A modular Wayland compositor library # Source files/overall project licensed as MIT, but # - LGPLv2.1+ # * protocol/idle.xml # * protocol/server-decoration.xml # Those files are processed to C-compilable files by the # `wayland-scanner` binary during build and don't alter # the main license of the binaries linking with them by # the underlying licenses. License: MIT URL: https://github.com/swaywm/%{name} Source0: %{url}/archive/master/%{name}-master.tar.gz # this file is a modification of examples/meson.build so as to: # - make it self-contained # - only has targets for examples known to compile well (cf. "examples) global) Source1: examples.meson.build BuildRequires: gcc BuildRequires: meson >= 0.48.0 BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(freerdp2) BuildRequires: pkgconfig(gbm) >= 17.1.0 BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(libcap) BuildRequires: pkgconfig(libdrm) >= 2.4.95 BuildRequires: pkgconfig(libinput) >= 1.9.0 BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(pixman-1) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-protocols) >= 1.17 BuildRequires: pkgconfig(wayland-server) >= 1.16 BuildRequires: pkgconfig(winpr2) BuildRequires: pkgconfig(xcb-icccm) BuildRequires: pkgconfig(xkbcommon) # only select examples are supported for being readily compilable (see SOURCE1) %global examples \ cat multi-pointer output-layout pointer rotation screencopy simple tablet touch %description %{summary}. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} == %{epoch}:%{version}-%{release} # not required per se, so not picked up automatically by RPM Recommends: pkgconfig(xcb-icccm) # for examples Suggests: gcc Suggests: meson >= 0.48.0 Suggests: pkgconfig(libpng) %description devel Development files for %{name}. %prep %autosetup -p 1 %build # Disable options requiring extra/unpackaged dependencies %{meson} -Drootston=false -Dexamples=false -Dxcb-errors=disabled %{meson_build} %install %{meson_install} EXAMPLES=( %{examples} ) # Normalize whitespace by creating an array for example in "${EXAMPLES[@]}"; do install -pm0644 -Dt '%{buildroot}/%{_pkgdocdir}/examples' examples/"${example}".[ch] done install -pm0644 -D '%{SOURCE1}' '%{buildroot}/%{_pkgdocdir}/examples/meson.build' %check %{meson_test} %files %license LICENSE %doc README.md %doc %dir %{_pkgdocdir} %{_libdir}/lib%{name}.so.%{abi_ver}* %files devel %doc %{_pkgdocdir}/examples %{_includedir}/wlr %{_libdir}/lib%{name}.so %{_libdir}/pkgconfig/%{name}.pc %changelog * Sun Jan 26 2020 Lyes Saadi - 99-1_200126 - Took spec from jpokorny's. From here: https://src.fedoraproject.org/rpms/wlroots.