File libgaminggear.spec of Package libgaminggear

#
# spec file for package libgaminggear
#
# Copyright (c) 2019 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#


%define majorversion 0
%define libgaminggear       libgaminggear0
%define libgaminggearfx     libgaminggearfx0
%define libgaminggearwidget libgaminggearwidget0
Name:           libgaminggear
Version:        0.15.1
Release:        0
Summary:        Library for gaming input devices
License:        GPL-2.0-only AND CC-BY-3.0
Group:          Development/Libraries/C and C++
URL:            https://sourceforge.net/projects/libgaminggear/
Source:         http://downloads.sourceforge.net/project/%{name}/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM
Patch0:         0001-Fix-build-with-recent-pango-versions.patch
BuildRequires:  cmake >= 2.8
BuildRequires:  doxygen
BuildRequires:  fdupes
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(gtk+-2.0) >= 2.20
BuildRequires:  pkgconfig(gudev-1.0)
BuildRequires:  pkgconfig(libcanberra)
BuildRequires:  pkgconfig(libnotify)
BuildRequires:  pkgconfig(sqlite3) >= 3.7

%description
A shared library initiated by the Roccat Linux driver project.

%package devel
Summary:        Development files for gaming input devices
Group:          Development/Libraries/C and C++
Requires:       %{libgaminggearfx} = %{version}
Requires:       %{libgaminggearwidget} = %{version}
Requires:       %{libgaminggear} = %{version}

%description devel
This package contains the header files, static libraries and
development documentation for libgaminggear. If you like to develop
programs using libgaminggear, you will need to install this package.

%package -n %{libgaminggear}
Summary:        Gaming input devices library - libgaminggear
Group:          Development/Libraries/C and C++

%description -n %{libgaminggear}
A shared library initiated by the Roccat Linux driver project.

This package holds libgaminggear.

%package -n %{libgaminggearfx}
Summary:        Gaming input devices library - libgaminggearfx
Group:          Development/Libraries/C and C++

%description -n %{libgaminggearfx}
A shared library initiated by the Roccat Linux driver project.

This package holds libgaminggearfx.

%package -n %{libgaminggearwidget}
Summary:        Gaming input devices library - libgaminggearwidget
Group:          Development/Libraries/C and C++

%description -n %{libgaminggearwidget}
A shared library initiated by the Roccat Linux driver project.

This package holds libgaminggearwidget.

%lang_package

%prep
%setup -q
%patch0 -p1

%build
%cmake -DINSTALL_PKGCONFIGDIR=%{_libdir}/pkgconfig
make %{?_smp_mflags}

%install
%cmake_install
%fdupes %{buildroot}%{_datadir}
%find_lang %{name}

%post   -n %{libgaminggear} -p /sbin/ldconfig
%postun -n %{libgaminggear} -p /sbin/ldconfig
%post   -n %{libgaminggearfx} -p /sbin/ldconfig
%postun -n %{libgaminggearfx} -p /sbin/ldconfig
%post   -n %{libgaminggearwidget} -p /sbin/ldconfig
%postun -n %{libgaminggearwidget} -p /sbin/ldconfig

%files
%license COPYING
%doc README Changelog
%{_bindir}/gaminggearfxcontrol
%{_bindir}/gaminggearfxinfo
%{_datadir}/libgaminggear/

%files -n %{libgaminggear}
%license COPYING
%doc README Changelog
%{_libdir}/libgaminggear.so.*

%files -n %{libgaminggearfx}
%license COPYING
%doc README Changelog
%{_libdir}/libgaminggearfx.so.*

%files -n %{libgaminggearwidget}
%license COPYING
%doc README Changelog
%{_libdir}/libgaminggearwidget.so.*

%files devel
%{_includedir}/gaminggear-0/
%{_libdir}/libgaminggear*.so
%{_libdir}/pkgconfig/gaminggear-%{majorversion}.pc
%{_datadir}/cmake/Modules/FindGAMINGGEAR%{majorversion}.cmake

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by