File Judy.spec of Package judy

# norootforbuild

Name: 		Judy
Summary: 	A general purpose dynamic array implemented as a C callable library
Version: 	1.0.5
Release: 	0
License: 	LGPL
Group: 		Development/Libraries/C and C++
Url: 		http://judy.sourceforge.net/
Source0: 	%{name}-%{version}.tar.bz2
Source1:    Judy-rpmlintrc
%if 0%{?suse_version} > 1110
BuildRequires: fdupes
%endif
Requires:   libJudy1 = %{version}
BuildRoot: 	%{_tmppath}/%{name}-%{version}-build

%description
Judy is a C library that implements a dynamic array.  Empty Judy arrays are
declared with null pointers.  A Judy array consumes memory only when
populated yet can grow to take advantage of all available memory.  Judy's key
benefits are:  scalability, performance, memory efficiency, and ease of use.
Judy arrays are designed to grow without tuning into the peta-element range,
scaling near O(log-base-256) -- 1 more RAM access at 256 X population.

Judy arrays are accessed with insert, retrieve, and delete calls for number
or string indexes.  Configuration and tuning are not required -- in fact not
possible.  Judy offers sorting, counting, and neighbor/empty searching.
Indexes can be sequential, clustered, periodic, or random -- it doesn't
matter to the algorithm.  Judy arrays can be arranged hierarchically to
handle any bit patterns -- large indexes, sets of keys, etc.

Judy is often an improvement over common data structures such as:  arrays,
sparse arrays, hash tables, B-trees, binary trees, linear lists, skiplists,
other sort and search algorithms, and counting functions.


%package devel
Group: 		Development/Libraries/C and C++
Summary: 	Development files for Judy
Requires: 	%{name} = %{version}

%description devel
Judy is a C library that implements a dynamic array.  Empty Judy arrays are
declared with null pointers.  A Judy array consumes memory only when
populated yet can grow to take advantage of all available memory.  Judy's key
benefits are:  scalability, performance, memory efficiency, and ease of use.
Judy arrays are designed to grow without tuning into the peta-element range,
scaling near O(log-base-256) -- 1 more RAM access at 256 X population.

Judy arrays are accessed with insert, retrieve, and delete calls for number
or string indexes.  Configuration and tuning are not required -- in fact not
possible.  Judy offers sorting, counting, and neighbor/empty searching.
Indexes can be sequential, clustered, periodic, or random -- it doesn't
matter to the algorithm.  Judy arrays can be arranged hierarchically to
handle any bit patterns -- large indexes, sets of keys, etc.

Judy is often an improvement over common data structures such as:  arrays,
sparse arrays, hash tables, B-trees, binary trees, linear lists, skiplists,
other sort and search algorithms, and counting functions.

This package holds the development files for Judy.

%package -n libJudy1
Group:  	Development/Libraries/C and C++
Summary:    Dynamic libraries for Judy

%description -n libJudy1
Judy is a C library that implements a dynamic array. This package contains 
dynamic libraries for Judy.


%package static
Group:      Development/Libraries/C and C++
Summary:    Static libraries for Judy

%description static
Judy is a C library that implements a dynamic array. This package contains
static libraries for Judy.


%prep
%setup -q -n judy-%{version}

%build
export CFLAGS="%{optflags} -fno-strict-aliasing" \
%configure
%{__make}

%check
%{__make} check

%install
%makeinstall
%{__install} -dD -m 0755 %{buildroot}%{_docdir}/%{name}
%{__install} -m 0644 \
        AUTHORS COPYING ChangeLog \
        doc/ext/README_deliver \
        doc/ext/*.htm* doc/int/*.htm* \
    %{buildroot}%{_docdir}/%{name}

cp -r examples %{buildroot}%{_docdir}/%{name}/
%if 0%{?suse_version} > 1110
%fdupes %{buildroot}/%{_mandir}
%endif

%clean
%{__rm} -rf %{buildroot}

%post -n libJudy1 -p /sbin/ldconfig

%postun -n libJudy1 -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%dir %{_docdir}/%{name}
%dir %{_docdir}/%{name}/examples
%doc %{_docdir}/%{name}/AUTHORS
%doc %{_docdir}/%{name}/COPYING
%doc %{_docdir}/%{name}/ChangeLog
%doc %{_docdir}/%{name}/examples/*

%files devel
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}/*.htm*
%doc %{_docdir}/%{name}/README_deliver
%{_includedir}/%{name}.h
%{_libdir}/lib%{name}.so
%{_mandir}/man3/J*

%files static
%defattr(-,root,root,-)
%{_libdir}/lib%{name}*a

%files -n libJudy1
%defattr(-,root,root,-)
%{_libdir}/lib%{name}.so.*

%changelog
openSUSE Build Service is sponsored by