File libratbag.spec of Package libratbag

#
# spec file for package libratbag
#
# 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 http://bugs.opensuse.org/
#


%define version_unconverted 0.4.g39

Name:           libratbag
%define lname   libratbag1
Version:        0.4.g39
Release:        0
Summary:        Configuration library for gaming mice
License:        MIT
Group:          Development/Libraries/C and C++
Url:            https://libratbag.github.io/libratbag/

#Git-Clone:	https://github.com/libratbag/libratbag
Source:         %name-%version.tar.xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf >= 2.64
BuildRequires:  automake >= 1.11
BuildRequires:  gcc-c++
BuildRequires:  libtool >= 2.2
BuildRequires:  pkg-config
BuildRequires:  xz
BuildRequires:  pkgconfig(check) >= 0.9.10
BuildRequires:  pkgconfig(libevdev)
BuildRequires:  pkgconfig(libudev) >= 196

%description
libratbag is a configuration library for gaming mice. It provides a
generic way to access the various features exposed by these mice and
abstracts away hardware-specific and kernel-specific quirks.

%package -n liblur3
Summary:        Logitech Unifying Receiver configuration library
Group:          System/Libraries

%description -n liblur3
A library to configure and handle the /dev hidraw devices belonging
to the "Unifying" wireless receiver.

%package -n libratbag3
Summary:        Configuration library for gaming mice
Group:          System/Libraries

%description -n libratbag3
libratbag is a configuration library for gaming mice. It provides a
generic way to access the various features exposed by these mice and
abstracts away hardware-specific and kernel-specific quirks.

%package devel
Summary:        Development files for the libratbag game mouse config library
Group:          Development/Libraries/C and C++
Requires:       liblur3 = %version
Requires:       libratbag3 = %version

%description devel
libratbag is a configuration library for gaming mice. It provides a
generic way to access the various features exposed by these mice and
abstracts away hardware-specific and kernel-specific quirks.

This subpackage contains the files needed to build programs with
libratbag.

%package tools
Summary:        Utilities for configuring gaming mice
Group:          Hardware/Other

%description tools
libratbag is a configuration library for gaming mice. It provides a
generic way to access the various features exposed by these mice and
abstracts away hardware-specific and kernel-specific quirks.

This subpackage contains the ratbag utilities allowing to inspect and configure
mice.

%prep
%setup -q

%build
autoreconf -fiv
%configure --includedir="%_includedir/%name" --docdir="%_docdir/%name" \
	--disable-static --with-udev-base-dir="%_libexecdir/udev"
make %{?_smp_mflags} V=1

%install
%make_install
rm -f "%buildroot/%_libdir"/*.la

%post   -n liblur3 -p /sbin/ldconfig
%postun -n liblur3 -p /sbin/ldconfig
%post   -n libratbag3 -p /sbin/ldconfig
%postun -n libratbag3 -p /sbin/ldconfig

%files -n liblur3
%defattr(-,root,root)
%_libdir/liblur.so.3*

%files -n libratbag3
%defattr(-,root,root)
%doc COPYING
%_libdir/libratbag.so.3*

%files devel
%defattr(-,root,root)
%_libdir/liblur.so
%_libdir/libratbag.so
%_libdir/pkgconfig/*.pc
%_includedir/libratbag/

%files tools
%defattr(-,root,root)
%_bindir/lur-command
%_bindir/ratbag-command
%_prefix/lib/udev/hwdb.d/
%_prefix/lib/udev/rules.d/*.rules
%_datadir/%name/
%_mandir/man1/ratbag*

%changelog
openSUSE Build Service is sponsored by