[ELGIS] Success building QGIS on SL 6.0
Micha Silver
micha at arava.co.il
Sat May 21 15:00:24 EDT 2011
I made a stab at building an rpm for QGIS 1.7 on SL 6, 64 today, and it
worked!
I based the build on the src rpm for QGIS 1.6 from the elgis repo. Looks
like all the hard work Mathieu did working out that package is going to
pay off in the long run... And I downloaded the current qgis-1.7.0
source tree (from svn - no tarball available yet) and made a tar.gz from
the whole tree.
Here's what I needed to do:
Dependencies:
--------------------
From the regular EPEL repo I got:
May 20 22:09:40 Installed: cmake-2.6.4-5.el6.x86_64
May 20 22:11:19 Installed: qwt-5.1.1-4.1.el6.x86_64
May 20 22:11:20 Installed: qwt-devel-5.1.1-4.1.el6.x86_64
May 20 22:11:20 Installed: gsl-1.13-1.el6.x86_64
May 20 22:11:21 Installed: PyQwt-5.2.0-11.el6.x86_64
May 20 22:11:22 Installed: fcgi-2.4.0-10.el6.x86_64
May 20 22:11:23 Installed: fcgi-devel-2.4.0-10.el6.x86_64
May 20 22:11:24 Installed: PyQwt-devel-5.2.0-11.el6.x86_64
May 20 22:11:25 Installed: gsl-devel-1.13-1.el6.x86_64
Then I added qtwebkit and qtwebkit-devel from atrpms. And finally,
gpsbabel is also a BuildRequires for QGIS. This I downloaded from
Fedora's koji system. The F12 package (Not the most recent...) version
1.3.6 installed fine.
Patches:
-----------
I found that one patch, the qgis-sip.patch is already applied in the
source, so I just removed those Patch lines from the spec file.
Changes to source:
--------------------------
The current source has the qgis-mapserver plugin disabled in the cmake
parameters. But the spec file expects it to be built. Not having those
files causes rpmbuild to fail at the checking stage.
So I made a change to the source file /qgis-1.7.0/CMakeLists.txt, on
line 58. I changed WITH_MAPSERVER FALSE to WITH_MAPSERVER TRUE.
Changes to SPEC:
------------------------
After the build got to the end, I got a list of files that rpmbuild
found were "built but not installed". So I added a few more changes to
the %Files section. This included pyspatialite, some libqgis* which were
missed because they did not have an underscore in the filename, and some
others. Attached is a full diff between the original (1.6.0) spec and
the one that worked for me against 1.7.0:
After that rpmbuild ran thru cleanly, the rpms installed, and I now have
QGIS 1.7 running on SL 6.0.
Best regards,
--
Micha Silver
GIS Consultant, Arava Development Co.
http://www.surfaces.co.il
-------------- next part --------------
--- qgis.spec 2011-03-17 20:49:59.000000000 +0200
+++ qgis17.spec 2011-05-21 18:44:34.328149938 +0300
@@ -3,7 +3,7 @@
%endif
Name: qgis
-Version: 1.6.0
+Version: 1.7.0
Release: 3%{?dist}.1
Summary: A user friendly Open Source Geographic Information System
@@ -18,7 +18,7 @@
# Proposed changes for next version: https://trac.osgeo.org/qgis/ticket/2863
Patch0: qgis-1.5.0-grass.patch
# Fix problem with SIP 4.12, see https://trac.osgeo.org/qgis/changeset/14988
-Patch1: qgis-1.6.0-sip.patch
+#Patch1: qgis-1.7.0-sip.patch
BuildRequires: cmake
BuildRequires: flex bison
@@ -97,7 +97,7 @@
%setup -q
%patch0 -p1 -b .grass
-%patch1 -p1 -b .sip
+#%patch1 -p1 -b .sip
# Encode man-file to utf-8
iconv -f iso8859-1 -t utf-8 qgis_help.1 > qgis_help.1.conv && mv qgis_help.1.conv qgis_help.1
@@ -175,7 +175,7 @@
%doc BUGS COPYING ChangeLog README CODING PROVENANCE Exception_to_GPL_for_Qt.txt
# Can be viewed in the About-Box:
# CONTRIBUTORS AUTHORS
-%{_libdir}/lib%{name}_*.so.*
+%{_libdir}/lib%{name}*.so*
%{_libdir}/%{name}/
%{_bindir}/qgis*
%{_var}/www/cgi-bin/admin.sld
@@ -186,6 +186,7 @@
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/fedora-%{name}.desktop
%dir %{_datadir}/%{name}/i18n/
+%{_datadir}/%{name}/i18n/%{name}*
%{_datadir}/%{name}/doc
%{_datadir}/%{name}/images
%{_datadir}/%{name}/resources
@@ -198,6 +199,7 @@
%exclude %{_datadir}/%{name}/themes/default/grass
%exclude %{_datadir}/%{name}/themes/gis/grass
%exclude %{_datadir}/%{name}/themes/classic/grass
+%exclude %{_datadir}/%{name}/*.cmake
%exclude %{_libdir}/%{name}/grass
%files devel
@@ -224,6 +226,7 @@
%{_libdir}/lib%{name}python.so.*
%{_datadir}/%{name}/python
%{python_sitearch}/%{name}
+%{python_sitearch}/pyspatialite
%changelog
* Thu Mar 17 2011 Rex Dieter <rdieter at fedoraproject.org> - 1.6.0-3.1
More information about the el
mailing list