libaio/libaio.spec

118 lines
3.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package libaio
#
# Copyright (c) 2011 SUSE LINUX Products 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/
#
Name: libaio
%define lname libaio1
License: LGPLv2.1+
Group: Development/Libraries/C and C++
# bug437293
%ifarch ppc64
Obsoletes: libaio-64bit
%endif
#
Version: 0.3.109
Release: 1
Summary: Linux-Native Asynchronous I/O Access Library
URL: http://kernel.org/pub/linux/libs/aio/
Source: libaio-%{version}.tar.bz2
Source2: baselibs.conf
Patch2: libaio-optflags.diff
Patch3: 00_arches.patch
Patch4: 00_arches_sh.patch
Patch5: 01_link_libgcc.patch
Patch6: 02_libdevdir.patch
Patch7: 03_man_errors.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The Linux-native asynchronous I/O facility ("async I/O", or "aio") has
a richer API and capability set than the simple POSIX async I/O
facility. This library provides the Linux-native API for async I/O. The
POSIX async I/O facility requires this library to provide
kernel-accelerated async I/O capabilities, as do applications that
require the Linux-native async I/O API.
%package -n %lname
Summary: Linux-Native Asynchronous I/O Access Library
Group: System/Libraries
# O/P added 2011-11-27
Obsoletes: libaio < %version-%release
Provides: libaio = %version-%release
%description -n %lname
The Linux-native asynchronous I/O facility ("async I/O", or "aio") has
a richer API and capability set than the simple POSIX async I/O
facility. This library provides the Linux-native API for async I/O. The
POSIX async I/O facility requires this library to provide
kernel-accelerated async I/O capabilities, as do applications that
require the Linux-native async I/O API.
%package devel
Summary: Development Files for Linux-native Asynchronous I/O Access
Group: Development/Libraries/C and C++
Requires: %lname = %versoin, glibc-devel
# bug437293
%ifarch ppc64
Obsoletes: libaio-devel-64bit
%endif
#
%description devel
This package provides header files to include, and libraries to link
with, for the Linux-native asynchronous I/O facility ("async I/O", or
"aio").
%prep
%setup -q
%patch2 -p1
%patch -p1 -P 3 -P 4 -P 5 -P 6 -P 7
%build
make %{?_smp_mflags} CC="%__cc" OPTFLAGS="$RPM_OPT_FLAGS"
%install
make install prefix=%{buildroot}/usr libdir=%{buildroot}/%{_lib}
%if "%_lib" == "lib64"
mv "%buildroot/usr/lib" "%buildroot/usr/lib64"
%endif
rm -f "%buildroot/%_libdir"/*.a
# Strip dumb /usr/src/... off
t=$(readlink -f "%buildroot/%_lib/libaio.so.1")
ln -fs "${t##*/}" "%buildroot/%_lib/libaio.so.1"
t=$(readlink -f "%buildroot/%_libdir/libaio.so")
ln -fs "${t#%buildroot}" "%buildroot/%_libdir/libaio.so"
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(644,root,root,755)
%doc COPYING TODO
%attr(0755,root,root) /%{_lib}/libaio.*
%files devel
%defattr(644,root,root,755)
/usr/include/libaio.h
%_libdir/libaio.so
%changelog