File libfallocate.spec of Package libfallocate
#
# spec file for package libfallocate (Version 0.1.1)
#
# Copyright (c) 2010 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: libfallocate
Version: 0.1.1
Release: 1
Url: http://libfallocate.sf.net/
Source: libfallocate-%{version}.tar.bz2
#Patch:
BuildRequires: autoconf gcc glibc-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Prefix: /usr
Summary: Filesystem preallocation interface library
License: GNU LGPL v2.1 or later
Group: System/Filesystems
%description
libfallocate provides an interface for applications to tell filesystems
about the size of to-be-written files, so the filesystem can do a better
job in taking allocation decisions to avoid fragmentation.
libfallocate provides a wrapper for the fallocate() syscall in case your
glibc (<2.10) does not have it yet. It also provides linux_fallocate()
which will attempt the space reservation ioctl that xfs and ocfs2
provide in case fallocate() did not succeed.
It has an additional richer interface fallocate_with_fallback() that
allows you to instruct it to fallback to do preallocation by zeroing
things out (like posix_fallocate()) or to extend the file size by a sparse
write (like a successful fallocate() with mode==0 would have done).
Authors:
--------
Kurt Garloff <garloff@suse.de>
%package -n libfallocate0
Summary: Filesystem preallocation interface library
License: GNU LGPL v2.1 or later
Group: System/Filesystems
%description -n libfallocate0
libfallocate provides an interface for applications to tell filesystems
about the size of to-be-written files, so the filesystem can do a better
job in taking allocation decisions to avoid fragmentation.
libfallocate provides a wrapper for the fallocate() syscall in case your
glibc (<2.10) does not have it yet. It also provides linux_fallocate()
which will attempt the space reservation ioctl that xfs and ocfs2
provide in case fallocate() did not succeed.
It has an additional richer interface fallocate_with_fallback() that
allows you to instruct it to fallback to do preallocation by zeroing
things out (like posix_fallocate()) or to extend the file size by a sparse
write (like a successful fallocate() with mode==0 would have done).
Authors:
--------
Kurt Garloff <garloff@suse.de>
%package devel
License: GNU LGPL v2.1 or later
Requires: libfallocate0 = %{version}
Summary: Header and devel files for libfallocate
Group: Development/Libraries/C and C++
%description devel
This package contains the header file and the .so library to link
against for apps that want to use libfallocate.
%package devel-static
License: GNU LGPL v2.1 or later
Requires: libfallocate-devel = %{version}
Summary: Static library for libfallocate
Group: Development/Libraries/C and C++
%description devel-static
This package contains the static library for apps
apps that want to use libfallocate statically.
%prep
%setup -q -n libfallocate-%{version}
%build
./autogen.sh
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" static
%check
make check
%install
make install-lib install-static install-header DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LIBDIR=%{_libdir} DOCDIR=%{_docdir}/libfallocate0
%post -n libfallocate0 -p /sbin/ldconfig
%postun -n libfallocate0 -p /sbin/ldconfig
%files -n libfallocate0
%defattr(0755,root,root)
%{_libdir}/libfallocate.so.*
%defattr(-,root,root)
%doc README TODO COPYING AUTHORS
%files devel
%defattr(0755,root,root)
%{_libdir}/libfallocate.so
%defattr(0644,root,root)
%{_prefix}/include/fallocate.h
%files devel-static
%defattr(0644,root,root)
%{_libdir}/libfallocate.a
%changelog