File libs3.spec of Package libs3
Name: libs3
Version: 4.1
Release: 1
License: GPL-3.0
URL: http://sourceforge.net/projects/reallibs3
Source0: libs3.tar.bz2
Patch0: libs3-Makefile.diff
Patch1: libs3-progress.diff
Patch2: libs3-format.patch
Patch3: libs3-largerpart.diff
Patch4: fix-snprintf-overflow.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Autoreqprov: on
# Want to include curl dependencies, but older Fedora Core uses curl-devel,
# and newer Fedora Core uses libcurl-devel ... have to figure out how to
# handle this problem, but for now, just don't check for any curl libraries
%if 0%{?centos_version} < 600 && 0%{?centos_version} > 0
BuildRequires: curl-devel
%else
BuildRequires: libcurl-devel
%endif
BuildRequires: libxml2-devel
BuildRequires: openssl-devel
BuildRequires: make
#Buildrequires: automake
Summary: C Library and Tools for Amazon S3 Access
Group: Networking/Utilities
%description
Source for the S3 library, providing access to Amazon's S3 object storage.
#%define debug_package %{nil}
%package -n libs3-4
Summary: C Library and Tools for Amazon S3 Access
Group: Networking/Utilities
%description -n libs3-4
This package includes the libs3 shared object library, needed to run
applications compiled against libs3, and additionally contains the s3
utility for accessing Amazon S3.
%package devel
Summary: Headers and documentation for libs3
Group: Development/Libraries
Requires: %{name}-4 = %{version}-%{release}
%description devel
This library provides an API for using Amazon's S3 service (see
http://s3.amazonaws.com). Its design goals are:
- To provide a simple and straightforward API for accessing all of S3's
functionality
- To not require the developer using libs3 to need to know anything about:
- HTTP
- XML
- SSL
In other words, this API is meant to stand on its own, without requiring
any implicit knowledge of how S3 services are accessed using HTTP
protocols.
- To be usable from multithreaded code
- To be usable by code which wants to process multiple S3 requests
simultaneously from a single thread
- To be usable in the simple, straightforward way using sequentialized
blocking requests
%prep
%setup -q -n libs3
%patch0 -p1
%patch1 -p1
#%patch2 -p1
%patch3 -p1
%if 0%{?suse_version} >= 1500
%patch4 -p1
%endif
#autoreconf -fi
%build
export RPM_OPT_FLAGS
#BUILD=$RPM_BUILD_ROOT/build \
#sed -e 's!^CFLAGS +=!& %{optflags}!' \
# -e 's!^LDFLAGS =!& %{?__global_ldflags}!' \
# -e 's!install -Dps!install -Dp!' \
# -i GNUmakefile
make exported LIB=%{_lib} VERBOSE=1
%install
export RPM_OPT_FLAGS
BUILD=$RPM_BUILD_ROOT/build DESTDIR=$RPM_BUILD_ROOT/usr make install LIB=%{_lib} VERBOSE=1
chmod 0755 %{buildroot}/usr/%{_lib}/libs3.so.*
rm -rf $RPM_BUILD_ROOT/build
%clean
rm -rf $RPM_BUILD_ROOT
%post -n libs3-4 -p /sbin/ldconfig
%postun -n libs3-4 -p /sbin/ldconfig
%files -n libs3-4
%defattr(-,root,root,-)
/usr/bin/s3
%attr(0755,root,root) /usr/%{_lib}/libs3.so.*
%doc README TODO ChangeLog COPYING
%files -n libs3-devel
%defattr(-,root,root,-)
/usr/include/libs3.h
/usr/%{_lib}/libs3.a
/usr/%{_lib}/libs3.so
%changelog
* Sat Aug 09 2008 <bryan@ischo,com> Bryan Ischo
- Split into regular and devel packages.
* Tue Aug 05 2008 <bryan@ischo,com> Bryan Ischo
- Initial build.