Summary: Geographic Information Systems Extensions to PostgreSQL
Summary(pl.UTF-8): Rozszerzenie do PostgreSQL wspomagające Geograficzne Systemy Informacyjne
Name: postgis
-Version: 2.2.1
+Version: 2.4.4
%define subver %{nil}
Release: 1
License: GPL v2+
Group: Applications/Databases
-Source0: http://download.osgeo.org/postgis/source/%{name}-%{version}%{subver}.tar.gz
-# Source0-md5: dc3575a0aac5a7e0bbddde17eb6be400
-Patch0: %{name}-link.patch
-Patch1: json-c-0.13.patch
-Patch2: postgres10.patch
+Source0: https://download.osgeo.org/postgis/source/%{name}-%{version}%{subver}.tar.gz
+# Source0-md5: 87608a7f01a50c5bae72a00ba3314e2d
URL: http://postgis.refractions.net/
%{?with_raster:BuildRequires: gdal-devel >= 1.8.0}
BuildRequires: geos-devel >= 3.5.0
%prep
%setup -q -n %{name}-%{version}%{subver}
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
%build
-%{__autoconf}
%configure \
%{?with_gui:--with-gui} \
%{!?with_raster:--without-raster}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+# Fix icons and desktop file locations
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/icons
+%{__mv} $RPM_BUILD_ROOT%{_datadir}/{postgresql,}/applications
+
%clean
rm -rf $RPM_BUILD_ROOT
%doc CREDITS LICENSE.TXT NEWS README.postgis TODO %{?with_doc:doc/html}
%attr(755,root,root) %{_bindir}/pgsql2shp
%attr(755,root,root) %{_bindir}/shp2pgsql
-%attr(755,root,root) %{_libdir}/postgresql/postgis-2.2.so
-%attr(755,root,root) %{_libdir}/postgresql/postgis_topology-2.2.so
-%{_datadir}/postgresql/contrib/postgis-2.2
+%attr(755,root,root) %{_libdir}/postgresql/postgis-2.4.so
+%attr(755,root,root) %{_libdir}/postgresql/postgis_topology-2.4.so
+%{_datadir}/postgresql/contrib/postgis-2.4
%if %{with raster}
%attr(755,root,root) %{_bindir}/raster2pgsql
-%attr(755,root,root) %{_libdir}/postgresql/rtpostgis-2.2.so
+%attr(755,root,root) %{_libdir}/postgresql/rtpostgis-2.4.so
%{_datadir}/postgresql/extension/postgis*.control
%{_datadir}/postgresql/extension/postgis*.sql
%endif
+%{_libdir}/postgresql/address_standardizer-2.4.so
+%{_datadir}/postgresql/extension/address_standardizer*.sql
+%{_datadir}/postgresql/extension/address_standardizer*.control
%if %{with gui}
%files gui
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/shp2pgsql-gui
+%{_desktopdir}/shp2pgsql-gui.desktop
+%{_iconsdir}/hicolor/*x*/apps/shp2pgsql-gui.png
%endif
%files -n liblwgeom
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/liblwgeom-2.2.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/liblwgeom-2.2.so.5
+%attr(755,root,root) %{_libdir}/liblwgeom-2.4.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/liblwgeom-2.4.so.0
%files -n liblwgeom-devel
%defattr(644,root,root,755)
+++ /dev/null
---- postgis-2.2.1/configure.ac~ 2016-01-04 14:41:51.000000000 +0000
-+++ postgis-2.2.1/configure.ac 2018-05-11 05:13:36.828542689 +0000
-@@ -431,8 +431,8 @@
- dnl Extract the version information from pg_config
- dnl Note: we extract the major & minor separately, ensure they are numeric, and then combine to give
- dnl the final version. This is to guard against user error...
-- PGSQL_MAJOR_VERSION=`$PG_CONFIG --version | sed 's/[[^0-9]]*\([[0-9]]\)\.\([[0-9]]\).*/\1/'`
-- PGSQL_MINOR_VERSION=`$PG_CONFIG --version | sed 's/[[^0-9]]*\([[0-9]]\)\.\([[0-9]]\).*/\2/'`
-+ PGSQL_MAJOR_VERSION=`$PG_CONFIG --version | sed 's/[[^0-9]]*\([[0-9]]\+\)\.\([[0-9]]\).*/\1/'`
-+ PGSQL_MINOR_VERSION=`$PG_CONFIG --version | sed 's/[[^0-9]]*\([[0-9]]\+\)\.\([[0-9]]\).*/\2/'`
- PGSQL_FULL_VERSION=`$PG_CONFIG --version`
- POSTGIS_PGSQL_VERSION="$PGSQL_MAJOR_VERSION$PGSQL_MINOR_VERSION"
-