File awesome.spec of Package awesome-git

#
# spec file for package awesome
#
# Copyright (c) 2016 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 _version 4.3
Name:           awesome
Version:        @SERVICE@
Release:        0
Summary:        Highly configurable tiling and floating Window Manager
License:        GPL-2.0+
Group:          System/GUI/Other
Url:            http://awesomewm.org
Source:         %{name}-%{version}.tar.xz
BuildRequires:  ImageMagick
BuildRequires:  cmake
BuildRequires:  doxygen
BuildRequires:  gcc-c++
BuildRequires:  grep
BuildRequires:  lua-lgi >= 0.8.0
BuildRequires:  pkgconfig
BuildRequires:  xmlto
BuildRequires:  Lua(devel) >= 5.2
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(cairo-xcb)
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libstartup-notification-1.0) >= 0.10
BuildRequires:  pkgconfig(libxdg-basedir) >= 1.0.0
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xcb-cursor)
BuildRequires:  pkgconfig(xcb-icccm) >= 0.3.8
BuildRequires:  pkgconfig(xcb-keysyms) >= 0.3.4
BuildRequires:  pkgconfig(xcb-randr)
BuildRequires:  pkgconfig(xcb-shape)
BuildRequires:  pkgconfig(xcb-util) >= 0.3.8
BuildRequires:  pkgconfig(xcb-xinerama)
BuildRequires:  pkgconfig(xcb-xkb)
BuildRequires:  pkgconfig(xcb-xrm)
BuildRequires:  pkgconfig(xcb-xtest)
BuildRequires:  pkgconfig(xkbcommon)
BuildRequires:  pkgconfig(xkbcommon-x11)
BuildRequires:  pkgconfig(xproto) >= 7.0.15
BuildRequires:  rubygem(%{rb_default_ruby_abi}:asciidoctor)
BuildRequires:  typelib(GLib)
BuildRequires:  typelib(Gio)
BuildRequires:  typelib(Pango)
BuildRequires:  typelib(PangoCairo)
BuildRequires:  typelib(cairo)
Requires:       %{name}-branding = %{version}
Requires:       lua-lgi
Requires:       typelib(GLib)
Requires:       typelib(Gio)
Requires:       typelib(Pango)
Requires:       typelib(PangoCairo)
Requires:       typelib(cairo)
Provides:       windowmanager
Requires(post): update-alternatives
Requires(postun):update-alternatives

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
awesome is a highly configurable, next generation framework window manager for
X. It is very fast, extensible and licensed under the GNU GPLv2 license.
Features and non-features
 * Very stable, fast and small codebase and footprint;
 * First window manager using asynchronous XCB library instead of the old
synchronous Xlib: make awesome less subject to latency than many window managers;
 * Very well documented source code and API;
 * No mouse needed: everything can be performed with keyboard;
 * Real multihead support (XRandR, Xinerama or Zaphod mode) with per screen
desktops (tags);
 * Implement many Freedesktop standards: EWMH, XDG Base Directory, XEmbed,
Desktop Notification, System Tray;
 * Doesn't distinguish between layers: there is no floating or tiled layer;
 * Use tags instead of workspaces: allow to place clients on several tags, and
display several tags at the same time;
 * A lot of Lua extensions to add features: dynamic tagging, widget feeding,
tabs, layouts …;
 * D-Bus support;
 * And more.

%package branding-upstream
Summary:        Upstream Branding for awesome
Group:          System/GUI/Other
Supplements:    packageand(%{name}:branding-upstream)
Conflicts:      otherproviders(%{name}-branding)
Provides:       %{name}-branding = %{version}
BuildArch:      noarch

%description branding-upstream
This package provides the upstream look and feel for awesome.

%prep
%setup -q
sed -i 's/nano/vi/' %{name}rc.lua
sed -i 's/^\(Type=\).*$/\1XSession/' %{name}.desktop

%build
export AWESOME_IGNORE_LGI=1
%cmake \
  -DAWESOME_DOC_PATH=%{_defaultdocdir}/%{name} \
  -DXDG_CONFIG_DIR=%{_sysconfdir}/xdg \
  -DCOMPRESS_MANPAGES=OFF
make %{?_smp_mflags}

%install
export AWESOME_IGNORE_LGI=1
%cmake_install

%files
%defattr(-,root,root)
%doc %{_defaultdocdir}/%{name}
%{_bindir}/%{name}*
%{_datadir}/%{name}
%{_datadir}/xsessions/%{name}.desktop
%{_mandir}/man?/%{name}*.?%{ext_man}
%{_mandir}/*/man?/%{name}*.?%{ext_man}
%exclude %{_datadir}/%{name}/themes/default
%exclude %{_datadir}/%{name}/themes/sky
%exclude %{_datadir}/%{name}/themes/zenburn

%files branding-upstream
%defattr(-,root,root)
%doc LICENSE
%dir %{_sysconfdir}/xdg
%dir %{_sysconfdir}/xdg/%{name}
%config(noreplace) %{_sysconfdir}/xdg/%{name}/rc.lua
%{_datadir}/%{name}/themes/default
%{_datadir}/%{name}/themes/sky
%{_datadir}/%{name}/themes/zenburn

%changelog
openSUSE Build Service is sponsored by