Eric Smith 53fbff5
%{?filter_setup:
Eric Smith 53fbff5
%filter_provides_in %{python_sitearch}/.*\.so$
Eric Smith 53fbff5
%filter_setup
Eric Smith 53fbff5
}
Eric Smith 53fbff5
Eric Smith 53fbff5
Name:           libkdtree++
Eric Smith 53fbff5
Version:        0.7.0
cdcb276
Release:        20%{?dist}
Eric Smith 53fbff5
Summary:        C++ template container implementation of kd-tree sorting
Eric Smith 53fbff5
URL:            http://libkdtree.alioth.debian.org/
Eric Smith 53fbff5
License:        Artistic 2.0
4c5708a
BuildRequires:  gcc-c++
Eric Smith 53fbff5
BuildRequires:  autoconf automake python2-devel swig
Eric Smith 53fbff5
Eric Smith 53fbff5
Source0:        http://alioth.debian.org/frs/download.php/2702/libkdtree++-0.7.0.tar.bz2
Eric Smith 53fbff5
Eric Smith 53fbff5
# patch to make GCC 4.7 happy (fixed in upstream git, not yet in release):
Eric Smith 53fbff5
Patch0:         libkdtree++-0.7.0-pedantic.patch
Eric Smith 53fbff5
# patch to make pkgconfig file (.pc) (submitted to upstream mailing list
Eric Smith 53fbff5
# on 29-Sep-2012):
Eric Smith 53fbff5
Patch1:         libkdtree++-0.7.0-pkgconfig.patch
Eric Smith 53fbff5
# patch to build examples/test with %{optflags}
Eric Smith 53fbff5
Patch2:         libkdtree++-0.7.0-examples-optflags.patch
Eric Smith 53fbff5
Eric Smith 53fbff5
%description
Eric Smith 53fbff5
%{summary}.
Eric Smith 53fbff5
Eric Smith 53fbff5
Eric Smith 53fbff5
%package devel
Eric Smith 53fbff5
Summary:        C++ template container implementation of kd-tree sorting
Eric Smith 53fbff5
Provides:       libkdtree++-static = %{version}
Eric Smith 53fbff5
BuildArch:      noarch
Eric Smith 53fbff5
Eric Smith 53fbff5
%description devel
Eric Smith 53fbff5
%{summary}.
Eric Smith 53fbff5
Eric Smith 53fbff5
4660ec2
%package -n python2-libkdtree++
4660ec2
%{?python_provide:%python_provide python2-libkdtree++}
4660ec2
# Remove before F30
4660ec2
Provides: %{name}-python%{?_isa} = %{version}-%{release}
4660ec2
Obsoletes: %{name}-python < %{version}-%{release}
Eric Smith 53fbff5
Summary:        Python language bindings for libkdtree++
Eric Smith 53fbff5
4660ec2
%description -n python2-libkdtree++
Eric Smith 53fbff5
%{summary}.
Eric Smith 53fbff5
Eric Smith 53fbff5
Eric Smith 53fbff5
%package examples
Eric Smith 53fbff5
Summary:        Examples for libkdtree++
Eric Smith 53fbff5
Requires:       libkdtree++-devel = %{version}
Eric Smith 53fbff5
BuildArch:      noarch
Eric Smith 53fbff5
Eric Smith 53fbff5
%description examples
Eric Smith 53fbff5
%{summary}.
Eric Smith 53fbff5
Eric Smith 53fbff5
Eric Smith 53fbff5
%prep
Eric Smith 53fbff5
%setup -q -n %{name}_%{version}
Eric Smith 53fbff5
%patch0 -p1 -b .pkgconfig
Eric Smith 53fbff5
%patch1 -p1 -b .pkgconfig
Eric Smith 53fbff5
%patch2 -p1 -b .examples-optflags
Eric Smith 53fbff5
Eric Smith 53fbff5
# convert files from ISO-8859-1 to UTF-8 encoding
Eric Smith 53fbff5
for f in README
Eric Smith 53fbff5
do
Eric Smith 53fbff5
  iconv -fiso88591 -tutf8 $f >$f.new
Eric Smith 53fbff5
  touch -r $f $f.new
Eric Smith 53fbff5
  mv $f.new $f
Eric Smith 53fbff5
done
Eric Smith 53fbff5
Eric Smith 53fbff5
Eric Smith 53fbff5
%build
Eric Smith 53fbff5
autoreconf -f -i
Eric Smith 53fbff5
%configure
Eric Smith 53fbff5
make
Eric Smith 53fbff5
Eric Smith 53fbff5
cd python-bindings
Eric Smith 53fbff5
make CPPFLAGS="%{optflags} -fPIC `pkg-config --cflags python`"
Eric Smith 53fbff5
cd ..
Eric Smith 53fbff5
Eric Smith 53fbff5
%check
Eric Smith 53fbff5
cd examples
Eric Smith 53fbff5
make %{?_smpflags} CPPFLAGS="%{optflags}"
Eric Smith 53fbff5
./test_kdtree
Eric Smith 53fbff5
./test_hayne
Eric Smith 53fbff5
cd ..
Eric Smith 53fbff5
Eric Smith 53fbff5
cd python-bindings
Eric Smith 53fbff5
python py-kdtree_test.py
Eric Smith 53fbff5
cd ..
Eric Smith 53fbff5
Eric Smith 53fbff5
%install
Eric Smith 53fbff5
make install DESTDIR=%{buildroot}
Eric Smith 53fbff5
install -d %{buildroot}%{python_sitearch}
Eric Smith 53fbff5
install -pm 0755 python-bindings/_kdtree.so %{buildroot}%{python_sitearch}/
Eric Smith 53fbff5
install -d %{buildroot}%{python_sitelib}
Eric Smith 53fbff5
install -pm 0644 python-bindings/kdtree.py %{buildroot}%{python_sitelib}/
Eric Smith 53fbff5
Eric Smith 53fbff5
%files devel
Eric Smith 53fbff5
%doc COPYING AUTHORS README NEWS TODO ChangeLog
Eric Smith 53fbff5
%{_includedir}/kdtree++/
Eric Smith 53fbff5
%{_datadir}/pkgconfig/*.pc
Eric Smith 53fbff5
4660ec2
%files -n python2-libkdtree++
Eric Smith 53fbff5
%doc COPYING AUTHORS README NEWS TODO ChangeLog
09a72a2
%{python2_sitearch}/_kdtree.so
b83bdde
%{python2_sitelib}/kdtree.py
b83bdde
%{python2_sitelib}/kdtree.pyc
b83bdde
%{python2_sitelib}/kdtree.pyo
Eric Smith 53fbff5
Eric Smith 53fbff5
%files examples
Eric Smith 53fbff5
%doc examples/CMakeLists.txt
Eric Smith 53fbff5
%doc examples/Makefile
Eric Smith 53fbff5
%doc examples/test*.cpp
Eric Smith 53fbff5
Eric Smith 53fbff5
%changelog
cdcb276
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-20
cdcb276
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
cdcb276
0de8b15
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-19
0de8b15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
0de8b15
fb13053
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-18
fb13053
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
fb13053
4660ec2
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.7.0-17
4660ec2
- Python 2 binary package renamed to python2-libkdtree++
4660ec2
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
4660ec2
dd520b1
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-16
dd520b1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
dd520b1
2c0e7e0
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-15
2c0e7e0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2c0e7e0
Igor Gnatenko db0c394
* Fri Jul 07 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.7.0-14
Igor Gnatenko db0c394
- Rebuild due to bug in RPM (RHBZ #1468476)
Igor Gnatenko db0c394
5266ddd
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-13
5266ddd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
5266ddd
71765c3
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-12
71765c3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
71765c3
5ab1040
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-11
5ab1040
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
5ab1040
0c7c994
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-10
0c7c994
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
0c7c994
8acaadb
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-9
8acaadb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
8acaadb
c67acd0
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-8
c67acd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
c67acd0
c875523
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-7
c875523
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c875523
d986a91
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-6
d986a91
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
d986a91
43086ef
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.0-5
43086ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
43086ef
Eric Smith 53fbff5
* Sun Oct 14 2012 Eric Smith <eric@brouhaha.com> - 0.7.0-4
Eric Smith 53fbff5
- Updated based on package review.
Eric Smith 53fbff5
Eric Smith 53fbff5
* Sat Sep 29 2012 Eric Smith <eric@brouhaha.com> - 0.7.0-3
Eric Smith 53fbff5
- Updated based on package review.
Eric Smith 53fbff5
Eric Smith 53fbff5
* Fri Jun 22 2012 Eric Smith <eric@brouhaha.com> - 0.7.0-2
Eric Smith 53fbff5
- Updated based on package review.
Eric Smith 53fbff5
Eric Smith 53fbff5
* Sat Dec 03 2011 Eric Smith <eric@brouhaha.com> - 0.7.0-1
Eric Smith 53fbff5
- Initial version