Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 3d1a8ca667777773f5a197917aac1393 > files > 3

avlmap-0.10.2-5mdk.src.rpm

%define name	avlmap
%define version 0.10.2
%define release 5mdk

%define	major 0
%define libname	%mklibname %{name} %{major}

Summary:	AVLMAP - Binary tree and mapping library
Name:		%{name}
Version:	%{version}
Release:	%{release}
Group:		System/Libraries
License:	LGPL
URL:		http://avlmap.slashusr.org/
Provides:	libavlmap
Source0:	%{name}-%{version}.tar.bz2
Patch0:		avlmap-0.10.2-string.patch.bz2
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
The avlmap library implements a data mapping abstraction in
function calls, along with an underlying AVL balanced binary
search tree implementation. 

%package -n	%{libname}
Summary:	AVLMAP - Binary tree and mapping library
Group:          System/Libraries

%description -n	%{libname}
The avlmap library implements a data mapping abstraction in
function calls, along with an underlying AVL balanced binary
search tree implementation. 

%package -n	%{libname}-devel
Summary:	Development library and header files for the %{name} library
Group:		Development/Other
Requires:	%{libname} = %{version}-%{release}
Provides:	%{name}-devel lib%{name}-devel
Obsoletes:	%{name}-devel lib%{name}-devel

%description -n %{libname}-devel
The avlmap library implements a data mapping abstraction in
function calls, along with an underlying AVL balanced binary
search tree implementation. 

%package -n	%{name}-utils
Summary:	Various utilities using the %{libname} library
Group:          Text tools

%description -n	%{name}-utils
Various utilities using the %{libname} library

* linesort - Perform a simple sort of input lines via string
             mapping.

* wordstat - Count the frequency of different word items in the
             input.

* wordstat - Count the frequency of different word items in the
             input.

* wordscan - like wordstat but don't actually do anything with
             mappings.

%prep

%setup -q -n %{name}-%{version}
%patch0 -p0

%build

echo "%{optflags} -fPIC" > Compile.opt
sh ./Configure --prefix=%{_prefix}

make

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_includedir}
install -d %{buildroot}%{_libdir}

# install binaries
install -m0755 bin/wordfreq %{buildroot}%{_bindir}/
install -m0755 bin/linesort %{buildroot}%{_bindir}/
install -m0755 bin/wordscan %{buildroot}%{_bindir}/
install -m0755 bin/wordsort %{buildroot}%{_bindir}/
install -m0755 bin/wordstat %{buildroot}%{_bindir}/

# install headers
install -m0644 include/*.h %{buildroot}%{_includedir}/

# install the shared lib
install -m0755 lib/libavlmap.so.%{version} %{buildroot}%{_libdir}/
ln -snf libavlmap.so.%{version} %{buildroot}%{_libdir}/libavlmap.so.0.10
ln -snf libavlmap.so.%{version} %{buildroot}%{_libdir}/libavlmap.so.0
ln -snf libavlmap.so.%{version} %{buildroot}%{_libdir}/libavlmap.so


%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%post -n %{libname} -p /sbin/ldconfig

%postun -n %{libname} -p /sbin/ldconfig

%post -n %{libname}-devel -p /sbin/ldconfig

%postun -n %{libname}-devel -p /sbin/ldconfig

%files -n %{libname}
%defattr(-,root,root)
%doc avl-%{version}/changelog.html
%attr(0755,root,root) %{_libdir}/lib%{name}*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%doc Documentation
%attr(0755,root,root) %{_libdir}/lib%{name}.so
%attr(0644,root,root) %{_includedir}/*

%files -n %{name}-utils
%defattr(-,root,root)
%attr(0755,root,root) %{_bindir}/*

%changelog
* Fri Oct 15 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.10.2-5mdk
- fix deps

* Fri Oct 15 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.10.2-4mdk
- rpmbuildupdated

* Thu Jul 10 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.10.2-3mdk
- rebuild

* Sat Jun 28 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.10.2-2mdk
- added P0

* Sat Jun 28 2003 Oden Eriksson <oden.eriksson@kvikkjokk.net> 0.10.2-1mdk
- initial cooker contrib