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

178 lines
4.9 KiB
RPMSpec
Raw Normal View History

Name: qgis
Version: 1.7.0
Release: 1
License: GPL
Group: Applications/GIS
Source: %{name}-%{version}.tar.bz2
Source1: %{name}.desktop
Source2: %{name}.rpmlintrc
Url: http://www.qgis.org/
Summary: Quantum GIS (QGIS) is a Geographic Information System (GIS)
Packager: Otto Dassau <dassau@gbd-consult.de>
Requires: libgeos >= 2
Requires: libgdal1 >= 1.6.0
%if 0%{?suse_version} > 1030
Requires: sqlite >= 3.5
BuildRequires: sqlite-devel >= 3.5
%endif
Requires: libqt4 >= 4.3
Requires: gsl >= 1.6
Requires: postgresql >= 8 postgresql-libs >= 8
Requires: python-qt4
Requires: python-sip
Requires: python-xml
Requires: gpsbabel
Requires: python-gdal
BuildRequires: qwt-devel >= 5
BuildRequires: libexpat-devel
BuildRequires: python-devel
%if 0%{?suse_version} <= 1030 || 0%{?suse_version} >= 1120
BuildRequires: python-qt4-devel
BuildRequires: python-sip-devel
%else
BuildRequires: python-qt4
BuildRequires: python-sip
%endif
BuildRequires: libgdal-devel >= 1.6.0
BuildRequires: libgeos-devel >= 2
BuildRequires: libproj-devel
BuildRequires: libproj-devel-static
BuildRequires: postgresql-devel >= 8
BuildRequires: grass
BuildRequires: grass-devel
BuildRequires: libqt4-devel >= 4.3
BuildRequires: libqt4-qt3support >= 4.3
BuildRequires: libQtWebKit-devel >= 4.3
BuildRequires: gsl >= 1.6 gsl-devel
BuildRequires: cmake >= 2.4
BuildRequires: flex bison
BuildRequires: txt2tags
Buildrequires: FastCGI-devel
BuildRequires: update-desktop-files
BuildRequires: -post-build-checks
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Obsoletes: qgis10
%package devel
Summary: Development Libraries for the Quantum GIS development branch 1.x
Group: Development/Libraries
Requires: qgis = %{version}
%package plugin-grass
Summary: GRASS Support Libraries for Quantum GIS development branch 1.x
Group: Applications/GIS
Requires: qgis = %{version}
Requires: grass
%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
%build
export CFLAGS="$RPM_OPT_FLAGS"
export QTDIR=/usr
export PATH=$PATH:$QTDIR/bin
%ifarch x86_64
%define lib lib64
%else
%define lib lib
%endif
cmake -Wno-dev %{intsq} \
-D CMAKE_INSTALL_PREFIX=%{_prefix} \
-D GRASS_PREFIX=/opt/grass\
-D QGIS_LIB_SUBDIR=%{lib} \
-D WITH_BINDINGS=TRUE \
-D WITH_MAPSERVER=ON \
-D QGIS_PLUGIN_SUBDIR=%{lib}/qgis \
-D QGIS_MANUAL_SUBDIR=share/man \
-D QWT_INCLUDE_DIR=/usr/include/qwt \
-D CMAKE_SKIP_RPATH=ON \
%if 0%{?suse_version} <= 1030
-D WITH_INTERNAL_SQLITE3=TRUE \
-D SQLITE3_INCLUDE_DIR=%{buildroot}/src/core/sqlite3 \
%endif
.
# 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
make
%install
make install DESTDIR=%{buildroot}
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}
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%{_bindir}/*
%{_libdir}/lib%{name}python.s*
%{_libdir}/lib%{name}_*s*
%{_libdir}/lib%{name}*s*
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/*
%{_mandir}/man1/*
%{_datadir}/%{name}/*
%{_datadir}/applications/%{name}.desktop
%{_datadir}/pixmaps/%{name}.png
%{_prefix}/lib/qgis/qgis_help
%exclude %{_libdir}/libqgisgrass.so
%exclude %{_libdir}/libqgisgrass.so.%{version}
%exclude %{_libdir}/qgis/libgrass*
%doc BUGS COPYING ChangeLog INSTALL README TODO
%files devel
%defattr(-,root,root)
%{_prefix}/include/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