Otto Dassau 2013-06-11 13:16:09 +00:00 committed by Git OBS Bridge
parent 9306efd05c
commit 65672369db

206
qgis.spec
View File

@ -1,206 +0,0 @@
#
# spec file for package qgis
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: qgis
Version: 2.0.0
Release: 0
Summary: Quantum GIS (QGIS) is a Geographic Information System (GIS)
License: GPL-2.0
Group: Productivity/Graphics/Visualization/Other
Url: http://www.qgis.org/
Source: %{name}-%{version}.tar.bz2
Source1: %{name}.desktop
Source2: %{name}.rpmlintrc
Requires: gdal
Requires: libgdal1 >= 1.9.0
Requires: libgeos >= 2
%if 0%{?suse_version} > 1030
BuildRequires: sqlite-devel >= 3.5
Requires: sqlite >= 3.5
%endif
BuildRequires: fdupes
BuildRequires: libexpat-devel
BuildRequires: libspatialindex-devel
BuildRequires: libspatialindex0
BuildRequires: python-devel
BuildRequires: qwt-devel >= 5
Requires: python-gdal
Requires: python-qt4
Requires: python-sip
Requires: python-xml
%if 0%{?suse_version} <= 1030 || 0%{?sles_version} == 11 || 0%{?suse_version} >= 1120
BuildRequires: python-qt4-devel
BuildRequires: python-sip-devel
%else
BuildRequires: python-qt4
BuildRequires: python-sip
%endif
BuildRequires: -post-build-checks
BuildRequires: FastCGI-devel
BuildRequires: bison
BuildRequires: cmake >= 2.4
BuildRequires: flex
BuildRequires: gdal
BuildRequires: grass
BuildRequires: grass-devel
BuildRequires: gsl >= 1.6
BuildRequires: gsl-devel
BuildRequires: libQtWebKit-devel >= 4.3
BuildRequires: libgdal-devel >= 1.6.0
BuildRequires: libgeos-devel >= 2
BuildRequires: libproj-devel
BuildRequires: libqt4-devel >= 4.3
BuildRequires: libqt4-qt3support >= 4.3
BuildRequires: postgresql-devel >= 8
BuildRequires: txt2tags
BuildRequires: update-desktop-files
Obsoletes: qgis10
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package devel
Summary: Development Libraries for the Quantum GIS development branch 1
Group: Development/Libraries/C and C++
Requires: qgis = %{version}
%package plugin-grass
Summary: GRASS Support Libraries for Quantum GIS development branch 1
Group: Productivity/Graphics/Visualization/Other
Requires: grass
Requires: qgis = %{version}
%description
Quantum GIS (QGIS) is a user friendly Open Source Geographic Information
System (GIS) that runs on Linux, Unix, Mac OSX, and Windows. QGIS supports
vector, raster, and database formats. QGIS is licensed under the GNU
General Public License. QGIS lets you browse and create map data on your
computer. It supports many common spatial data formats (e.g. ESRI ShapeFile,
geotiff). QGIS supports plugins to do things like display tracks from your GPS.
%description devel
Development packages for Quantum GIS development branch 1.x including the C header files.
%description plugin-grass
GRASS plugin for Quantum GIS development branch 1.x required to interface with GRASS system.
%prep
%setup -q
%build
export CFLAGS="%{optflags}"
export QTDIR=/usr
export PATH=$PATH:$QTDIR/bin
%ifarch x86_64
%define lib lib64
%else
%define lib lib
%endif
cd ..
mkdir temp
cd temp
# could we strip now the build for <1030?
cmake -Wno-dev %{intsq} \
-D CMAKE_INSTALL_PREFIX=%{_prefix} \
-D CMAKE_BUILD_TYPE="Release" \
-D GRASS_PREFIX=/opt/grass\
-D QGIS_LIB_SUBDIR=%{lib} \
-D WITH_BINDINGS=TRUE \
-D WITH_SPATIALITE=TRUE \
-D WITH_MAPSERVER=ON \
-D POSTGRES_LIBRARY=%{_libdir}/libpq.so \
-D QGIS_PLUGIN_SUBDIR=%{lib}/qgis \
-D QGIS_MANUAL_SUBDIR=share/man \
-D QWT_INCLUDE_DIR=/usr/include/qwt5 \
-D CMAKE_SKIP_RPATH=OFF \
%if 0%{?suse_version} <= 1030
-D WITH_INTERNAL_SQLITE3=TRUE \
-D SQLITE3_INCLUDE_DIR=%{buildroot}/src/core/sqlite3 \
%endif
../%{name}-%{version}/
# add path to find libgdal.so
#find ./ -iname build.make -exec sed -i 's#/libgdal.so#/usr/%%{lib}/libgdal.so#' {} \;
#echo "for 'make' run first:"
export QTDIR=%{_prefix}
#echo "export PATH=$PATH:$QTDIR/bin"
export PATH=$PATH:$QTDIR/bin
#use multi-core & let that optionnal if jobs is specified as meta
make %{?jobs:-j%{jobs}}
%install
cd ../temp
%makeinstall
mkdir -p %{buildroot}%{_datadir}/applications
cp %{SOURCE1} %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/pixmaps
ln -s ../%{name}/images/icons/qgis-icon.png \
%{buildroot}/%{_datadir}/pixmaps/%{name}.png
# Do not update .desktop files
%suse_update_desktop_file -n %{name}
%fdupes -s %{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/lib%{name}python.s*
%{_libdir}/lib%{name}_*s*
%{_libdir}/lib%{name}*s*
%{_libdir}/%{name}/
%{_mandir}/man1/*
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_prefix}/lib/qgis/qgis_help
%{_prefix}/lib/qgis/crssync
%exclude %{_libdir}/libqgisgrass.so
%exclude %{_libdir}/libqgisgrass.so.%{version}
%exclude %{_libdir}/qgis/libgrass*
%doc BUGS COPYING README
%files devel
%defattr(-,root,root)
%{_includedir}/qgis/*
##%%exclude %%{_prefix}/lib/debug/*
##%%exclude %%{_prefix}/lib/debug/.build-id/*
%files plugin-grass
%defattr(644,root,root)
%{_libdir}/qgis/libgrass*
%{_libdir}/libqgisgrass.so
%{_libdir}/libqgisgrass.so.%{version}
%defattr(755,root,root)
%{_prefix}/lib/qgis/grass/bin/qgis.g.browser
%{_prefix}/lib/qgis/grass/modules/qgis.*
%post plugin-grass -p /sbin/ldconfig
%postun plugin-grass -p /sbin/ldconfig
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%changelog