File notion.spec of Package notion

# spec file for package notion
# 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:           notion
Version:        4.0.0
Release:        0
Summary:        Free Tiling Tabbed Window Manager
License:        LGPL-2.1+
Group:          System/GUI/Other
Source1:        notion.desktop
BuildRequires:  gcc
BuildRequires:  make
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  xorg-x11-devel
BuildRequires:  readline-devel
BuildRequires:  cairo-devel
BuildRequires:  groff
%if 0%{?suse_version} > 1320
BuildRequires:  pkgconfig(lua) >= 5.1
BuildRequires:  pkgconfig(lua)

Notion is a tiling, tabbed window manager for the X window system:

* Tiling: you divide the screen into non-overlapping 'tiles'. Every
  window occupies one tile, and is maximized to it * Tabbing: a tile may
  contain multiple windows - they will be 'tabbed'* Static: most tiled
  window managers are 'dynamic', meaning they automatically resize and
  move around tiles as windows appear and disappear. Notion, by
  contrast, does not automatically change the tiling. You're in control.

Features include:
* Workspaces: each workspace has its own tiling
* Multihead: the mod_xinerama plugin provides very nice dual-monitor support
* RandR: mod_xrandr picks up changes in the xrandr configuration without the
  need for restarting Notion (read this, though)
* Extensibility: Notion can be extended with lua scripts. Browse through the
  scripts collection

%setup -q -n "%{name}-%{version}"

make %{?_smp_mflags}

%make_install \
    PREFIX="%{_prefix}" \
    ETCDIR="%{_sysconfdir}/%{name}" \
    LIBDIR="%{_libdir}" \

install -D -m0644 "%{SOURCE1}" "%{buildroot}%{_datadir}/xsessions/%{name}.desktop"

%suse_update_desktop_file "%{buildroot}%{_datadir}/xsessions/%{name}.desktop"

%find_lang %{name}
pushd "%{buildroot}%{_mandir}"
/bin/ls -1d */man1 | while read x; do
    echo "%doc %dir %lang($l) %{_mandir}/${l}" >>"$LF"
    echo "%doc %dir %lang($l) %{_mandir}/${l}/man1" >>"$LF"
/bin/ls -1 */man1/*.1* | while read x; do
    echo "%doc %lang($l) %{_mandir}/${l}/man1/$f*" >>"$LF"

%files -f %{name}.lang
%dir %{_sysconfdir}/%{name}
%config %{_sysconfdir}/%{name}/*.lua