d1a6b33
# Name of the project is avl, despite Debian using libavl, because they cannot
d1a6b33
# do otherwise.
d1a6b33
Name:           avl
d1a6b33
Version:        0.3.5
d1a6b33
Release:        1%{?dist}
d1a6b33
Summary:        AVL tree manipulation library
d1a6b33
d1a6b33
Group:          System Environment/Libraries
d1a6b33
License:        LGPLv2+
d1a6b33
URL:            http://git.fruit.je/avl
d1a6b33
# Upstream development is API-incompatible per discussion with its author,
d1a6b33
# he suggested using Debian orig.tar.gz
d1a6b33
Source0:        http://ftp.debian.org/debian/pool/main/liba/libavl/libavl_0.3.5.orig.tar.gz
d1a6b33
Patch0:         avl-0.3.5-build.patch
d1a6b33
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
d1a6b33
d1a6b33
%description
d1a6b33
This library consists of a set of functions to manipulate AVL trees. AVL
d1a6b33
trees are very efficient balanced binary trees, similar to red-black
d1a6b33
trees. The functions in this library can handle any kind of payload and
d1a6b33
search key type.
d1a6b33
d1a6b33
%package        devel
d1a6b33
Summary:        Development files for %{name}
d1a6b33
Group:          Development/Libraries
d1a6b33
Requires:       %{name} = %{version}-%{release}
d1a6b33
d1a6b33
%description    devel
d1a6b33
The %{name}-devel package contains libraries and header files for
d1a6b33
developing applications that use %{name}.
d1a6b33
d1a6b33
%prep
d1a6b33
%setup -q
d1a6b33
%patch0 -p1 -b .build
d1a6b33
d1a6b33
%build
d1a6b33
export CFLAGS="%{optflags}"
d1a6b33
make -f GNUmakefile %{?_smp_mflags}  libdir=%{_libdir}
d1a6b33
d1a6b33
d1a6b33
%install
d1a6b33
rm -rf $RPM_BUILD_ROOT
d1a6b33
make install DESTDIR=$RPM_BUILD_ROOT prefix=%{_prefix} libdir=%{_libdir}
d1a6b33
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
d1a6b33
find $RPM_BUILD_ROOT%{_libdir} -type f -exec chmod +x '{}' \;
d1a6b33
d1a6b33
%clean
d1a6b33
rm -rf $RPM_BUILD_ROOT
d1a6b33
d1a6b33
d1a6b33
%post -p /sbin/ldconfig
d1a6b33
d1a6b33
%postun -p /sbin/ldconfig
d1a6b33
d1a6b33
d1a6b33
%files
d1a6b33
%defattr(-,root,root,-)
d1a6b33
%doc README COPYING
d1a6b33
%{_libdir}/*.so.*
d1a6b33
d1a6b33
%files devel
d1a6b33
%defattr(-,root,root,-)
d1a6b33
%{_includedir}/*
d1a6b33
%{_libdir}/*.so
d1a6b33
d1a6b33
d1a6b33
%changelog
d1a6b33
* Mon Dec 06 2010 Matěj Cepl <mcepl@redhat.com> - 0.3.5-1
d1a6b33
- Experimental build for review.