This repository has been archived on 2019-08-07. You can view files and clone it, but cannot push or open issues or pull requests.
copr-dani-qgis/qgis.spec

353 lines
12 KiB
RPMSpec
Raw Normal View History

2012-02-26 11:50:43 +01:00
#TODO: Run test suite (see debian/rules)
2010-07-12 01:32:19 +02:00
Name: qgis
2017-09-28 12:39:04 +02:00
Version: 2.99
2017-07-25 09:59:10 +02:00
Release: 1%{?dist}
2010-07-12 01:32:19 +02:00
Summary: A user friendly Open Source Geographic Information System
Group: Applications/Engineering
2010-07-12 01:32:19 +02:00
License: GPLv3+ with exceptions
URL: http://www.qgis.org
Source0: http://qgis.org/downloads/%{name}-%{version}.tar.bz2
2010-07-12 01:32:19 +02:00
# Sample configuration files for QGIS server
Source2: %{name}-server-httpd.conf
Source4: %{name}-server-README.fedora
# MIME definitions
# Based on debian/qgis.xml but excluding already defined or proprietary types
Source5: %{name}-mime.xml
2017-09-30 18:36:15 +02:00
# Fix builds on 64-bit machines
# https://hub.qgis.org/issues/15602
# https://github.com/qgis/QGIS/commit/718581ffb12b723f9a3c0ae01b7ec2d8aed9d4bb.patch
Patch0: %{name}-lib64.patch
# Some plug-ins need Pyspatialite (bundled)
# The license is not totally clear, see:
# http://code.google.com/p/pyspatialite/issues/detail?id=3
# It also is sort of a fork of pysqlite, which is not elegant.
2017-09-28 12:39:04 +02:00
# Compling stuff
BuildRequires: bison
BuildRequires: clang
BuildRequires: cmake
BuildRequires: expat-devel
BuildRequires: flex
BuildRequires: desktop-file-utils
# Geo stuff
BuildRequires: gdal-devel
BuildRequires: gdal-python3
BuildRequires: geos-devel
BuildRequires: gsl-devel
BuildRequires: libspatialite-devel
BuildRequires: proj-devel
BuildRequires: spatialindex-devel
2017-10-01 16:44:41 +02:00
BuildRequires: grass-devel
2017-09-28 12:39:04 +02:00
# Other stuff
BuildRequires: gsl-devel
BuildRequires: libzip-devel
BuildRequires: postgresql-devel
BuildRequires: sqlite-devel
BuildRequires: fcgi-devel
# Python stuff
BuildRequires: python3-future
BuildRequires: python3-jinja2
BuildRequires: python3-OWSLib
BuildRequires: python3-psycopg2
BuildRequires: python3-pygments
BuildRequires: python3-PyYAML
BuildRequires: python3-qscintilla-devel
BuildRequires: python3-qscintilla-qt5
BuildRequires: python3-qscintilla-qt5-devel
BuildRequires: python3-qt5-devel
BuildRequires: sip-devel
# Qca stuff
BuildRequires: qca-qt5-devel
BuildRequires: qca-qt5-ossl
BuildRequires: qscintilla-qt5-devel
# Qt5 stuff
BuildRequires: qt5-qtlocation-devel
BuildRequires: qt5-qtscript-devel
BuildRequires: qt5-qtsvg-devel
BuildRequires: qt5-qttools-static
BuildRequires: qt5-qtwebkit-devel
BuildRequires: qt5-qtxmlpatterns-devel
BuildRequires: qtkeychain-qt5-devel
2017-09-30 18:05:48 +02:00
BuildRequires: qextserialport-devel
2017-09-28 12:39:04 +02:00
# Qwt stuff
BuildRequires: qwt-devel
BuildRequires: qwt-qt5-devel
BuildRequires: qwt-qt5-devel
2010-07-12 01:32:19 +02:00
Requires: gpsbabel
2010-07-12 01:32:19 +02:00
# We don't want to provide private Python extension libs
2017-10-01 17:28:32 +02:00
%global __provides_exclude_from ^(%{python3_sitearch}|%{_libdir}/%{name}/plugins)/.*\.so(\.%{version})?$
2010-11-11 16:18:04 +01:00
2007-07-03 17:21:11 +02:00
%description
Geographic Information System (GIS) manages, analyzes, and displays
2014-07-04 10:23:23 +02:00
databases of geographic information. QGIS supports shape file
viewing and editing, spatial data storage with PostgreSQL/PostGIS, projection
on-the-fly, map composition, and a number of other features via a plugin
interface. QGIS also supports display of various geo-referenced raster and
Digital Elevation Model (DEM) formats including GeoTIFF, Arc/Info ASCII Grid,
and USGS ASCII DEM.
%package devel
2014-07-04 10:23:23 +02:00
Summary: Development Libraries for the QGIS
2010-07-12 01:32:19 +02:00
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
2014-07-04 10:23:23 +02:00
Development packages for QGIS including the C header files.
2007-07-03 17:21:11 +02:00
%package grass
2014-07-04 10:23:23 +02:00
Summary: GRASS Support Libraries for QGIS
2010-07-12 01:32:19 +02:00
Group: Applications/Engineering
Requires: %{name}%{?_isa} = %{version}-%{release}
# The plug-in requires more than just the grass-libs.
2016-06-06 16:38:07 +02:00
# This questions the sense of the libs package.
# WARNING: Rebuild QGIS whenever a new version of GRASS is shipped! Even though
# the soname might stay the same, it won't work anymore.
#http://hub.qgis.org/issues/5274
Requires: grass%{?_isa} = %{grass_version}
2007-07-03 17:21:11 +02:00
%description grass
2014-07-04 10:23:23 +02:00
GRASS plugin for QGIS required to interface with the GRASS system.
2017-09-28 12:39:04 +02:00
%package -n python3-qgis
%{?python_provide:%python_provide python3-qgis}
# Remove before F30
Provides: %{name}-python = %{version}-%{release}
Provides: %{name}-python%{?_isa} = %{version}-%{release}
Obsoletes: %{name}-python < %{version}-%{release}
2014-07-04 10:23:23 +02:00
Summary: Python integration and plug-ins for QGIS
2010-07-12 01:32:19 +02:00
Group: Applications/Engineering
Requires: %{name}%{?_isa} = %{version}-%{release}
2017-09-30 14:59:15 +02:00
Requires: gdal-python3
Requires: python3-future
Requires: python3-jinja2
Requires: python3-OWSLib
Requires: python3-psycopg2
Requires: python3-pygments
Requires: python3-PyYAML
Requires: python3-qscintilla
Requires: python3-qscintilla-qt5
Requires: python3-qt5
2010-07-16 18:22:59 +02:00
%{?_sip_api:Requires: sip-api(%{_sip_api_major}) >= %{_sip_api}}
2017-09-28 12:39:04 +02:00
%description -n python3-qgis
2014-07-04 10:23:23 +02:00
Python integration and plug-ins for QGIS.
%package server
Summary: FCGI-based OGC web map server
Group: Applications/Engineering
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: mod_fcgid
Provides: mapserver = %{version}-%{release}
Obsoletes: mapserver < 2.8.1-1
%description server
This FastCGI OGC web map server implements OGC WMS 1.3.0 and 1.1.1.
The services are prepared as regular projects in QGIS. They're rendered using
the QGIS libraries. The server also supports SLD (Styled Layer Descriptor)
for styling. Sample configurations for Httpd and Lighttpd are included.
Please refer to %{name}-server-README.fedora for details!
2007-07-03 17:21:11 +02:00
%prep
2010-11-11 16:18:04 +01:00
%setup -q
2017-09-30 18:36:15 +02:00
%patch0 -p0 -b .lib64
# Remove executable permissions from source code files
find . \( -name "*.cpp" -o -name "*.h" \) -type f -perm /111 -execdir chmod -x {} \+
2010-07-12 01:32:19 +02:00
# Readme file for QGIS server configuration and Lighttpd example
install -pm0644 %{SOURCE4} .
2010-07-12 01:32:19 +02:00
# Delete bundled libs
2017-10-01 14:04:12 +02:00
# Using external QEXTSERIALPORT causes segfaults
# rm -rf src/core/gps/qextserialport/
gzip ChangeLog
2013-09-24 00:48:15 +02:00
2009-12-24 04:29:48 +01:00
2012-06-30 13:42:14 +02:00
%build
2010-07-12 01:32:19 +02:00
%cmake \
2010-11-11 16:18:04 +01:00
%{_cmake_skip_rpath} \
2010-07-12 01:32:19 +02:00
-D QGIS_LIB_SUBDIR=%{_lib} \
-D QGIS_MANUAL_SUBDIR=/share/man \
-D QGIS_CGIBIN_SUBDIR=%{_libexecdir}/%{name} \
2010-07-12 01:32:19 +02:00
-D WITH_BINDINGS:BOOL=TRUE \
-D WITH_GRASS7:BOOL=TRUE \
2017-10-01 16:44:41 +02:00
-D GRASS_PREFIX7=%{_libdir}/grass72 \
2014-07-04 10:23:23 +02:00
-D WITH_CUSTOM_WIDGETS:BOOL=TRUE \
2010-07-12 01:32:19 +02:00
-D BINDINGS_GLOBAL_INSTALL:BOOL=TRUE \
-D ENABLE_TESTS:BOOL=FALSE \
2017-09-30 15:23:08 +02:00
-D WITH_QSPATIALITE:BOOL=TRUE \
2017-09-30 17:52:19 +02:00
-D WITH_SERVER:BOOL=TRUE \
2010-07-12 01:32:19 +02:00
.
2012-06-30 13:42:14 +02:00
2017-10-01 14:08:11 +02:00
# Using external QEXTSERIALPORT causes segfaults
# -D WITH_INTERNAL_QEXTSERIALPORT:BOOL=FALSE \
# -D QEXTSERIALPORT_INCLUDE_DIR:STRING=%{_includedir}/QtExtSerialPort \
2017-09-28 12:39:04 +02:00
make %{?_smp_mflags}
2007-07-03 17:21:11 +02:00
%install
2012-06-30 13:42:14 +02:00
# Necessary for the test suite
#export LD_LIBRARY_PATH=%{_builddir}%{name}-%{version}/output/%{_lib}
2009-12-24 04:29:48 +01:00
make install DESTDIR=%{buildroot}
# Install desktop file without connecting proprietary file types
2013-02-23 08:33:56 +01:00
desktop-file-install \
--vendor="fedora" \
2013-10-19 21:26:17 +02:00
--remove-mime-type="application/x-raster-ecw" \
--remove-mime-type="application/x-raster-mrsid" \
--dir=%{buildroot}%{_datadir}/applications \
debian/qgis.desktop
# Install MIME type definitions
install -d %{buildroot}%{_datadir}/mime/packages
install -pm0644 %{SOURCE5} \
%{buildroot}%{_datadir}/mime/packages/%{name}.xml
# Install application and MIME icons
for size in 8x8 16x16 22x22 24x24 32x32 36x36 42x42 48x48 64x64 72x72 80x80 96x96 128x128 192x192 256x256 512x512; do
install -pd %{buildroot}%{_datadir}/icons/hicolor/$size/apps
2017-10-01 14:05:07 +02:00
install -pm0644 debian/icons/%{name}-icon$size.png %{buildroot}%{_datadir}/icons/hicolor/$size/apps/qgis.png
done
for size in 8x8 16x16 22x22 24x24 32x32 36x36 42x42 48x48 64x64 72x72 80x80 96x96 128x128; do
install -pd %{buildroot}%{_datadir}/icons/hicolor/$size/mimetypes
2017-10-01 14:05:07 +02:00
install -pm0644 debian/icons/qgis-mime-icon$size.png %{buildroot}%{_datadir}/icons/hicolor/$size/mimetypes/qgis-mime.png
done
2010-07-12 01:32:19 +02:00
install -pd %{buildroot}%{_datadir}/pixmaps
install -pd %{buildroot}%{_datadir}/icons/hicolor/scalable/apps
2017-10-01 14:21:16 +02:00
install -pm0644 images/icons/%{name}-icon-512x512.png %{buildroot}%{_datadir}/pixmaps/%{name}.png
install -pm0644 images/icons/%{name}_icon.svg %{buildroot}%{_datadir}/pixmaps/%{name}.svg
2017-10-01 14:05:07 +02:00
install -pm0644 images/icons/%{name}_icon.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
install -pm0644 images/icons/%{name}-mime-icon.png %{buildroot}%{_datadir}/pixmaps/%{name}-mime.png
2017-10-01 14:21:16 +02:00
install -pm0644 images/icons/%{name}_mime_icon.svg %{buildroot}%{_datadir}/pixmaps/%{name}-mime.png
# Install basic QGIS Mapserver configuration for Apache
install -pd %{buildroot}%{_sysconfdir}/httpd/conf.d
install -pm0644 %{SOURCE2} \
%{buildroot}%{_sysconfdir}/httpd/conf.d/qgis-server.conf
# See qgis-server-README.fedora
rm -f %{buildroot}%{_libexecdir}/%{name}/wms_metadata.xml
rm -f %{buildroot}%{_libexecdir}/%{name}/admin.sld
# Remove install instructions
2017-10-01 14:05:07 +02:00
rm -f %{buildroot}%{_datadir}/%{name}/doc/INSTALL*
%find_lang %{name} --with-qt
2007-07-03 17:21:11 +02:00
2012-06-30 13:42:14 +02:00
%post
/sbin/ldconfig
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
2014-08-12 18:40:50 +02:00
touch --no-create %{_datadir}/mime/packages &> /dev/null || :
2007-07-03 17:21:11 +02:00
%postun
/sbin/ldconfig
if [ $1 -eq 0 ] ; then
touch --no-create %{_datadir}/icons/hicolor &>/dev/null
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
2014-08-12 18:40:50 +02:00
touch --no-create %{_datadir}/mime/packages &> /dev/null || :
update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
fi
%posttrans
gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
2014-08-12 18:40:50 +02:00
update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :
2007-07-03 17:21:11 +02:00
%post grass -p /sbin/ldconfig
%postun grass -p /sbin/ldconfig
2017-09-28 12:39:04 +02:00
%post -n python3-qgis -p /sbin/ldconfig
2017-09-28 12:39:04 +02:00
%postun -n python3-qgis -p /sbin/ldconfig
2010-07-12 01:32:19 +02:00
%files -f %{name}.lang
%doc BUGS NEWS Exception_to_GPL_for_Qt.txt ChangeLog.gz
# QGIS shows the following files in the GUI, including the license text
%doc %{_datadir}/%{name}/doc/
%dir %{_datadir}/%{name}/i18n/
%lang(zh-Hans) %{_datadir}/%{name}/i18n/%{name}_zh-Hans.qm
%lang(zh-Hant) %{_datadir}/%{name}/i18n/%{name}_zh-Hant.qm
2017-10-01 18:06:48 +02:00
%{_libdir}/lib%{name}_native.so.*
2015-10-24 14:13:30 +02:00
%{_libdir}/lib%{name}_app.so.*
2012-06-30 13:42:14 +02:00
%{_libdir}/lib%{name}_analysis.so.*
%{_libdir}/lib%{name}_core.so.*
%{_libdir}/lib%{name}_gui.so.*
%{_libdir}/%{name}/
2017-09-30 15:09:35 +02:00
%{_qt5_prefix}/plugins/sqldrivers/libqsqlspatialite.so
%{_bindir}/%{name}
2013-09-24 00:48:15 +02:00
%{_mandir}/man1/%{name}.1*
2010-07-12 01:32:19 +02:00
%dir %{_datadir}/%{name}/
%{_datadir}/mime/packages/qgis.xml
%{_datadir}/pixmaps/
%{_datadir}/icons/hicolor/*/apps/*
%{_datadir}/icons/hicolor/*/mimetypes/*
2013-02-23 08:33:56 +01:00
%{_datadir}/applications/*%{name}.desktop
2017-10-01 18:06:48 +02:00
%{_datadir}/%{name}/qgis_global_settings.ini
%{_datadir}/%{name}/images/
%{_datadir}/%{name}/resources/
%{_datadir}/%{name}/svg/
2015-07-08 08:23:16 +02:00
%exclude %{_libdir}/libqgisgrass*.so.*
%exclude %{_libdir}/%{name}/plugins/libgrassprovider*.so
%exclude %{_libdir}/%{name}/plugins/libgrassrasterprovider*.so
%exclude %{_libdir}/%{name}/plugins/libgrassplugin*.so
2017-10-01 17:07:26 +02:00
%exclude %{_libdir}/%{name}/grass/
2007-07-03 17:21:11 +02:00
%files devel
%{_datadir}/%{name}/FindQGIS.cmake
%{_includedir}/%{name}/
%{_libdir}/lib%{name}*.so
2017-09-30 15:09:35 +02:00
%{?_qt5_plugindir}/designer/libqgis_customwidgets.so*
2007-07-03 17:21:11 +02:00
%files grass
2015-07-08 08:23:16 +02:00
%{_libdir}/lib%{name}grass*.so.*
%{_libdir}/%{name}/plugins/libgrassprovider*.so
%{_libdir}/%{name}/plugins/libgrassrasterprovider*.so
%{_libdir}/%{name}/plugins/libgrassplugin*.so
2017-10-01 17:07:26 +02:00
%{_libdir}/%{name}/grass/
%{_datadir}/%{name}/grass/
2007-07-03 17:21:11 +02:00
2017-09-28 12:39:04 +02:00
%files -n python3-qgis
2012-06-30 13:42:14 +02:00
%{_libdir}/libqgispython.so.*
2014-07-04 10:23:23 +02:00
%{_datadir}/%{name}/python/
2017-10-01 17:28:32 +02:00
%{python3_sitearch}/%{name}/
%{python3_sitearch}/PyQt5/uic/widget-plugins/
%exclude %{python3_sitearch}/%{name}/server/
%exclude %{python3_sitearch}/%{name}/_server.so
%files server
%doc src/server/admin.sld src/server/wms_metadata.xml %{name}-server-README.fedora
%config(noreplace) %{_sysconfdir}/httpd/conf.d/%{name}-server.conf
%{_libdir}/lib%{name}_server.so.*
%{_libexecdir}/%{name}/
2017-10-01 17:28:32 +02:00
%{python3_sitearch}/%{name}/server/
%{python3_sitearch}/%{name}/_server.so
%changelog
2017-09-28 12:39:04 +02:00
* Thu Sep 28 2017 Daniele Viganò <daniele@vigano.me> - 2.99-1
- Unstable build