Files
libiscsi/packaging/RPM/libiscsi.spec.in
Paolo Bonzini 17319072b1 use automake and libtool
This commits replaces the handwritten makefile with automake+libtool.
There is some hackery needed for the LD_PRELOAD shared library,
but apart from that there is nothing special and it is a large gain in
portability and standardization.

The spec file is modified as little as is needed to properly build
the RPMs.
2011-10-28 17:04:59 +02:00

87 lines
1.7 KiB
RPMSpec

Name: libiscsi
Summary: iSCSI client library
Vendor: Ronnie Sahlberg
Packager: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Version: 1.0.0
Release: 1GITHASH
Epoch: 0
License: GNU LGPL version 3
Group: Libraries
URL: https://github.com/sahlberg/libiscsi
Source: libiscsi-%{version}.tar.gz
Prereq: fileutils
Provides: libiscsi = %{version}
Prefix: /usr
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
libiscsi is a client library for attaching to iscsi resources across
a network and a set of assorted useful utilities
#######################################################################
%prep
%setup -q
# setup the init script and sysconfig file
%setup -T -D -n libiscsi-%{version} -q
%build
CC="gcc"
export CC
## always run autogen.sh
./autogen.sh
%configure
make
%install
# Clean up in case there is trash left from a previous build
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
# Remove "*.old" files
find $RPM_BUILD_ROOT -name "*.old" -exec rm -f {} \;
%clean
rm -rf $RPM_BUILD_ROOT
#######################################################################
## Files section ##
#######################################################################
%files
%defattr(-,root,root)
%{_bindir}/ld_iscsi.so
%{_bindir}/iscsi-ls
%{_bindir}/iscsi-inq
%{_libdir}/libiscsi.so.*
%package devel
Summary: iSCSI client development libraries
Group: Development
%description devel
development libraries for iSCSI
%files devel
%defattr(-,root,root)
%{_includedir}/iscsi/iscsi.h
%{_includedir}/iscsi/scsi-lowlevel.h
%{_libdir}/libiscsi.a
%{_libdir}/libiscsi.la
%{_libdir}/libiscsi.so
%changelog
* Sat Dec 4 2010 : Version 1.0.0
- Initial version