SHA256
1
0
forked from pool/qgis
qgis/qgis.spec

230 lines
6.5 KiB
RPMSpec

#
# spec file for package qgis
#
# Copyright (c) 2015 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.8.2
Release: 0
Summary: 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
Source3: qgis_sample_data.zip
BuildRequires: sqlite-devel >= 3.5
BuildRequires: fdupes
BuildRequires: python-wxWidgets
BuildRequires: -post-build-checks
BuildRequires: FastCGI-devel
BuildRequires: bison
BuildRequires: cmake >= 2.4
BuildRequires: flex
BuildRequires: gdal
BuildRequires: grass7
BuildRequires: grass7-devel
BuildRequires: gsl >= 1.6
BuildRequires: gsl-devel
BuildRequires: libexpat-devel
BuildRequires: libspatialindex-devel
BuildRequires: libspatialite-devel
BuildRequires: libspatialindex0
BuildRequires: libqscintilla-devel
BuildRequires: libspatialite-devel
BuildRequires: libwx_gtk2u_qa-2_8-0-stl
BuildRequires: python-devel
BuildRequires: python-qt4-devel
BuildRequires: python-sip-devel
BuildRequires: libQtWebKit-devel
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: qwt-devel >= 5
BuildRequires: txt2tags
BuildRequires: unzip
BuildRequires: update-desktop-files
Requires: python-matplotlib
Requires: python-qscintilla
Requires: python-qscintilla-sip
Requires: python-psycopg2
Requires: python-gdal
Requires: python-qt4
Requires: python-qt4-utils
Requires: python-qt4-devel
Requires: python-sip
Requires: python-xml
Requires: python-wxWidgets
Requires: grass7-docs
Recommends: apache2-mod_fcgid
Recommends: gpsbabel
Suggests: %{name}-sample-data
Obsoletes: qgis2 qgis-master
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%package devel
Summary: Development Libraries for the QGIS 2.8
Group: Development/Libraries/C and C++
Requires: qgis = %{version}
%package plugin-grass7
Summary: GRASS Support Libraries for QGIS 2.8
Group: Productivity/Graphics/Visualization/Other
Requires: grass7
Obsoletes: qgis-plugin-grass
Requires: qgis = %{version}
%package sample-data
Summary: QGIS sample data
Group: Productivity/Graphics/Visualization/Other
%define builddir build
%define sampledir sample-data
%description
QGIS is a user friendly Open Source Geographic Information System (GIS)
that runs on Linux, Unix, Mac OSX, and Windows. QGIS supports vector,
raster, OWS 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 QGIS 2.8 including the C header files.
%description plugin-grass7
GRASS 7 plugin for QGIS 2.8 required to interface with GRASS system.
%description sample-data
QGIS sample data with free raster, vector, gps files and a GRASS location from Alaska area.
%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
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_QSPATIALITE=TRUE \
-D WITH_PYSPATIALITE=TRUE \
-D WITH_SERVER=TRUE \
-D WITH_SERVER_PLUGINS=TRUE \
-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 \
../%{name}-%{version}/
#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 ../qgis/images/icons/qgis-icon.png %{buildroot}/%{_datadir}/pixmaps/qgis.png
# Do not update .desktop files
%suse_update_desktop_file -n %{name}
# Install sample data
pushd %{buildroot}%{_datadir}/qgis
unzip %{SOURCE3}
mv qgis_sample_data %{sampledir}
find %{sampledir} -depth \( -name .tmp -o -name .bash\* -o -name \*~ \) -exec rm -r {} \;
popd
%fdupes -s %{buildroot}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/libqgispython.s*
#%{_libdir}/libqgis_*s*
%{_libdir}/libqgis*s*
%{_libdir}/qgis/
%{_libdir}/qt4/plugins/sqldrivers/libqsqlspatialite.so
%{_mandir}/man1/*
%{_datadir}/qgis/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/qgis.png
%{_prefix}/lib/qgis/qgis_help
%{_prefix}/lib/qgis/crssync
%exclude %{_prefix}/lib/debug/
%exclude %{_libdir}/libqgisgrass.so
%exclude %{_libdir}/libqgisgrass.so.*
%exclude %{_libdir}/qgis/libgrass*
#%doc BUGS COPYING README
%files devel
%defattr(-,root,root)
%{_prefix}/include/qgis/*
%files plugin-grass7
%defattr(644,root,root)
%{_libdir}/qgis/libgrass*
#%{_libdir}/libqgisgrass.so
#%{_libdir}/libqgisgrass.so.*
%defattr(755,root,root)
#%{_prefix}/lib/qgis/grass/bin/qgis.g.browser
%{_prefix}/lib/qgis/grass/modules/qgis.*
%files sample-data
%defattr(644,root,root)
%{_datadir}/qgis/%{sampledir}
%post plugin-grass7 -p /sbin/ldconfig
%postun plugin-grass7 -p /sbin/ldconfig
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%changelog