Blob Blame History Raw
%global gdalcpp_version 1.1.1-3.20160601git225b97c
%global protozero_version 1.5.1

%global testcommit 6b669c7b0331f9bba81e759539a17641f53d22f6

%define debug_package %{nil}

Name:           libosmium
Version:        2.11.0
Release:        1%{?dist}
Summary:        Fast and flexible C++ library for working with OpenStreetMap data

License:        Boost
URL:            http://osmcode.org/libosmium/
Source0:        https://github.com/osmcode/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1:        https://github.com/osmcode/osm-testdata/archive/%{testcommit}/osm-testdata-%{testcommit}.tar.gz

BuildRequires:  cmake
BuildRequires:  doxygen graphviz xmlstarlet
BuildRequires:  ruby rubypick rubygems spatialite-tools

BuildRequires:  boost-devel
BuildRequires:  protozero-devel >= %{protozero_version}
BuildRequires:  gdalcpp-devel >= %{gdalcpp_version}
BuildRequires:  utf8cpp-devel
BuildRequires:  expat-devel
BuildRequires:  zlib-devel
BuildRequires:  bzip2-devel
BuildRequires:  sparsehash-devel
BuildRequires:  gdal-devel
BuildRequires:  geos-devel
BuildRequires:  proj-devel proj-epsg

BuildRequires:  protozero-static
BuildRequires:  gdalcpp-static
BuildRequires:  utf8cpp-static

%description
A fast and flexible C++ library for working with OpenStreetMap data.

%package        devel
Summary:        Development files for %{name}
Provides:       %{name}-static = %{version}-%{release}

Requires:       boost-devel
Requires:       protozero-devel >= %{protozero_version}
Requires:       gdalcpp-devel >= %{gdalcpp_version}
Requires:       utf8cpp-devel
Requires:       expat-devel
Requires:       zlib-devel
Requires:       bzip2-devel
Requires:       sparsehash-devel
Requires:       gdal-devel
Requires:       geos-devel
Requires:       proj-devel

%description    devel
This package contains libraries and header files for
developing applications that use %{name}.

%package        doc
Summary:        Documentation for %{name}
BuildArch:      noarch

%description    doc
This package contains documentation for developing
applications that use %{name}.


%prep
%setup -q -c -T -a 0 -a 1
mv %{name}-%{version} %{name}
mv osm-testdata-%{testcommit} osm-testdata
rm -rf libosmium/include/protozero
rm -rf libosmium/include/gdalcpp.h
rm -rf libosmium/include/utf8.h libosmium/include/utf8
mkdir libosmium/build


%build
cd libosmium/build
%cmake .. -DBUILD_HEADERS=ON -DBUILD_DATA_TESTS=ON
%make_build
%make_build doc


%install
cd libosmium/build
%make_install
rm -rf %{buildroot}%{_docdir}


%check
cd libosmium/build
ctest -V


%files devel
%doc libosmium/README.md
%license libosmium/LICENSE.txt
%{_includedir}/osmium


%files doc
%doc libosmium/build/doc/html/*
%license libosmium/LICENSE.txt


%changelog
* Sat Jan 14 2017 Tom Hughes <tom@compton.nu> - 2.11.0-1
- Update to 2.11.0 upstream release

* Wed Nov 16 2016 Tom Hughes <tom@compton.nu> - 2.10.2-1
- Update to 2.10.2 upstream release
- Exclude ppc64le as the tests fail

* Thu Sep 15 2016 Tom Hughes <tom@compton.nu> - 2.9.0-1
- Update to 2.9.0 upstream release
- Exclude aarch64 as the tests fail

* Thu Aug  4 2016 Tom Hughes <tom@compton.nu> - 2.8.0-1
- Update to 2.8.0 upstream release

* Sat Jun 11 2016 Tom Hughes <tom@compton.nu> - 2.7.2-1
- Update to 2.7.2 upstream release

* Wed Jun  1 2016 Tom Hughes <tom@compton.nu> - 2.7.1-1
- Update to 2.7.1 upstream release

* Mon Feb 22 2016 Tom Hughes <tom@compton.nu> - 2.6.1-1
- Update to 2.6.1 upstream release

* Fri Feb 19 2016 Tom Hughes <tom@compton.nu> - 2.6.0-3
- Add patch for newer protozero

* Thu Feb 18 2016 Peter Robinson <pbrobinson@fedoraproject.org> 2.6.0-2
- Add ruby deps

* Sat Feb  6 2016 Tom Hughes <tom@compton.nu> - 2.6.0-1
- Update to 2.6.0 upstream release

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Thu Jan 21 2016 Jonathan Wakely <jwakely@redhat.com> - 2.5.4-2
- Rebuilt for Boost 1.60

* Fri Dec  4 2015 Tom Hughes <tom@compton.nu> - 2.5.4-1
- Update to 2.5.4 upstream release

* Sun Nov 29 2015 Tom Hughes <tom@compton.nu> - 2.5.3-2
- Add patches for test failures

* Wed Nov 18 2015 Tom Hughes <tom@compton.nu> - 2.5.3-1
- Update to 2.5.3 upstream release

* Mon Nov  9 2015 Tom Hughes <tom@compton.nu> - 2.5.2-1
- Update to 2.5.2 upstream release

* Fri Sep 18 2015 Tom Hughes <tom@compton.nu> - 2.2.0-11
- Revert unathorised bundling of gdalcpp

* Fri Sep 18 2015 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 2.2.0-10
- added few backports to fix ftbfs

* Sat Jul 25 2015 Tom Hughes <tom@compton.nu> - 2.2.0-9
- Rebuild for boost 1.58.0

* Sat Jul 25 2015 Tom Hughes <tom@compton.nu> - 2.2.0-8
- Disable empty debuginfo package

* Tue Jul 21 2015 Tom Hughes <tom@compton.nu> - 2.2.0-7
- Rebuild for boost 1.58.0

* Tue Jul 21 2015 Tom Hughes <tom@compton.nu> - 2.2.0-6
- Enable data tests

* Sat Jul 18 2015 Tom Hughes <tom@compton.nu> - 2.2.0-5
- Add license to doc subpackage

* Thu Jul 16 2015 Tom Hughes <tom@compton.nu> - 2.2.0-4
- Remove bundled header

* Thu Jul 16 2015 Tom Hughes <tom@compton.nu> - 2.2.0-3
- Use %%cmake

* Wed Jul 15 2015 Tom Hughes <tom@compton.nu> - 2.2.0-2
- Make devel subpackage an arched package
- Move documentation to doc subpackage

* Sun Jul 12 2015 Tom Hughes <tom@compton.nu> - 2.2.0-1
- Update to 2.2.0 upstream release

* Mon Jun  8 2015 Tom Hughes <tom@compton.nu> - 2.1.0-1
- Initial build