File wmii.spec of Package wmii

#
# spec file for package wmii
#
# Copyright (c) 2014 SUSE LINUX Products 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 pkg_version 3.6
%define session_dir  %{_datadir}/xsessions
#
Name:           wmii
Version:        3.6.0
Release:        0
Summary:        Windowmanager Improved
#
License:        MIT
Group:          System/GUI/Other
#
Url:            http://www.wmii.de/
Source:         http://wmii.de/download/%{name}-%{pkg_version}.tar.gz
Source1:        wmii-3.desktop
Source2:        http://chronos.nsu.ru/fantoo/wiki/gtk1_utf8/XLC_LOCALE
Patch0:         %{name}-3.6-code-is-not-c99.diff
BuildRequires:  libixp >= 0.4
BuildRequires:  libixp-devel >= 0.4
BuildRequires:  xorg-x11-devel
Requires:       dmenu >= 3.4
Requires:       libixp >= 0.4
#
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
wmii is the next generation of wmi. It is a highly customizable
keyboard-and-mouse-driven X11 window manager that supports conventional,
tabbed, and tiled window management with low memory usage and vi-like user
interaction. Due to a complete rewrite, it is highly modularized and uses a new
configuration and inter-process communication interface, which is oriented on
the 9p protocol of the Plan9 operating system.

%prep
%setup -q -n %{name}-%{pkg_version}
%patch0 -p1
cp %{SOURCE2} .

%build
make OPTFLAGS+="%{optflags}" %{?_smp_mflags} \
    STATIC="" PREFIX="%{_prefix}" \
    CONFPREFIX="%{_sysconfdir}/X11/" \
    X11LIB="%{_prefix}/X11R6/%{_lib}" \
    LIBIXP="%{_libdir}/libixp.a"

%install
%{makeinstall} \
    PREFIX=%{buildroot}"%{_prefix}" \
    ETC=%{buildroot}"%{_sysconfdir}/X11" \
    LIBIXP="%{_libdir}/libixp.a"

install -D -m 0644 %{SOURCE1} %{buildroot}%{session_dir}/%{name}-3.desktop

%files
%defattr(-,root,root,-)
%{_sysconfdir}/X11/%{name}-3.5
%{_bindir}/%{name}*
%{_mandir}/man1/%{name}*
%{_sysconfdir}/X11/%{name}-3.5/%{name}rc
%{_sysconfdir}/X11/%{name}-3.5/rc.%{name}
%{_sysconfdir}/X11/%{name}-3.5/welcome
%{session_dir}/%{name}-3.desktop
%doc README LICENSE XLC_LOCALE

openSUSE Build Service is sponsored by