File libxtrxll.spec of Package libxtrxll
#
# spec file for package libxtrxll
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017, Martin Hauke <mardnh@gmx.de>
#
# 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 sover 0
%define libname libxtrxll%{sover}
Name: libxtrxll
Version: 0.0.0+git.20171213
Release: 0
Summary: XTRX Low-level API library
License: LGPL-2.1
Group: Development/Libraries/C and C++
URL: http://xtrx.io
Source: %{name}-%{version}.tar.xz
Patch0: libxtrxll-cmake-disable-test.patch
BuildRequires: cmake
BuildRequires: git-core
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libusb)
BuildRequires: pkgconfig(libusb3380)
%description
Low level XTRX hardware abstraction library.
%package -n %{libname}
Summary: XTRX Low-level API library
Group: System/Libraries
%description -n %{libname}
Low level XTRX hardware abstraction library.
%package devel
Summary: XTRX Low-level API library - devel
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
%description devel
Low level XTRX hardware abstraction library.
This subpackage contains libraries and header files for developing
applications that want to make use of libxtrxll.
%package -n xtrx-udev
Summary: Udev rules for XTRX
Group: Hardware/Other
Requires(pre): pwdutils
BuildArch: noarch
%description -n xtrx-udev
Udev rules for XTRX devices.
%prep
%setup -q
%patch0 -p1
%build
%cmake \
-DCMAKE_SHARED_LINKER_FLAGS=""
%make_jobs
%install
%cmake_install
# FIXME: udev-rules path
mkdir -p %{buildroot}%{_udevrulesdir}
mv %{buildroot}%{_sysconfdir}/udev/rules.d/50-xtrx-usb3380.rules %{buildroot}%{_udevrulesdir}
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files -n %{libname}
%doc LICENSE README.md
%{_libdir}/libxtrxll.so.%{sover}*
#
%{_libdir}/libxtrxll_libusb3380.so.%{sover}*
%{_libdir}/libxtrxll_pcie.so.%{sover}*
%files devel
%{_includedir}/xtrxll_*.h
%{_libdir}/libxtrxll.so
%{_libdir}/pkgconfig/libxtrxll.pc
#
%{_libdir}/libxtrxll_libusb3380.so
%{_libdir}/libxtrxll_pcie.so
%files -n xtrx-udev
%{_udevrulesdir}/50-xtrx-usb3380.rules
%changelog