File i3.spec of Package i3

# spec file for package i3
# Copyright (c) 2018 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

Name:           i3
Version:        4.15
Release:        0
Summary:        Tiling window manager
License:        BSD-3-Clause
Group:          System/GUI/Other
Source1:        %{name}.png
Source2:        %{name}.keyring
Patch1:         i3-desktop_file_valid.patch
Patch2:         i3-asciidoc-fix.patch
BuildRequires:  asciidoc
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  gcc
BuildRequires:  libyajl-devel
BuildRequires:  make
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  xmlto
BuildRequires:  pkgconfig(cairo)
BuildRequires:  pkgconfig(libev)
BuildRequires:  pkgconfig(libpcre)
BuildRequires:  pkgconfig(libstartup-notification-1.0)
BuildRequires:  pkgconfig(pangocairo)
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-cursor)
BuildRequires:  pkgconfig(xcb-event)
BuildRequires:  pkgconfig(xcb-icccm)
BuildRequires:  pkgconfig(xcb-keysyms)
BuildRequires:  pkgconfig(xcb-randr)
BuildRequires:  pkgconfig(xcb-util)
BuildRequires:  pkgconfig(xcb-xinerama)
BuildRequires:  pkgconfig(xcb-xkb)
BuildRequires:  pkgconfig(xcb-xrm)
BuildRequires:  pkgconfig(xkbcommon-x11)
# Required for i3-save-tree.
Requires:       perl-AnyEvent-I3
Recommends:     dmenu
Recommends:     i3lock
Recommends:     i3status
Provides:       windowmanager
# Upstream First - Policy:
# Never add any patches to this package without the upstream commit id
# in the patch. Any patches added here without a very good reason to make
# an exception will be silently removed with the next version update.

i3 is a tiling window manager for X11. It supports tiling, stacking,
and tabbing layouts, which it handles dynamically. Configuration is
achieved via plain text file and extending i3 is possible using its
Unix domain socket and JSON based IPC interface.

%package devel
Summary:        Development headers for i3
Group:          Development/Libraries/C and C++
Requires:       %{name}

%description devel
Development headers for the i3 window manager.

%setup -q
%patch1 -p1
%patch2 -p1

# fix rpmlint E: env-script-interpreter
sed -i 's,^#!/usr/bin/env ,#!/usr/bin/,' i3-dmenu-desktop i3-migrate-config-to-v4 i3-save-tree

autoreconf -fi
# Fix Leap 42.x build
%if 0%{?suse_version} == 1315
export YAJL_LIBS="-lyajl" YAJL_CFLAGS="-I/usr/include/yajl"
make %{?_smp_mflags} V=1  -C  *-linux-gnu*

%make_install -C *-linux-gnu*
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/%{name}.desktop
install -D -m 0644 %{SOURCE1} %{buildroot}/%{_datadir}/pixmaps/%{name}.png

%license LICENSE
%doc RELEASE-NOTES-%{version}
%dir %{_sysconfdir}/i3/
%config %{_sysconfdir}/i3/config
%config %{_sysconfdir}/i3/config.keycodes

%files devel
%dir %{_includedir}/i3/
%dir %{_datadir}/doc/%{name}
%doc %{_datadir}/doc/%{name}/*.html

openSUSE Build Service is sponsored by