%define patch_suffix .orig Name: pgRouting Version: 1.03 Release: 3%{?dist} Summary: Provides routing functionality to PostGIS/PostgreSQL Group: Applications/Databases # shooting_star* are under the latter license License: GPLv2+ and Boost URL: http://pgrouting.postlbs.org/ Source0: http://files.postlbs.org/pgrouting/source/%{name}-%{version}.tgz # Patch to build against postgresql 8.4 Patch0: pgRouting-103-pg84.patch # Removes the preset CFLAGS Patch1: pgRouting-103-preset-CFLAGS.patch BuildRequires: cmake BuildRequires: postgresql-devel, proj-devel, geos-devel BuildRequires: boost-devel >= 1.33 Requires: postgis >= 1.3 Requires: postgresql >= 8.1 %description The main objective is to provide routing functionality to PostGIS/ PostgreSQL. pgRouting is part of PostLBS, which provides core tools for Location Based Services (LBS) as Open Source Software (OSS). Its tools are similar to those found on proprietary software. %prep %setup -q -n pgrouting %patch0 -p0 -b %{patch_suffix} %patch1 -p0 -b %{patch_suffix} # fixing boost property_map files path sed -i "s|boost/vector_property_map.hpp|boost/property_map/vector_property_map.hpp|" core/src/shooting_star_boost_wrapper.cpp sed -i "s|boost/property_map.hpp|boost/property_map/property_map.hpp|" core/src/shooting_star_relax.hpp sed -i "s|boost/property_map.hpp|boost/property_map/property_map.hpp|" core/src/edge_visitors.hpp # fix to avoid depricated "boost/graph/detail/is_same.hpp" file sed -i "s|boost/graph/detail/is_same.hpp|boost/type_traits/is_same.hpp|" core/src/edge_visitors.hpp # fixing CMakeList issue cd cmake; ln -s CMakeList.txt CMakeLists.txt; cd - %build install -d build cd build %cmake .. \ -DWITH_TSP=OFF \ -DWITH_DD=OFF %{__make} VERBOSE=1 %{?_smp_mflags} %install rm -rf %{buildroot} %{__make} -C build install DESTDIR=%{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(644,root,root,755) %doc README.routing COPYING authors.txt BOOST_LICENSE_1_0.txt RELEASE_NOTES %attr(755,root,root) %{_libdir}/pgsql/*.so %{_datadir}/postlbs %changelog * Sun Nov 14 2010 Viji Nair - 1.03-3 - Fixed patch naming conventions. - Added backup option for files being patched with suffix. - Changed the package name from postgresql-pgrouting to pgRouting * Sun Nov 14 2010 Viji Nair - 1.03-2 - Changed the license to GPLv2+ and Boost. - Removed the override of CMAKE_INSTALL_PREFIX. - Removed test for %%{?_lib}. - Added VERBOSE=1 and %%{?_smp_mflags} for make. - Patch for removing the preset CFLAGS. - Removed gcc-c++ from BuildRequires. * Thu Nov 11 2010 Viji Nair - 1.03-1 - Initial import.