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