257f0b
Name:		Judy
257f0b
Version:	1.0.5
257f0b
Release:	18%{?dist}
257f0b
Summary:	General purpose dynamic array
257f0b
License:	LGPLv2+
257f0b
URL:		http://sourceforge.net/projects/judy/
257f0b
Source0:	http://downloads.sf.net/judy/Judy-%{version}.tar.gz
257f0b
# Make tests use shared instead of static libJudy
257f0b
Patch0:		Judy-1.0.4-test-shared.patch
257f0b
# The J1* man pages were incorrectly being symlinked to Judy, rather than Judy1
257f0b
# This patch corrects that; submitted upstream 2008/11/27
257f0b
Patch1:		Judy-1.0.4-fix-Judy1-mans.patch
257f0b
# Fix some code with undefined behavior, commented on and removed by gcc
257f0b
Patch2:		Judy-1.0.5-undefined-behavior.patch
257f0b
BuildRequires:	coreutils
257f0b
BuildRequires:	gawk
257f0b
BuildRequires:	gcc >= 4.1
257f0b
BuildRequires:	make
257f0b
BuildRequires:	sed
257f0b
257f0b
%description
257f0b
Judy is a C library that provides a state-of-the-art core technology
257f0b
that implements a sparse dynamic array. Judy arrays are declared
257f0b
simply with a null pointer. A Judy array consumes memory only when it
257f0b
is populated, yet can grow to take advantage of all available memory
257f0b
if desired. Judy's key benefits are scalability, high performance, and
257f0b
memory efficiency. A Judy array is extensible and can scale up to a
257f0b
very large number of elements, bounded only by machine memory. Since
257f0b
Judy is designed as an unbounded array, the size of a Judy array is
257f0b
not pre-allocated but grows and shrinks dynamically with the array
257f0b
population.
257f0b
257f0b
%package devel
257f0b
Summary:	Development libraries and headers for Judy
257f0b
Requires:	%{name} = %{version}-%{release}
257f0b
257f0b
%description devel
257f0b
This package contains the development libraries and header files
257f0b
for developing applications that use the Judy library.
257f0b
257f0b
%prep
257f0b
%setup -q -n judy-%{version}
257f0b
%patch0 -p1 -b .test-shared
257f0b
%patch1 -p1 -b .fix-Judy1-mans
257f0b
%patch2 -p1 -b .behavior
257f0b
257f0b
%build
257f0b
export CFLAGS="%{optflags} -fno-strict-aliasing -fno-tree-ccp -fno-tree-dominator-opts -fno-tree-copy-prop -fno-tree-vrp"
257f0b
%configure --disable-static
257f0b
make
257f0b
#%{?_smp_mflags}
257f0b
# fails to compile properly with parallel make:
257f0b
# http://sourceforge.net/tracker/index.php?func=detail&aid=2129019&group_id=55753&atid=478138
257f0b
257f0b
%install
257f0b
make install DESTDIR=%{buildroot} INSTALL="install -p"
257f0b
# get rid of static libs and libtool archives
257f0b
rm -f %{buildroot}%{_libdir}/*.{a,la}
257f0b
# clean out zero length and generated files from doc tree
257f0b
rm -rf doc/man
257f0b
rm -f doc/Makefile* doc/ext/README_deliver
257f0b
[ -s doc/ext/COPYRIGHT ] || rm -f doc/ext/COPYRIGHT
257f0b
[ -s doc/ext/LICENSE ] || rm -f doc/ext/LICENSE
257f0b
257f0b
%check
257f0b
cd test
257f0b
./Checkit
257f0b
cd -
257f0b
257f0b
%if (0%{?rhel} && 0%{?rhel} <= 7) || (0%{?fedora} && 0%{?fedora} <= 27)
257f0b
# ldconfig scriptlets replaced by RPM File Triggers from Fedora 28
257f0b
%post -p /sbin/ldconfig
257f0b
%postun -p /sbin/ldconfig
257f0b
%endif
257f0b
257f0b
%files
257f0b
%if 0%{?_licensedir:1}
257f0b
%license COPYING
257f0b
%else
257f0b
%doc COPYING
257f0b
%endif
257f0b
%doc AUTHORS ChangeLog README examples/
257f0b
%{_libdir}/libJudy.so.*
257f0b
257f0b
%files devel
257f0b
%doc doc
257f0b
%{_includedir}/Judy.h
257f0b
%{_libdir}/libJudy.so
257f0b
%{_mandir}/man3/J*.3*
257f0b
257f0b
%changelog
257f0b
* Thu Oct 11 2018 Michal Schorm <mschorm@redhat.com> - 1.0.5-18
257f0b
- Remove README.Fedora; no longer needed since 1.0.5 version
257f0b
- Resolves: #1638717
257f0b
257f0b
* Thu Feb 08 2018 Paul Howarth <paul@city-fan.org> - 1.0.5-17
257f0b
- ldconfig scriptlets replaced by RPM File Triggers from Fedora 28
257f0b
- Drop legacy BuildRoot: and Group: tags
257f0b
- Drop redundant explicit buildroot cleaning
257f0b
- Specify all explicitly-used build requirements
257f0b
- Use %%license where possible
257f0b
- Drop %%defattr, redundant since rpm 4.4
257f0b
257f0b
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-16
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
257f0b
257f0b
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-15
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
257f0b
257f0b
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-14
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
257f0b
257f0b
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-13
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
257f0b
257f0b
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.5-12
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
257f0b
257f0b
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-11
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
257f0b
257f0b
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-10
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
257f0b
257f0b
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-9
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
257f0b
257f0b
* Tue Feb 18 2014 Paul Howarth <paul@city-fan.org> - 1.0.5-8
257f0b
- Fix some code with undefined behavior
257f0b
- Build with -fno-strict-aliasing
257f0b
- Disable various compiler tree optimizations that trigger reproducible
257f0b
  crashes in gtkwave without generating compiler warnings (#1064090)
257f0b
257f0b
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-7
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
257f0b
257f0b
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-6
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
257f0b
257f0b
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-5
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
257f0b
257f0b
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-4
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
257f0b
257f0b
* Fri Jan  6 2012 Paul Howarth <paul@city-fan.org> - 1.0.5-3
257f0b
- Rebuilt for gcc 4.7
257f0b
257f0b
* Mon Feb  7 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.5-2
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
257f0b
257f0b
* Sun Jul 18 2010 Paul Howarth <paul@city-fan.org> - 1.0.5-1
257f0b
- Update to 1.0.5
257f0b
  - Added proper clean targets to enable multiple builds
257f0b
  - Added examples directory
257f0b
  - Correctly detects 32/64-bit build environment
257f0b
  - Allow explicit configure for 32/64-bit environment
257f0b
- Cosmetic spec file clean-ups
257f0b
257f0b
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-6
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
257f0b
257f0b
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-5
257f0b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
257f0b
257f0b
* Sat Dec 13 2008 Charles R. Anderson <cra@wpi.edu> - 1.0.4-4
257f0b
- For Judy1 man page fix, patch Makefile.{am,in} instead of
257f0b
  relying on autotools to regenerate the latter
257f0b
- Add README.Fedora with upstream's license explanation
257f0b
257f0b
* Sun Nov 30 2008 Charles R. Anderson <cra@wpi.edu> - 1.0.4-3
257f0b
- Fix Judy1 man page symlinks
257f0b
- Use valid tag License: LGPLv2+ confirmed with upstream
257f0b
- Use version macro in Source0
257f0b
- Remove Makefiles from installed doc tree
257f0b
257f0b
* Thu Nov 27 2008 Charles R. Anderson <cra@wpi.edu> - 1.0.4-2
257f0b
- Patch tests to run with shared library
257f0b
- Run tests in check section
257f0b
257f0b
* Sun Oct 05 2008 Charles R. Anderson <cra@wpi.edu> - 1.0.4-1
257f0b
- Initial package for Fedora