107 lines
3.1 KiB
RPMSpec
107 lines
3.1 KiB
RPMSpec
|
|
Name: libiscsi
|
||
|
|
Version: 1.18.0
|
||
|
|
Release: 6
|
||
|
|
Summary: Client-side library to implement the iSCSI protocol
|
||
|
|
License: LGPLv2+ and GPLv2+
|
||
|
|
URL: https://github.com/sahlberg/%{name}
|
||
|
|
|
||
|
|
Source: https://github.com/sahlberg/%{name}/archive/%{version}.tar.gz
|
||
|
|
|
||
|
|
Patch0000: 0000-Fix-compiler-warning-error-under-gcc7.patch
|
||
|
|
Patch0001: 0001-Fix-another-compiler-warning.patch
|
||
|
|
Patch0002: 0002-Fix-32bit-build.patch
|
||
|
|
Patch0003: 0003-iser-Use-local-container_of-definition.patch
|
||
|
|
Patch6000: 6000-iscsi-perf-fix-overflow-issue-in-fill_read_queue.patch
|
||
|
|
Patch6001: 6001-sync-fix-return-value-for-various-sync-commands.patch
|
||
|
|
|
||
|
|
BuildRequires: gcc git
|
||
|
|
BuildRequires: autoconf automake libtool popt-devel CUnit-devel libgcrypt-devel rdma-core-devel chrpath
|
||
|
|
|
||
|
|
Provides: %{name}-utils %{name}-utils%{?_isa}
|
||
|
|
|
||
|
|
%description
|
||
|
|
Libiscsi is a client-side library to implement the iSCSI protocol that can be used
|
||
|
|
to access the resources of an iSCSI target.
|
||
|
|
|
||
|
|
|
||
|
|
#######################################################################
|
||
|
|
|
||
|
|
# Conflict with iscsi-initiator-utils.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%autosetup -n %{name}-%{version} -p1 -Sgit
|
||
|
|
|
||
|
|
%build
|
||
|
|
sh autogen.sh
|
||
|
|
%configure --libdir=%{_libdir}/iscsi --disable-werror
|
||
|
|
make %{?_smp_mflags}
|
||
|
|
|
||
|
|
%install
|
||
|
|
make DESTDIR=$RPM_BUILD_ROOT install pkgconfigdir=%{_libdir}/pkgconfig %{?_smp_mflags}
|
||
|
|
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
|
||
|
|
echo %{_libdir}/iscsi > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||
|
|
rm $RPM_BUILD_ROOT/%{_libdir}/iscsi/libiscsi.a
|
||
|
|
rm $RPM_BUILD_ROOT/%{_libdir}/iscsi/libiscsi.la
|
||
|
|
|
||
|
|
# Remove rpath
|
||
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-perf
|
||
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-test-cu
|
||
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-swp
|
||
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-ls
|
||
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-inq
|
||
|
|
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/iscsi-readcapacity16
|
||
|
|
|
||
|
|
# Remove "*.old" files
|
||
|
|
find $RPM_BUILD_ROOT -name "*.old" -exec rm -f {} \;
|
||
|
|
|
||
|
|
# Remove library put in /usr/bin
|
||
|
|
rm $RPM_BUILD_ROOT/%{_bindir}/ld_iscsi.so
|
||
|
|
|
||
|
|
%post -p /sbin/ldconfig
|
||
|
|
|
||
|
|
%postun -p /sbin/ldconfig
|
||
|
|
|
||
|
|
%package devel
|
||
|
|
Summary: Development libraries for iSCSI client
|
||
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||
|
|
|
||
|
|
%description devel
|
||
|
|
This package contains the header files for %{name}.
|
||
|
|
|
||
|
|
%package help
|
||
|
|
Summary: Help info for %{name}
|
||
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||
|
|
|
||
|
|
%description help
|
||
|
|
This package contains the help info for %{name}.
|
||
|
|
|
||
|
|
%files
|
||
|
|
%license COPYING LICENCE-GPL-2.txt LICENCE-LGPL-2.1.txt
|
||
|
|
%doc README TODO
|
||
|
|
%dir %{_libdir}/iscsi
|
||
|
|
%{_libdir}/iscsi/libiscsi.so.*
|
||
|
|
%{_bindir}/iscsi-ls
|
||
|
|
%{_bindir}/iscsi-inq
|
||
|
|
%{_bindir}/iscsi-readcapacity16
|
||
|
|
%{_bindir}/iscsi-swp
|
||
|
|
%{_bindir}/iscsi-perf
|
||
|
|
%{_bindir}/iscsi-test-cu
|
||
|
|
%config /etc/ld.so.conf.d/*
|
||
|
|
|
||
|
|
%files devel
|
||
|
|
%dir %{_includedir}/iscsi
|
||
|
|
%{_includedir}/iscsi/iscsi.h
|
||
|
|
%{_includedir}/iscsi/scsi-lowlevel.h
|
||
|
|
%{_libdir}/iscsi/libiscsi.so
|
||
|
|
%{_libdir}/pkgconfig/libiscsi.pc
|
||
|
|
|
||
|
|
%files help
|
||
|
|
%{_mandir}/man1/iscsi-ls.1.gz
|
||
|
|
%{_mandir}/man1/iscsi-inq.1.gz
|
||
|
|
%{_mandir}/man1/iscsi-swp.1.gz
|
||
|
|
%{_mandir}/man1/iscsi-test-cu.1.gz
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Sat Aug 31 2019 mingfangsen <mingfangsen@huawei.com> - 1.18.0-6
|
||
|
|
- Package init
|