- Use cmake macros
- Cleanup with spec-cleaner OBS-URL: https://build.opensuse.org/package/show/Application:Geo/qgis?expand=0&rev=224
This commit is contained in:
parent
dcc120b3d9
commit
1d26bd2569
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 13 15:39:27 UTC 2017 - mpluskal@suse.com
|
||||||
|
|
||||||
|
- Use cmake macros
|
||||||
|
- Cleanup with spec-cleaner
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Dec 12 19:43:32 UTC 2017 - nrochard@gmail.com
|
Tue Dec 12 19:43:32 UTC 2017 - nrochard@gmail.com
|
||||||
|
|
||||||
|
145
qgis.spec
145
qgis.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package qgis
|
# spec file for package qgis
|
||||||
#
|
#
|
||||||
# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -22,87 +22,97 @@ Release: 0
|
|||||||
Summary: QGIS is a Geographic Information System (GIS)
|
Summary: QGIS is a Geographic Information System (GIS)
|
||||||
License: GPL-2.0
|
License: GPL-2.0
|
||||||
Group: Productivity/Graphics/Visualization/Other
|
Group: Productivity/Graphics/Visualization/Other
|
||||||
Url: https://qgis.org/
|
URL: https://qgis.org/
|
||||||
Source: https://qgis.org/downloads/%{name}-%{version}.tar.bz2
|
Source: https://qgis.org/downloads/%{name}-%{version}.tar.bz2
|
||||||
Source4: https://qgis.org/downloads/%{name}-%{version}.tar.bz2.md5
|
|
||||||
Source1: %{name}.desktop
|
Source1: %{name}.desktop
|
||||||
Source2: %{name}.rpmlintrc
|
Source2: %{name}.rpmlintrc
|
||||||
Source3: qgis_sample_data.zip
|
Source3: qgis_sample_data.zip
|
||||||
BuildRequires: sqlite-devel >= 3.5
|
Source4: https://qgis.org/downloads/%{name}-%{version}.tar.bz2.md5
|
||||||
BuildRequires: fdupes
|
|
||||||
# Fix TW dependencies
|
|
||||||
%if 0%{?suse_version} > 1325
|
|
||||||
BuildRequires: python-wxWidgets > 3.0
|
|
||||||
BuildRequires: libwx_gtk2u_qa-suse3 > 3.0
|
|
||||||
%else
|
|
||||||
BuildRequires: python-wxWidgets
|
|
||||||
BuildRequires: libwx_gtk2u_qa-2_8-0-stl
|
|
||||||
%endif
|
|
||||||
BuildRequires: -post-build-checks
|
BuildRequires: -post-build-checks
|
||||||
BuildRequires: FastCGI-devel
|
BuildRequires: FastCGI-devel
|
||||||
BuildRequires: bison >= 2.4
|
BuildRequires: bison >= 2.4
|
||||||
BuildRequires: cmake >= 2.8.6
|
BuildRequires: cmake >= 2.8.6
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: flex >= 2.5.6
|
BuildRequires: flex >= 2.5.6
|
||||||
BuildRequires: gdal >= 1.4
|
BuildRequires: gdal >= 1.4
|
||||||
BuildRequires: grass >= 7
|
BuildRequires: grass >= 7
|
||||||
BuildRequires: grass-devel
|
BuildRequires: grass-devel
|
||||||
BuildRequires: gsl >= 1.8
|
BuildRequires: gsl >= 1.8
|
||||||
BuildRequires: gsl-devel
|
BuildRequires: gsl-devel
|
||||||
BuildRequires: libexpat-devel
|
|
||||||
BuildRequires: libspatialindex-devel
|
|
||||||
BuildRequires: libspatialite-devel
|
|
||||||
BuildRequires: libspatialindex4
|
|
||||||
BuildRequires: libqscintilla-devel
|
|
||||||
BuildRequires: libspatialite-devel
|
|
||||||
BuildRequires: python-devel >= 2.7
|
|
||||||
BuildRequires: python-qt4-devel
|
|
||||||
BuildRequires: python-sip-devel
|
|
||||||
BuildRequires: libQtWebKit-devel
|
BuildRequires: libQtWebKit-devel
|
||||||
|
BuildRequires: libexpat-devel
|
||||||
BuildRequires: libgdal-devel >= 1.4.0
|
BuildRequires: libgdal-devel >= 1.4.0
|
||||||
BuildRequires: libgeos-devel >= 3.4
|
BuildRequires: libgeos-devel >= 3.4
|
||||||
BuildRequires: libproj-devel
|
BuildRequires: libproj-devel
|
||||||
BuildRequires: libqca2-devel
|
BuildRequires: libqca2-devel
|
||||||
|
BuildRequires: libqjson-devel
|
||||||
|
BuildRequires: libqscintilla-devel
|
||||||
BuildRequires: libqt4-devel >= 4.8
|
BuildRequires: libqt4-devel >= 4.8
|
||||||
BuildRequires: libqt4-qt3support >= 4.8
|
BuildRequires: libqt4-qt3support >= 4.8
|
||||||
|
BuildRequires: libspatialindex-devel
|
||||||
|
BuildRequires: libspatialindex4
|
||||||
|
BuildRequires: libspatialite-devel
|
||||||
BuildRequires: postgresql-devel >= 8
|
BuildRequires: postgresql-devel >= 8
|
||||||
|
BuildRequires: python-devel >= 2.7
|
||||||
|
%if 0%{?suse_version} > 1325
|
||||||
|
BuildRequires: python-qscintilla-qt4
|
||||||
|
BuildRequires: python-qscintilla-qt4-sip
|
||||||
|
BuildRequires: libqscintilla_qt4-devel
|
||||||
|
%endif
|
||||||
|
BuildRequires: python-qt4-devel
|
||||||
|
BuildRequires: python-sip-devel
|
||||||
BuildRequires: qwt-devel >= 5
|
BuildRequires: qwt-devel >= 5
|
||||||
|
BuildRequires: sqlite-devel >= 3.5
|
||||||
BuildRequires: txt2tags
|
BuildRequires: txt2tags
|
||||||
BuildRequires: unzip
|
BuildRequires: unzip
|
||||||
BuildRequires: update-desktop-files
|
BuildRequires: update-desktop-files
|
||||||
Requires: python-matplotlib
|
|
||||||
Requires: python-qscintilla
|
|
||||||
Requires: python-psycopg2
|
|
||||||
Requires: python-requests
|
|
||||||
Requires: python-gdal
|
|
||||||
Requires: python-qt4
|
|
||||||
Requires: python-qt4-utils
|
|
||||||
Requires: python-sip
|
|
||||||
Requires: python-xml
|
|
||||||
%if 0%{?suse_version} > 1325
|
|
||||||
Requires: python-wxWidgets > 3.0
|
|
||||||
Requires: libwx_gtk2u_qa-suse3 > 3.0
|
|
||||||
%else
|
|
||||||
Requires: python-wxWidgets
|
|
||||||
Requires: libwx_gtk2u_qa-2_8-0-stl
|
|
||||||
%endif
|
|
||||||
Requires: libqca2
|
Requires: libqca2
|
||||||
Requires: qca
|
|
||||||
Requires: python-Jinja2
|
Requires: python-Jinja2
|
||||||
Requires: python-Pygments
|
Requires: python-Pygments
|
||||||
|
Requires: python-gdal
|
||||||
|
Requires: python-matplotlib
|
||||||
|
Requires: python-psycopg2
|
||||||
|
Requires: python-qscintilla
|
||||||
|
%if 0%{?suse_version} > 1325
|
||||||
|
Requires: python-qscintilla-qt4
|
||||||
|
Requires: python-qscintilla-qt4-sip
|
||||||
|
%endif
|
||||||
|
Requires: python-qt4
|
||||||
|
Requires: python-qt4-utils
|
||||||
|
Requires: python-requests
|
||||||
|
Requires: python-sip
|
||||||
|
Requires: python-xml
|
||||||
|
Requires: qca
|
||||||
|
Recommends: %{name}-sample-data
|
||||||
Recommends: apache2-mod_fcgid
|
Recommends: apache2-mod_fcgid
|
||||||
|
Recommends: gpsbabel
|
||||||
Recommends: libqca2-plugin-cyrus-sasl
|
Recommends: libqca2-plugin-cyrus-sasl
|
||||||
Recommends: libqca2-plugin-pkcs11
|
Recommends: libqca2-plugin-pkcs11
|
||||||
Recommends: qca-sasl
|
Recommends: qca-sasl
|
||||||
Recommends: gpsbabel
|
Obsoletes: qgis2
|
||||||
Recommends: %{name}-sample-data
|
Obsoletes: qgis-master
|
||||||
Obsoletes: qgis2 qgis-master qgis-ltr
|
Obsoletes: qgis-ltr
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
# Fix TW dependencies
|
||||||
|
%if 0%{?suse_version} > 1325
|
||||||
|
BuildRequires: libwx_gtk2u_qa-suse3 > 3.0
|
||||||
|
BuildRequires: python-wxWidgets > 3.0
|
||||||
|
%else
|
||||||
|
BuildRequires: libwx_gtk2u_qa-2_8-0-stl
|
||||||
|
BuildRequires: python-wxWidgets
|
||||||
|
%endif
|
||||||
|
%if 0%{?suse_version} > 1325
|
||||||
|
Requires: libwx_gtk2u_qa-suse3 > 3.0
|
||||||
|
Requires: python-wxWidgets > 3.0
|
||||||
|
%else
|
||||||
|
Requires: libwx_gtk2u_qa-2_8-0-stl
|
||||||
|
Requires: python-wxWidgets
|
||||||
|
%endif
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development Libraries for the QGIS
|
Summary: Development Libraries for the QGIS
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: qgis = %{version}
|
|
||||||
Requires: python-qt4-devel
|
Requires: python-qt4-devel
|
||||||
|
Requires: qgis = %{version}
|
||||||
|
|
||||||
%package plugin-grass
|
%package plugin-grass
|
||||||
Summary: GRASS Support Libraries for QGIS
|
Summary: GRASS Support Libraries for QGIS
|
||||||
@ -112,11 +122,10 @@ Requires: grass-docs
|
|||||||
Requires: qgis = %{version}
|
Requires: qgis = %{version}
|
||||||
|
|
||||||
%package sample-data
|
%package sample-data
|
||||||
Summary: QGIS sample data
|
|
||||||
Group: Productivity/Graphics/Visualization/Other
|
|
||||||
|
|
||||||
%define builddir build
|
%define builddir build
|
||||||
%define sampledir sample-data
|
%define sampledir sample-data
|
||||||
|
Summary: QGIS sample data
|
||||||
|
Group: Productivity/Graphics/Visualization/Other
|
||||||
|
|
||||||
%description
|
%description
|
||||||
QGIS is a user friendly Open Source Geographic Information System (GIS)
|
QGIS is a user friendly Open Source Geographic Information System (GIS)
|
||||||
@ -142,7 +151,7 @@ QGIS sample data with free raster, vector, gps files and a GRASS location from A
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
export QTDIR=/usr
|
export QTDIR=%{_prefix}
|
||||||
export PATH=$PATH:$QTDIR/bin
|
export PATH=$PATH:$QTDIR/bin
|
||||||
|
|
||||||
%ifarch x86_64 aarch64 ppc64 ppc64le
|
%ifarch x86_64 aarch64 ppc64 ppc64le
|
||||||
@ -151,36 +160,28 @@ export PATH=$PATH:$QTDIR/bin
|
|||||||
%define lib lib
|
%define lib lib
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
cd ..
|
%cmake \
|
||||||
mkdir temp
|
|
||||||
cd temp
|
|
||||||
|
|
||||||
cmake -Wno-dev %{intsq} \
|
|
||||||
-D CMAKE_INSTALL_PREFIX=%{_prefix} \
|
|
||||||
-D CMAKE_BUILD_TYPE="Release" \
|
|
||||||
-DQGIS_LIB_SUBDIR=%{lib} \
|
-DQGIS_LIB_SUBDIR=%{lib} \
|
||||||
-DWITH_BINDINGS=TRUE \
|
-DWITH_BINDINGS=TRUE \
|
||||||
-DWITH_QSPATIALITE=TRUE \
|
-DWITH_QSPATIALITE=TRUE \
|
||||||
-DWITH_PYSPATIALITE=TRUE \
|
-DWITH_PYSPATIALITE=TRUE \
|
||||||
-DWITH_SERVER=TRUE \
|
-DWITH_SERVER=TRUE \
|
||||||
-DWITH_SERVER_PLUGINS=TRUE \
|
-DWITH_SERVER_PLUGINS=TRUE \
|
||||||
|
-DWITH_POSTGRESQL=TRUE \
|
||||||
-DPOSTGRES_LIBRARY=%{_libdir}/libpq.so \
|
-DPOSTGRES_LIBRARY=%{_libdir}/libpq.so \
|
||||||
-DQGIS_PLUGIN_SUBDIR=%{lib}/qgis \
|
-DQGIS_PLUGIN_SUBDIR=%{lib}/qgis \
|
||||||
-DQGIS_MANUAL_SUBDIR=share/man \
|
-DQGIS_MANUAL_SUBDIR=share/man \
|
||||||
-D QWT_INCLUDE_DIR=/usr/include/qwt5 \
|
-DQWT_INCLUDE_DIR=%{_includedir}/qwt5 \
|
||||||
-DCMAKE_SKIP_RPATH=OFF \
|
-DCMAKE_SKIP_RPATH=OFF \
|
||||||
../%{name}-%{version}/
|
-Wno-dev
|
||||||
|
|
||||||
#echo "for 'make' run first:"
|
#echo "for 'make' run first:"
|
||||||
export QTDIR=%{_prefix}
|
export QTDIR=%{_prefix}
|
||||||
#echo "export PATH=$PATH:$QTDIR/bin"
|
#echo "export PATH=$PATH:$QTDIR/bin"
|
||||||
export PATH=$PATH:$QTDIR/bin
|
export PATH=$PATH:$QTDIR/bin
|
||||||
#use multi-core & let that optionnal if jobs is specified as meta
|
%make_jobs
|
||||||
make %{?jobs:-j%{jobs}}
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
cd ../temp
|
%cmake_install
|
||||||
%makeinstall
|
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_datadir}/applications
|
mkdir -p %{buildroot}%{_datadir}/applications
|
||||||
cp %{SOURCE1} %{buildroot}%{_datadir}/applications
|
cp %{SOURCE1} %{buildroot}%{_datadir}/applications
|
||||||
@ -199,11 +200,7 @@ popd
|
|||||||
|
|
||||||
%fdupes -s %{buildroot}
|
%fdupes -s %{buildroot}
|
||||||
|
|
||||||
%clean
|
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%{_libdir}/libqgispython.s*
|
%{_libdir}/libqgispython.s*
|
||||||
#%%{_libdir}/libqgis_*s*
|
#%%{_libdir}/libqgis_*s*
|
||||||
@ -214,8 +211,8 @@ rm -rf %{buildroot}
|
|||||||
%{_datadir}/qgis/*
|
%{_datadir}/qgis/*
|
||||||
%{_datadir}/applications/%{name}.desktop
|
%{_datadir}/applications/%{name}.desktop
|
||||||
%{_datadir}/pixmaps/qgis.png
|
%{_datadir}/pixmaps/qgis.png
|
||||||
%{_prefix}/lib/qgis/qgis_help
|
%{_libdir}/qgis/qgis_help
|
||||||
%{_prefix}/lib/qgis/crssync
|
%{_libdir}/qgis/crssync
|
||||||
%exclude %{_prefix}/lib/debug/
|
%exclude %{_prefix}/lib/debug/
|
||||||
%exclude %{_libdir}/libqgisgrass.so
|
%exclude %{_libdir}/libqgisgrass.so
|
||||||
%exclude %{_libdir}/libqgisgrass.so.*
|
%exclude %{_libdir}/libqgisgrass.so.*
|
||||||
@ -223,28 +220,22 @@ rm -rf %{buildroot}
|
|||||||
#%%doc BUGS COPYING README
|
#%%doc BUGS COPYING README
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%{_includedir}/qgis/*
|
||||||
%{_prefix}/include/qgis/*
|
|
||||||
|
|
||||||
%files plugin-grass
|
%files plugin-grass
|
||||||
%defattr(644,root,root)
|
|
||||||
%{_libdir}/qgis/libgrass*
|
%{_libdir}/qgis/libgrass*
|
||||||
#%%{_libdir}/libqgisgrass.so
|
#%%{_libdir}/libqgisgrass.so
|
||||||
#%%{_libdir}/libqgisgrass.so.*
|
#%%{_libdir}/libqgisgrass.so.*
|
||||||
%defattr(755,root,root)
|
%defattr(755,root,root)
|
||||||
%{_prefix}/lib/qgis/grass/bin/qgis.g.browser7
|
%{_libdir}/qgis/grass/bin/qgis.g.browser7
|
||||||
%{_prefix}/lib/qgis/grass/modules/qgis.*
|
%{_libdir}/qgis/grass/modules/qgis.*
|
||||||
|
|
||||||
%files sample-data
|
%files sample-data
|
||||||
%defattr(644,root,root)
|
|
||||||
%{_datadir}/qgis/%{sampledir}
|
%{_datadir}/qgis/%{sampledir}
|
||||||
|
|
||||||
%post plugin-grass -p /sbin/ldconfig
|
%post plugin-grass -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun plugin-grass -p /sbin/ldconfig
|
%postun plugin-grass -p /sbin/ldconfig
|
||||||
|
|
||||||
%post -p /sbin/ldconfig
|
%post -p /sbin/ldconfig
|
||||||
|
|
||||||
%postun -p /sbin/ldconfig
|
%postun -p /sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user