File libiscsi.spec of Package libiscsi
#
# spec file for package libiscsi
#
# 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 libname %{name}7
Name: libiscsi
Version: 1.17.0
Release: 0
Summary: iSCSI client library and utilities
License: GPL-2.0 and LGPL-2.1
Group: Development/Libraries/C and C++
Url: https://github.com/sahlberg/libiscsi
Source: https://github.com/sahlberg/libiscsi/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bc
BuildRequires: cunit-devel
BuildRequires: libtool
BuildRequires: pkg-config
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Libiscsi is a clientside library to implement the iSCSI protocol
that can be used to access resource of an iSCSI Target.
%package -n %{libname}
Summary: iSCSI client library and utilities
Group: System/Libraries
%description -n %{libname}
Libiscsi is a clientside library to implement the iSCSI protocol
that can be used to access resource of an iSCSI Target.
The library is fully async with regards to iscsi commands and scsi
tasks, but a sync layer is also provided for ease of use for simpler
applications.
%package utils
Summary: Some utilities for %{name}
Group: Productivity/Networking/Other
%description utils
Some utilities for %{name}
%package devel
Summary: Development files for %{name}
Group: Development/Languages/C and C++
Requires: %{libname} = %{version}
%description devel
Development files for %{name}
%package test
Summary: Test utilities for iSCSI
Group: System/Base
%description test
A comprehensive iSCSI transport and SCSI block device test suite based on CUnit.
%prep
%setup -q
%build
autoreconf -fiv
%configure \
--enable-manpages \
--disable-static
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
mv "%{buildroot}/%{_bindir}/ld_iscsi.so" "%{buildroot}/%{_libdir}/"
find %{buildroot} -type f -name "*.la" -delete -print
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libiscsi.so.7*
%files utils
%defattr(-,root,root)
%doc COPYING LICENCE-* README
%{_bindir}/iscsi-inq
%{_bindir}/iscsi-ls
%{_bindir}/iscsi-swp
%{_bindir}/iscsi-perf
%{_bindir}/iscsi-readcapacity16
# preload library that intercepts a handful of system calls and converts
# iSCSI URLs to look and behave as if they are normal read-only files.
%{_libdir}/ld_iscsi.so
%{_mandir}/man1/iscsi-inq.1*
%{_mandir}/man1/iscsi-ls.1*
%{_mandir}/man1/iscsi-swp.1*
%files devel
%defattr(-,root,root)
%{_libdir}/pkgconfig/*.pc
%{_includedir}/iscsi/
%{_libdir}/libiscsi.so
%files test
%defattr(-,root,root)
%{_bindir}/iscsi-test-cu
%{_mandir}/man1/iscsi-test-cu.1*
%changelog