diff --git a/python-site-packages-dir-0.9.1.patch b/python-site-packages-dir-0.9.1.patch new file mode 100644 index 0000000..34cd955 --- /dev/null +++ b/python-site-packages-dir-0.9.1.patch @@ -0,0 +1,16 @@ +diff -ruN qgis-0.9.1-orig/python/CMakeLists.txt qgis-0.9.1/python/CMakeLists.txt +--- qgis-0.9.1-orig/python/CMakeLists.txt 2007-12-07 08:09:52.000000000 -0500 ++++ qgis-0.9.1/python/CMakeLists.txt 2008-01-29 09:21:36.000000000 -0500 +@@ -76,11 +76,7 @@ + + # python's site-packages dir: bindings will be installed here + IF (UNIX) +- SET (CMD " +-import sys +-v = sys.version_info +-print sys.exec_prefix + '/lib/python' + str(v[0]) + '.' + str(v[1]) + '/site-packages' +-") ++ SET (CMD "from distutils.sysconfig import get_python_lib; print get_python_lib(1)") + ELSE (UNIX) + SET (CMD " + import sys diff --git a/qgis.spec b/qgis.spec index 59fd2bb..0676117 100644 --- a/qgis.spec +++ b/qgis.spec @@ -1,8 +1,9 @@ %define qt4_bindir %{_libdir}/qt4/bin +%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: qgis Version: 0.9.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A user friendly Open Source Geographic Information System Group: Applications/Engineering @@ -10,6 +11,7 @@ License: GPLv2+ URL: http://qgis.org/ Source0: http://download.qgis.org/qgis/src/%{name}-%{version}.tar.gz Source1: %{name}.desktop +Patch0: python-site-packages-dir-0.9.1.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: cmake @@ -76,6 +78,7 @@ Addtional theme for qgis - nkids %prep %setup -q +%patch0 -p1 %build @@ -84,6 +87,9 @@ for dir in %{_libdir}/grass-*/ ; do done %cmake \ -D QGIS_MANUAL_SUBDIR=share/man \ + -D QGIS_LIB_SUBDIR=%{_lib} \ + -D QGIS_PLUGIN_SUBDIR=%{_lib}/qgis \ + -D BINDINGS_GLOBAL_INSTALL:BOOL=ON \ -D GRASS_PREFIX=$GRASS_PREFIX \ -D GDAL_INCLUDE_DIR=%{_includedir}/gdal \ -D GDAL_LIBRARY=%{_libdir}/libgdal.so \ @@ -175,6 +181,7 @@ desktop-file-install --vendor="fedora" \ %dir %{_datadir}/%{name}/themes %dir %{_datadir}/%{name}/themes/default %{_datadir}/%{name}/themes/default/*.png +%{python_sitearch}/%{name} %{_mandir}/man1/* #%files devel @@ -198,7 +205,12 @@ desktop-file-install --vendor="fedora" \ %changelog -* Fri Oct 05 2007 Douglas E. Warner 0.9.1-1 +* Mon Jan 28 2008 Douglas E. Warner 0.9.1-2 +- defining lib path in build +- installing python bindings globally +- adding patch to determine python site packages dir correctly + +* Mon Dec 17 2007 Douglas E. Warner 0.9.1-1 - update to 0.9.1 - removing lib64 and man instal path patches (included upstream) - enabling python integration