File usbip.spec of Package usbip

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


# userspace code from linux kernel 5.2
Name:           usbip
Version:        2.0
Release:        0
Summary:        The USB/IP shared USB system over IP network
License:        GPL-2.0-or-later
Group:          Hardware/Other
URL:            http://usbip.sourceforge.net/
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libudev)
BuildRequires:  tcpd-devel

%description
USB/IP protocol allows to pass USB device from server to client over the
network. Server is a machine which provides (shares) a USB device. Client is
a machine which uses USB device provided by server over the network.
The USB device may be either physical device connected to a server or
software entity created on a server using USB gadget subsystem.

%package devel
Summary:        The USB/IP shared USB system over IP network
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description devel
This package contains headers and static libraries for USB/IP
development

%prep
%setup -q

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%build
./autogen.sh
export CPPFLAGS="-Wno-address-of-packed-member"
%configure \
    --disable-static \
    --with-tcp-wrappers
make %{?_smp_mflags}

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print

%files devel
%dir %{_includedir}/usbip
%{_includedir}/usbip/*.h
%{_libdir}/libusbip.so

%files
%{_sbindir}/usbip
%{_sbindir}/usbipd
%{_libdir}/libusbip.so.0*
%{_mandir}/man8/usbip*.8%{ext_man}

%changelog
openSUSE Build Service is sponsored by