File xneur.spec of Package xneur

# spec file for package xneur
# 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

%define sover   20
Name:           xneur
Version:        0.20.0
Release:        0
Summary:        X Neural Switcher
License:        GPL-2.0+
Group:          System/X11/Utilities
# PATCH-FIX-OPENSUSE xneur-plugins-avoid-sover.patch -- Avoid sover for xneur plugins.
Patch0:         xneur-plugins-avoid-sover.patch
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  fdupes
BuildRequires:  intltool
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  xosd-devel
BuildRequires:  pkgconfig(enchant) >= 1.0
BuildRequires:  pkgconfig(gstreamer-1.0) >= 1.2.4
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libnotify) >= 0.4.0
BuildRequires:  pkgconfig(libpcre) >= 5.0
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xi)
BuildRequires:  pkgconfig(xtst)
Recommends:     %{name}-gui
Recommends:     %{name}-lang
Recommends:     gxneur

X Neural Switcher (XNeur).
Automatical switcher of keyboard layout.


%package -n libxneur%{sover}
Summary:        XNeur Shared Library
Group:          System/Libraries

%description -n libxneur%{sover}
Shared libraries for the package XNeur.

%package -n libxneur-devel
Summary:        Include Files and Libraries
Group:          Development/Libraries/C and C++
Requires:       libxneur%{sover} = %{version}
Requires:       pkgconfig
Requires:       pkgconfig(enchant)
# xneur-devel was last used in openSUSE 11.2.
Provides:       xneur-devel = %{version}
Obsoletes:      xneur-devel < %{version}

%description -n libxneur-devel
Development files for the package XNeur.

%setup -q
%patch0 -p1
# First time ever -Werror is causing problems.
sed -i '/^DEFAULT_CFLAGS=/s/-Werror //'

autoreconf -fi
%configure \
  --disable-static       \
  --with-sound=gstreamer \
  --with-gtk=gtk3        \
make %{?_smp_mflags} V=1

rm -rf %{buildroot}%{_datadir}/icons/hicolor/

find %{buildroot} -type f -name "*.la" -delete -print
%fdupes -s %{buildroot}%{_datadir}/
%find_lang %{name}

%post -n libxneur%{sover} -p /sbin/ldconfig

%postun -n libxneur%{sover} -p /sbin/ldconfig

%dir %{_sysconfdir}/%{name}/
# Upstream updates a config file. So we must replace it.
%config %{_sysconfdir}/%{name}/*

%files lang -f %{name}.lang

%files -n libxneur%{sover}

%files -n libxneur-devel