File sway.spec of Package sway

#
# spec file for package sway
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define basever 0.15.1
#%%define prerelease rc1

%if 0%{?prerelease:1}
%define ver     %{basever}~%{prerelease}
%define tarver  %{basever}-%{prerelease}
%else
%define ver     %{basever}
%define tarver  %{basever}
%endif

Name:           sway
Version:        %{ver}
Release:        0
Summary:        Window manager for Wayland compatible with i3
License:        MIT
Group:          System/GUI/Other
Url:            https://github.com/swaywm/sway
Source0:        https://github.com/swaywm/sway/archive/%{tarver}.tar.gz#/%{name}-%{tarver}.tar.gz
# only releases are signed
%if ! 0%{?prerelease:1}
Source1:        https://github.com/swaywm/sway/releases/download/%{basever}/%{name}-%{basever}.tar.gz.sig
%endif
Source2:        sway.keyring
BuildRequires:  asciidoc
BuildRequires:  cmake >= 3.1.0
BuildRequires:  gcc-c++
BuildRequires:  libxslt-tools
BuildRequires:  pam-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(dbus-1) >= 1.10
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
BuildRequires:  pkgconfig(json-c) >= 0.12.1
BuildRequires:  pkgconfig(libcap)
BuildRequires:  pkgconfig(libpcre)
BuildRequires:  pkgconfig(pango)
BuildRequires:  pkgconfig(pangocairo)
BuildRequires:  pkgconfig(wlc)
BuildRequires:  pkgconfig(xkbcommon)
Requires:       ImageMagick
Requires:       ffmpeg
%if 0%{?suse_version}
# I definitely recommend Xwayland
Recommends:     xorg-x11-server-wayland
%endif

%description
"SirCmpwn's Wayland window manager" is a work in progress i3-compatible window
manager for Wayland.

%prep
%setup -q -n %{name}-%{tarver}

%build
export CFLAGS="%{optflags}"
%cmake \
       -DVERSION=%{tarver} \
       -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
       -Dzsh-completions=ON
make %{?_smp_mflags}

%install
%cmake_install

%files
%doc LICENSE README.md CONTRIBUTING.md
%{_bindir}/%{name}*
%dir %{_sysconfdir}/sway
%dir %{_sysconfdir}/sway/security.d
%config(noreplace) %{_sysconfdir}/sway/config
%config(noreplace) %{_sysconfdir}/sway/security.d/00-defaults
%config(noreplace) %{_sysconfdir}/pam.d/swaylock
%{_mandir}/man?/%{name}*
%{_datadir}/wayland-sessions/
%dir %{_datadir}/backgrounds
%{_datadir}/backgrounds/sway
%{_datadir}/zsh

%changelog
openSUSE Build Service is sponsored by