From 4b413346c3f06f5ea3dc29d14f75c900f4494211 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Fri, 22 Sep 2023 00:17:04 +0300 Subject: [PATCH] Update PostGIS to the latest versions --- specs/gdal/gdal3.spec | 6 +- specs/postgresql-10/postgis24.spec | 319 ---------------- specs/postgresql-10/postgis25.spec | 341 ----------------- specs/postgresql-10/postgis30.spec | 174 ++++----- specs/postgresql-10/postgis31.spec | 174 ++++----- specs/postgresql-10/postgis32.spec | 267 ++++++++++++++ specs/postgresql-11/postgis25.spec | 347 ------------------ specs/postgresql-11/postgis30.spec | 180 ++++----- specs/postgresql-11/postgis31.spec | 180 ++++----- specs/postgresql-11/postgis32.spec | 269 ++++++++++++++ specs/postgresql-11/postgis33.spec | 278 ++++++++++++++ specs/postgresql-12/postgis25.spec | 347 ------------------ specs/postgresql-12/postgis30.spec | 180 ++++----- specs/postgresql-12/postgis31.spec | 180 ++++----- specs/postgresql-12/postgis32.spec | 269 ++++++++++++++ specs/postgresql-12/postgis33.spec | 278 ++++++++++++++ specs/postgresql-12/postgis34.spec | 281 ++++++++++++++ specs/postgresql-13/postgis31.spec | 180 ++++----- specs/postgresql-13/postgis32.spec | 269 ++++++++++++++ specs/postgresql-13/postgis33.spec | 278 ++++++++++++++ specs/postgresql-13/postgis34.spec | 281 ++++++++++++++ specs/postgresql-14/postgis31.spec | 202 ++++------ specs/postgresql-14/postgis32.spec | 269 ++++++++++++++ specs/postgresql-14/postgis33.spec | 278 ++++++++++++++ specs/postgresql-14/postgis34.spec | 281 ++++++++++++++ .../postgis31.spec} | 184 ++++------ specs/postgresql-15/postgis32.spec | 269 ++++++++++++++ specs/postgresql-15/postgis33.spec | 278 ++++++++++++++ specs/postgresql-15/postgis34.spec | 281 ++++++++++++++ 29 files changed, 4708 insertions(+), 2412 deletions(-) delete mode 100644 specs/postgresql-10/postgis24.spec delete mode 100644 specs/postgresql-10/postgis25.spec create mode 100644 specs/postgresql-10/postgis32.spec delete mode 100644 specs/postgresql-11/postgis25.spec create mode 100644 specs/postgresql-11/postgis32.spec create mode 100644 specs/postgresql-11/postgis33.spec delete mode 100644 specs/postgresql-12/postgis25.spec create mode 100644 specs/postgresql-12/postgis32.spec create mode 100644 specs/postgresql-12/postgis33.spec create mode 100644 specs/postgresql-12/postgis34.spec create mode 100644 specs/postgresql-13/postgis32.spec create mode 100644 specs/postgresql-13/postgis33.spec create mode 100644 specs/postgresql-13/postgis34.spec create mode 100644 specs/postgresql-14/postgis32.spec create mode 100644 specs/postgresql-14/postgis33.spec create mode 100644 specs/postgresql-14/postgis34.spec rename specs/{postgresql-13/postgis30.spec => postgresql-15/postgis31.spec} (57%) create mode 100644 specs/postgresql-15/postgis32.spec create mode 100644 specs/postgresql-15/postgis33.spec create mode 100644 specs/postgresql-15/postgis34.spec diff --git a/specs/gdal/gdal3.spec b/specs/gdal/gdal3.spec index 3ccd42598..d83a066d4 100644 --- a/specs/gdal/gdal3.spec +++ b/specs/gdal/gdal3.spec @@ -113,10 +113,6 @@ rm -rf %{buildroot} install -dm 755 %{buildroot}%{_sysconfdir}/ld.so.conf.d install -pm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-libs.conf -%if 0%{?rhel} <= 7 -mv %{buildroot}%{_libdir}/pkgconfig/%{realname}.pc %{buildroot}%{_libdir}/pkgconfig/%{name}.pc -%endif - %clean rm -rf %{buildroot} @@ -151,7 +147,7 @@ rm -rf %{buildroot} %{_includedir}/%{name}/ %{_libdir}/lib%{realname}.so %{_libdir}/cmake/%{realname}/ -%{_libdir}/pkgconfig/%{name}.pc +%{_libdir}/pkgconfig/%{realname}.pc %{_mandir}/man1/%{realname}-config.1* ################################################################################ diff --git a/specs/postgresql-10/postgis24.spec b/specs/postgresql-10/postgis24.spec deleted file mode 100644 index c7be1a18a..000000000 --- a/specs/postgresql-10/postgis24.spec +++ /dev/null @@ -1,319 +0,0 @@ -################################################################################ - -%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd - -################################################################################ - -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - -%{!?utils:%define utils 1} -%{!?raster:%define raster 1} - -%define maj_ver 2.4 -%define pg_maj_ver 10 -%define pg_low_fullver 10.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}24 - -%define __perl_requires filter-requires-perl-Pg.sh - -################################################################################ - -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{fullname}_%{pg_maj_ver} -Version: 2.4.9 -Release: 2%{?dist} -License: GPLv2+ -Group: Applications/Databases -URL: https://www.postgis.net - -Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh - -Source100: checksum.sha512 - -Patch0: %{fullname}-gdalfpic.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} - -BuildRequires: geos-devel >= 3.9 chrpath make gcc pcre-devel hdf5-devel -BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel -BuildRequires: devtoolset-3-gcc-c++ devtoolset-3-libstdc++-devel - -%if %raster -BuildRequires: gdal-devel >= 1.9.0 -Requires: gdal >= 1.9.0 -%endif - -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} - -Requires(post): %{_sbindir}/update-alternatives - -Obsoletes: %{realname}2_%{pg_maj_ver} <= 2.4.4 - -Conflicts: %{realname}25 -Conflicts: %{realname}2 - -Provides: %{realname} = %{version}-%{release} - -################################################################################ - -%description -PostGIS adds support for geographic objects to the PostgreSQL object-relational -database. In effect, PostGIS "spatially enables" the PostgreSQL server, -allowing it to be used as a backend spatial database for geographic information -systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS -follows the OpenGIS "Simple Features Specification for SQL" and has been -certified as compliant with the "Types and Functions" profile. - -################################################################################ - -%package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} - -%description client -The postgis-client package contains the client tools and their libraries -of PostGIS. - -################################################################################ - -%package devel -Summary: Development headers and libraries for PostGIS -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -The postgis-devel package contains the header files and libraries -needed to compile C or C++ applications which will directly interact -with PostGIS. - -################################################################################ - -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - -%package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} - -%description scripts -This package postgis-scripts contains the SQL scripts for installing PostGIS -in a PostgreSQL database, and for upgrading from earlier PostGIS versions. - -################################################################################ - -%if %utils -%package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg - -%description utils -The postgis-utils package provides the utilities for PostGIS. -%endif - -################################################################################ - -%prep -%{crc_check} - -%setup -qn %{realname}-%{version} - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - -%patch0 -p0 - -%build -# We need the below for GDAL: -export LD_LIBRARY_PATH=%{pg_dir}/lib - -# Use gcc and gcc-c++ from devtoolset -export PATH="/opt/rh/devtoolset-3/root/usr/bin:$PATH" - -%configure --with-pgconfig=%{pg_dir}/bin/pg_config \ -%if !%raster - --without-raster \ -%endif - --disable-rpath \ - --libdir=%{pg_dir}/lib - -%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" -%{__make} -C extensions - -%if %utils -%{__make} -C utils -%endif - -%install -rm -rf %{buildroot} - -%{make_install} -%{make_install} -C extensions - -mkdir -p %{buildroot}%{pg_dir}/bin/%{realname}-%{maj_ver} - -chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp -chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql -chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql - -mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ - %{buildroot}%{pg_dir}/bin/shp2pgsql \ - %{buildroot}%{pg_dir}/bin/raster2pgsql \ - %{buildroot}%{pg_dir}/bin/%{realname}-%{maj_ver}/ - -%if %utils -install -dm 755 %{buildroot}%{_datadir}/%{name} -install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} -%endif - -%post -%{__ldconfig} - -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 - -%postun -%{__ldconfig} - -if [[ $1 -eq 0 ]] ; then - # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql -fi - -%clean -rm -rf %{buildroot} - -################################################################################ - -%files -%defattr(-,root,root) -%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt -%attr(755,root,root) %{pg_dir}/lib/%{realname}-*.so -%{pg_dir}/lib/liblwgeom*.so* -%if %raster -%{pg_dir}/lib/address_standardizer.so -%{pg_dir}/lib/postgis_topology-%{maj_ver}.so -%{pg_dir}/lib/rtpostgis-%{maj_ver}.so -%endif - -%files client -%defattr(644,root,root) -%attr(755,root,root) %{pg_dir}/bin/* - -%files devel -%defattr(644,root,root) -%{_includedir}/liblwgeom.h -%{_includedir}/liblwgeom_topo.h -%{pg_dir}/lib/liblwgeom*.a -%{pg_dir}/lib/liblwgeom*.la - -%files scripts -%defattr(644,root,root) -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/*legacy*.sql -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/postgis.sql -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/postgis_comments.sql -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/postgis_for_extension.sql -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/postgis_proc_set_search_path.sql -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/postgis_restore.pl -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/postgis_upgrade*.sql -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/raster_comments.sql -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/sfcgal_comments.sql -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/spatial*.sql -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/topology*.sql -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/uninstall_postgis.sql -%{pg_dir}/share/contrib/%{realname}-%{maj_ver}/uninstall_topology.sql -%{pg_dir}/share/extension/%{realname}* -%{pg_dir}/share/extension/address_standardizer* -%if %raster -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_proc_set_search_path.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql -%endif - -%if %utils -%files utils -%defattr(-,root,root) -%doc utils/README -%attr(755,root,root) %{_datadir}/%{name}/*.pl -%endif - -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - -################################################################################ - -%changelog -* Sat Mar 27 2021 Anton Novojilov - 2.4.9-2 -- Fixed minimal required GEOS version - -* Thu Mar 25 2021 Anton Novojilov - 2.4.9-1 -- Updated to the latest stable release - -* Mon Jan 20 2020 Anton Novojilov - 2.4.8-0 -- Updated to the latest stable release - -* Sat Nov 17 2018 Anton Novojilov - 2.4.5-0 -- Initial build diff --git a/specs/postgresql-10/postgis25.spec b/specs/postgresql-10/postgis25.spec deleted file mode 100644 index 629479b8f..000000000 --- a/specs/postgresql-10/postgis25.spec +++ /dev/null @@ -1,341 +0,0 @@ -################################################################################ - -%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd - -################################################################################ - -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - -%{!?utils:%define utils 1} -%{!?raster:%define raster 1} - -%define maj_ver 2.5 -%define pg_maj_ver 10 -%define pg_low_fullver 10.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}25 - -%define __perl_requires filter-requires-perl-Pg.sh - -################################################################################ - -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{fullname}_%{pg_maj_ver} -Version: 2.5.5 -Release: 1%{?dist} -License: GPLv2+ -Group: Applications/Databases -URL: https://www.postgis.net - -Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh - -Source100: checksum.sha512 - -Patch0: %{fullname}-gdalfpic.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} - -BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel -BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel -BuildRequires: devtoolset-3-gcc-c++ devtoolset-3-libstdc++-devel - -%if %raster -BuildRequires: gdal-devel >= 1.9.0 -Requires: gdal >= 1.9.0 -%endif - -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} - -Requires(post): %{_sbindir}/update-alternatives - -Conflicts: %{realname}24 -Conflicts: %{realname}2 - -Provides: %{realname} = %{version}-%{release} - -################################################################################ - -%description -PostGIS adds support for geographic objects to the PostgreSQL object-relational -database. In effect, PostGIS "spatially enables" the PostgreSQL server, -allowing it to be used as a backend spatial database for geographic information -systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS -follows the OpenGIS "Simple Features Specification for SQL" and has been -certified as compliant with the "Types and Functions" profile. - -################################################################################ - -%package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} - -%description client -The postgis-client package contains the client tools and their libraries -of PostGIS. - -################################################################################ - -%package devel -Summary: Development headers and libraries for PostGIS -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -The postgis-devel package contains the header files and libraries -needed to compile C or C++ applications which will directly interact -with PostGIS. - -################################################################################ - -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - -%package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} - -%description scripts -This package postgis-scripts contains the SQL scripts for installing PostGIS -in a PostgreSQL database, and for upgrading from earlier PostGIS versions. - -################################################################################ - -%if %utils -%package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg - -%description utils -The postgis-utils package provides the utilities for PostGIS. -%endif - -################################################################################ - -%prep -%{crc_check} - -%setup -qn %{realname}-%{version} - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - -%patch0 -p0 - -%build -# We need the below for GDAL -export LD_LIBRARY_PATH=%{pg_dir}/lib - -# Use gcc and gcc-c++ from devtoolset -export PATH="/opt/rh/devtoolset-3/root/usr/bin:$PATH" - -%configure --with-pgconfig=%{pg_dir}/bin/pg_config \ -%if !%raster - --without-raster \ -%endif - --disable-rpath \ - --libdir=%{pg_dir}/lib - -%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" -%{__make} -C extensions - -%if %utils -%{__make} -C utils -%endif - -%install -rm -rf %{buildroot} - -%{make_install} -%{make_install} -C extensions - -mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} - -chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp -chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql -chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql - -mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ - %{buildroot}%{pg_dir}/bin/shp2pgsql \ - %{buildroot}%{pg_dir}/bin/raster2pgsql \ - %{buildroot}%{pg_dir}/bin/%{pkgname}/ - -%if %utils -install -dm 755 %{buildroot}%{_datadir}/%{name} -install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} -%endif - -%post -%{__ldconfig} - -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 - -%postun -%{__ldconfig} - -if [[ $1 -eq 0 ]] ; then - # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql -fi - -%clean -rm -rf %{buildroot} - -################################################################################ - -%files -%defattr(-,root,root) -%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt -%{pg_dir}/lib/address_standardizer.so -%{pg_dir}/lib/postgis-%{maj_ver}.so -%{pg_dir}/lib/postgis_topology-%{maj_ver}.so -%{pg_dir}/lib/liblwgeom.so -%{pg_dir}/lib/liblwgeom-%{maj_ver}.so.0 -%{pg_dir}/lib/liblwgeom-%{maj_ver}.so.0.0.0 -%if %raster -%{pg_dir}/lib/rtpostgis-%{maj_ver}.so -%endif - -%files client -%defattr(755,root,root) -%{pg_dir}/bin/%{pkgname}/pgsql2shp -%{pg_dir}/bin/%{pkgname}/raster2pgsql -%{pg_dir}/bin/%{pkgname}/shp2pgsql - -%files devel -%defattr(644,root,root) -%{_includedir}/liblwgeom.h -%{_includedir}/liblwgeom_topo.h -%{pg_dir}/lib/liblwgeom*.a -%{pg_dir}/lib/liblwgeom*.la - -%files scripts -%defattr(644,root,root) -%{pg_dir}/share/contrib/%{pkgname}/legacy.sql -%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql -%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_proc_set_search_path.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl -%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql -%{pg_dir}/share/contrib/%{pkgname}/topology.sql -%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql -%{pg_dir}/share/extension/address_standardizer*.control -%{pg_dir}/share/extension/address_standardizer*.sql -%{pg_dir}/share/extension/postgis*.control -%{pg_dir}/share/extension/postgis*.sql -%if %raster -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_proc_set_search_path.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql -%endif - -%if %utils -%files utils -%defattr(-,root,root) -%doc utils/README -%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl -%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl -%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl -%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_set_search_path.pl -%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_upgrade.pl -%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl -%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl -%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl -%attr(755,root,root) %{_datadir}/%{name}/svn_repo_revision.pl -%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl -%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl -%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl -%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl -%endif - -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - -################################################################################ - -%changelog -* Fri Mar 26 2021 Anton Novojilov - 2.5.5-1 -- Updated for compatibility with other major versions - -* Sun Feb 21 2021 Anton Novojilov - 2.5.5-0 -- Updated to the latest stable release - -* Mon Jan 20 2020 Anton Novojilov - 2.5.3-0 -- Updated to the latest stable release - -* Fri Oct 25 2019 Anton Novojilov - 2.5.0-0 -- Initial build diff --git a/specs/postgresql-10/postgis30.spec b/specs/postgresql-10/postgis30.spec index 3998e75b5..abc4466e8 100644 --- a/specs/postgresql-10/postgis30.spec +++ b/specs/postgresql-10/postgis30.spec @@ -4,97 +4,69 @@ ################################################################################ -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - %{!?utils:%define utils 1} %{!?raster:%define raster 1} -%define maj_ver 3.0 -%define lib_ver 3 -%define pg_maj_ver 10 -%define pg_low_fullver 10.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define gdal_dir %{_prefix}/gdal3 -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}30 +################################################################################ + +%define maj_ver 3.0 +%define lib_ver 3 +%define pg_ver 10 +%define pg_low_fullver %{pg_ver}.23 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}30 %define __perl_requires filter-requires-perl-Pg.sh ################################################################################ -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{fullname}_%{pg_maj_ver} -Version: 3.0.4 +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.0.9 Release: 0%{?dist} License: GPLv2+ Group: Applications/Databases URL: https://www.postgis.net Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh +Source1: filter-requires-perl-Pg.sh Source100: checksum.sha512 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel +%else +BuildRequires: gcc-c++ +%endif %if %raster +%if 0%{?rhel} == 7 BuildRequires: gdal3-devel -Requires: gdal3 +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif %endif -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} -Requires(post): %{_sbindir}/update-alternatives +Requires(post): update-alternatives -Conflicts: %{realname}31 +Conflicts: %{realname}31 %{realname}32 %{realname}33 %{realname}34 Provides: %{realname} = %{version}-%{release} @@ -111,9 +83,10 @@ certified as compliant with the "Types and Functions" profile. ################################################################################ %package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description client The postgis-client package contains the client tools and their libraries @@ -121,19 +94,11 @@ of PostGIS. ################################################################################ -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - %package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description scripts This package postgis-scripts contains the SQL scripts for installing PostGIS @@ -143,9 +108,10 @@ in a PostgreSQL database, and for upgrading from earlier PostGIS versions. %if %utils %package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg %description utils The postgis-utils package provides the utilities for PostGIS. @@ -158,25 +124,18 @@ The postgis-utils package provides the utilities for PostGIS. %setup -qn %{realname}-%{version} -if %{__ldconfig} -p | grep -q 'gdal.so.1' ; then - echo "!! GDAL 1.x is installed. Please remove package before build. !!" - exit 1 -fi - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - %build # We need the below for GDAL export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" -# Use gcc and gcc-c++ from devtoolset +%if 0%{?rhel} == 7 export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" -export LIBGDAL_CFLAGS="" +%endif %configure \ --with-pgconfig=%{pg_dir}/bin/pg_config \ - --with-gdalconfig=%{gdal_dir}/bin/gdal-config \ + --with-gdalconfig=%{_bindir}/gdal-config \ %if !%raster --without-raster \ %endif @@ -196,6 +155,8 @@ rm -rf %{buildroot} %{make_install} %{make_install} -C extensions +rm -rf %{buildroot}%{pg_dir}/doc + mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp @@ -213,20 +174,20 @@ install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} %endif %post -%{__ldconfig} +/sbin/ldconfig -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 %postun -%{__ldconfig} +/sbin/ldconfig if [[ $1 -eq 0 ]] ; then # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql fi %clean @@ -245,13 +206,13 @@ rm -rf %{buildroot} %endif %files client -%defattr(755,root,root) +%defattr(-,root,root) %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %files scripts -%defattr(644,root,root) +%defattr(-,root,root) %{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql %{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql %{pg_dir}/share/contrib/%{pkgname}/legacy.sql @@ -301,19 +262,8 @@ rm -rf %{buildroot} %attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl %endif -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - ################################################################################ %changelog -* Thu Nov 18 2021 Anton Novojilov - 3.0.4-0 -- Updated to the latest stable version - -* Fri Mar 26 2021 Anton Novojilov - 3.0.3-1 -- Updated for compatibility with other major versions - -* Sat Feb 20 2021 Anton Novojilov - 3.0.3-0 -- Initial build for kaos-repo +* Thu Sep 21 2023 Anton Novojilov - 3.0.9-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.0.9/NEWS diff --git a/specs/postgresql-10/postgis31.spec b/specs/postgresql-10/postgis31.spec index 6afae16a4..a5ec9726e 100644 --- a/specs/postgresql-10/postgis31.spec +++ b/specs/postgresql-10/postgis31.spec @@ -4,97 +4,69 @@ ################################################################################ -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - %{!?utils:%define utils 1} %{!?raster:%define raster 1} -%define maj_ver 3.1 -%define lib_ver 3 -%define pg_maj_ver 10 -%define pg_low_fullver 10.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define gdal_dir %{_prefix}/gdal3 -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}31 +################################################################################ + +%define maj_ver 3.1 +%define lib_ver 3 +%define pg_ver 10 +%define pg_low_fullver %{pg_ver}.23 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}31 %define __perl_requires filter-requires-perl-Pg.sh ################################################################################ -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{fullname}_%{pg_maj_ver} -Version: 3.1.4 +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.1.9 Release: 0%{?dist} License: GPLv2+ Group: Applications/Databases URL: https://www.postgis.net Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh +Source1: filter-requires-perl-Pg.sh Source100: checksum.sha512 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel +%else +BuildRequires: gcc-c++ +%endif %if %raster +%if 0%{?rhel} == 7 BuildRequires: gdal3-devel -Requires: gdal3 +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif %endif -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} -Requires(post): %{_sbindir}/update-alternatives +Requires(post): update-alternatives -Conflicts: %{realname}30 +Conflicts: %{realname}30 %{realname}32 %{realname}33 %{realname}34 Provides: %{realname} = %{version}-%{release} @@ -111,9 +83,10 @@ certified as compliant with the "Types and Functions" profile. ################################################################################ %package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description client The postgis-client package contains the client tools and their libraries @@ -121,19 +94,11 @@ of PostGIS. ################################################################################ -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - %package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description scripts This package postgis-scripts contains the SQL scripts for installing PostGIS @@ -143,9 +108,10 @@ in a PostgreSQL database, and for upgrading from earlier PostGIS versions. %if %utils %package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg %description utils The postgis-utils package provides the utilities for PostGIS. @@ -158,25 +124,18 @@ The postgis-utils package provides the utilities for PostGIS. %setup -qn %{realname}-%{version} -if %{__ldconfig} -p | grep -q 'gdal.so.1' ; then - echo "!! GDAL 1.x is installed. Please remove package before build. !!" - exit 1 -fi - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - %build # We need the below for GDAL export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" -# Use gcc and gcc-c++ from devtoolset +%if 0%{?rhel} == 7 export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" -export LIBGDAL_CFLAGS="" +%endif %configure \ --with-pgconfig=%{pg_dir}/bin/pg_config \ - --with-gdalconfig=%{gdal_dir}/bin/gdal-config \ + --with-gdalconfig=%{_bindir}/gdal-config \ %if !%raster --without-raster \ %endif @@ -197,6 +156,8 @@ rm -rf %{buildroot} %{make_install} %{make_install} -C extensions +rm -rf %{buildroot}%{pg_dir}/doc + mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp @@ -214,20 +175,20 @@ install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} %endif %post -%{__ldconfig} +/sbin/ldconfig -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 %postun -%{__ldconfig} +/sbin/ldconfig if [[ $1 -eq 0 ]] ; then # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql fi %clean @@ -246,13 +207,13 @@ rm -rf %{buildroot} %endif %files client -%defattr(755,root,root) +%defattr(-,root,root) %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %files scripts -%defattr(644,root,root) +%defattr(-,root,root) %{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql %{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql %{pg_dir}/share/contrib/%{pkgname}/legacy.sql @@ -299,19 +260,8 @@ rm -rf %{buildroot} %attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl %endif -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - ################################################################################ %changelog -* Thu Nov 18 2021 Anton Novojilov - 3.1.4-0 -- Updated to the latest stable version - -* Fri Mar 26 2021 Anton Novojilov - 3.1.1-1 -- Updated for compatibility with other major versions - -* Sat Feb 20 2021 Anton Novojilov - 3.1.1-0 -- Initial build for kaos-repo +* Thu Sep 21 2023 Anton Novojilov - 3.1.9-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.1.9/NEWS diff --git a/specs/postgresql-10/postgis32.spec b/specs/postgresql-10/postgis32.spec new file mode 100644 index 000000000..5e046be2e --- /dev/null +++ b/specs/postgresql-10/postgis32.spec @@ -0,0 +1,267 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.2 +%define lib_ver 3 +%define pg_ver 10 +%define pg_low_fullver %{pg_ver}.23 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}32 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.2.5 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +%else +BuildRequires: gcc-c++ +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}33 %{realname}34 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp +chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql +chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql + +mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ + %{buildroot}%{pg_dir}/bin/shp2pgsql \ + %{buildroot}%{pg_dir}/bin/raster2pgsql \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.2.5-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.2.5/NEWS diff --git a/specs/postgresql-11/postgis25.spec b/specs/postgresql-11/postgis25.spec deleted file mode 100644 index df471ee79..000000000 --- a/specs/postgresql-11/postgis25.spec +++ /dev/null @@ -1,347 +0,0 @@ -################################################################################ - -%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd - -################################################################################ - -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - -%{!?utils:%define utils 1} -%{!?raster:%define raster 1} - -%define maj_ver 2.5 -%define pg_maj_ver 11 -%define pg_low_fullver 11.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}25 - -%define __perl_requires filter-requires-perl-Pg.sh - -################################################################################ - -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{realname}25_%{pg_maj_ver} -Version: 2.5.5 -Release: 1%{?dist} -License: GPLv2+ -Group: Applications/Databases -URL: https://www.postgis.net - -Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh - -Source100: checksum.sha512 - -Patch0: %{fullname}-gdalfpic.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} - -BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel -BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel -BuildRequires: devtoolset-3-gcc-c++ devtoolset-3-libstdc++-devel -BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 - -%if %raster -BuildRequires: gdal-devel >= 1.9.0 -Requires: gdal >= 1.9.0 -%endif - -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} - -Requires(post): %{_sbindir}/update-alternatives - -Conflicts: %{realname}24 -Conflicts: %{realname}2 - -Provides: %{realname} = %{version}-%{release} - -################################################################################ - -%description -PostGIS adds support for geographic objects to the PostgreSQL object-relational -database. In effect, PostGIS "spatially enables" the PostgreSQL server, -allowing it to be used as a backend spatial database for geographic information -systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS -follows the OpenGIS "Simple Features Specification for SQL" and has been -certified as compliant with the "Types and Functions" profile. - -################################################################################ - -%package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} - -%description client -The postgis-client package contains the client tools and their libraries -of PostGIS. - -################################################################################ - -%package devel -Summary: Development headers and libraries for PostGIS -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -The postgis-devel package contains the header files and libraries -needed to compile C or C++ applications which will directly interact -with PostGIS. - -################################################################################ - -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - -%package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} - -%description scripts -This package postgis-scripts contains the SQL scripts for installing PostGIS -in a PostgreSQL database, and for upgrading from earlier PostGIS versions. - -################################################################################ - -%if %utils -%package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg - -%description utils -The postgis-utils package provides the utilities for PostGIS. -%endif - -################################################################################ - -%prep -%{crc_check} - -%setup -qn %{realname}-%{version} - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - -%patch0 -p0 - -%build -# We need the below for GDAL -export LD_LIBRARY_PATH=%{pg_dir}/lib - -# perfecto:ignore -export CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang -export LLVM_CONFIG=%{_libdir}/llvm5.0/bin/llvm-config - -# Use gcc and gcc-c++ from devtoolset -export PATH="/opt/rh/devtoolset-3/root/usr/bin:$PATH" - -%configure --with-pgconfig=%{pg_dir}/bin/pg_config \ -%if !%raster - --without-raster \ -%endif - --disable-rpath \ - --libdir=%{pg_dir}/lib - -%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" -%{__make} -C extensions - -%if %utils -%{__make} -C utils -%endif - -%install -rm -rf %{buildroot} - -%{make_install} -%{make_install} -C extensions - -mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} - -chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp -chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql -chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql - -mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ - %{buildroot}%{pg_dir}/bin/shp2pgsql \ - %{buildroot}%{pg_dir}/bin/raster2pgsql \ - %{buildroot}%{pg_dir}/bin/%{pkgname}/ - -%if %utils -install -dm 755 %{buildroot}%{_datadir}/%{name} -install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} -%endif - -%post -%{__ldconfig} - -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 - -%postun -%{__ldconfig} - -if [[ $1 -eq 0 ]] ; then - # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql -fi - -%clean -rm -rf %{buildroot} - -################################################################################ - -%files -%defattr(-,root,root) -%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt -%{pg_dir}/lib/address_standardizer.so -%{pg_dir}/lib/postgis-%{maj_ver}.so -%{pg_dir}/lib/postgis_topology-%{maj_ver}.so -%{pg_dir}/lib/liblwgeom.so -%{pg_dir}/lib/liblwgeom-%{maj_ver}.so.0 -%{pg_dir}/lib/liblwgeom-%{maj_ver}.so.0.0.0 -%if %raster -%{pg_dir}/lib/rtpostgis-%{maj_ver}.so -%endif -%{pg_dir}/lib/bitcode/* - -%files client -%defattr(755,root,root) -%{pg_dir}/bin/%{pkgname}/pgsql2shp -%{pg_dir}/bin/%{pkgname}/raster2pgsql -%{pg_dir}/bin/%{pkgname}/shp2pgsql - -%files devel -%defattr(644,root,root) -%{_includedir}/liblwgeom.h -%{_includedir}/liblwgeom_topo.h -%{pg_dir}/lib/liblwgeom*.a -%{pg_dir}/lib/liblwgeom*.la - -%files scripts -%defattr(644,root,root) -%{pg_dir}/share/contrib/%{pkgname}/legacy.sql -%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql -%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_proc_set_search_path.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl -%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql -%{pg_dir}/share/contrib/%{pkgname}/topology.sql -%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql -%{pg_dir}/share/extension/address_standardizer*.control -%{pg_dir}/share/extension/address_standardizer*.sql -%{pg_dir}/share/extension/postgis*.control -%{pg_dir}/share/extension/postgis*.sql -%if %raster -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_proc_set_search_path.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql -%endif - -%if %utils -%files utils -%defattr(-,root,root) -%doc utils/README -%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl -%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl -%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl -%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_set_search_path.pl -%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_upgrade.pl -%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl -%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl -%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl -%attr(755,root,root) %{_datadir}/%{name}/svn_repo_revision.pl -%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl -%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl -%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl -%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl -%endif - -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - -################################################################################ - -%changelog -* Fri Mar 26 2021 Anton Novojilov - 2.5.5-1 -- Updated for compatibility with other major versions - -* Sun Feb 21 2021 Anton Novojilov - 2.5.5-0 -- Updated to the latest stable release - -* Mon Jan 20 2020 Anton Novojilov - 2.5.3-0 -- Updated to the latest stable release - -* Fri Oct 25 2019 Anton Novojilov - 2.5.0-0 -- Initial build diff --git a/specs/postgresql-11/postgis30.spec b/specs/postgresql-11/postgis30.spec index 905fd16b7..3ff14418f 100644 --- a/specs/postgresql-11/postgis30.spec +++ b/specs/postgresql-11/postgis30.spec @@ -4,98 +4,70 @@ ################################################################################ -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - %{!?utils:%define utils 1} %{!?raster:%define raster 1} -%define maj_ver 3.0 -%define lib_ver 3 -%define pg_maj_ver 11 -%define pg_low_fullver 11.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define gdal_dir %{_prefix}/gdal3 -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}30 +################################################################################ + +%define maj_ver 3.0 +%define lib_ver 3 +%define pg_ver 11 +%define pg_low_fullver %{pg_ver}.18 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}30 %define __perl_requires filter-requires-perl-Pg.sh ################################################################################ -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{fullname}_%{pg_maj_ver} -Version: 3.0.4 +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.0.9 Release: 0%{?dist} License: GPLv2+ Group: Applications/Databases URL: https://www.postgis.net Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh +Source1: filter-requires-perl-Pg.sh Source100: checksum.sha512 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif %if %raster +%if 0%{?rhel} == 7 BuildRequires: gdal3-devel -Requires: gdal3 +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif %endif -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} -Requires(post): %{_sbindir}/update-alternatives +Requires(post): update-alternatives -Conflicts: %{realname}31 +Conflicts: %{realname}31 %{realname}32 %{realname}33 %{realname}34 Provides: %{realname} = %{version}-%{release} @@ -112,9 +84,10 @@ certified as compliant with the "Types and Functions" profile. ################################################################################ %package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description client The postgis-client package contains the client tools and their libraries @@ -122,19 +95,11 @@ of PostGIS. ################################################################################ -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - %package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description scripts This package postgis-scripts contains the SQL scripts for installing PostGIS @@ -144,9 +109,10 @@ in a PostgreSQL database, and for upgrading from earlier PostGIS versions. %if %utils %package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg %description utils The postgis-utils package provides the utilities for PostGIS. @@ -159,29 +125,18 @@ The postgis-utils package provides the utilities for PostGIS. %setup -qn %{realname}-%{version} -if %{__ldconfig} -p | grep -q 'gdal.so.1' ; then - echo "!! GDAL 1.x is installed. Please remove package before build. !!" - exit 1 -fi - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - %build # We need the below for GDAL export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" -# perfecto:ignore -export CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang -export LLVM_CONFIG=%{_libdir}/llvm5.0/bin/llvm-config - -# Use gcc and gcc-c++ from devtoolset +%if 0%{?rhel} == 7 export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" -export LIBGDAL_CFLAGS="" +%endif %configure \ --with-pgconfig=%{pg_dir}/bin/pg_config \ - --with-gdalconfig=%{gdal_dir}/bin/gdal-config \ + --with-gdalconfig=%{_bindir}/gdal-config \ %if !%raster --without-raster \ %endif @@ -201,6 +156,8 @@ rm -rf %{buildroot} %{make_install} %{make_install} -C extensions +rm -rf %{buildroot}%{pg_dir}/doc + mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp @@ -218,20 +175,20 @@ install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} %endif %post -%{__ldconfig} +/sbin/ldconfig -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 %postun -%{__ldconfig} +/sbin/ldconfig if [[ $1 -eq 0 ]] ; then # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql fi %clean @@ -248,16 +205,15 @@ rm -rf %{buildroot} %if %raster %{pg_dir}/lib/postgis_raster-%{lib_ver}.so %endif -%{pg_dir}/lib/bitcode/* %files client -%defattr(755,root,root) +%defattr(-,root,root) %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %files scripts -%defattr(644,root,root) +%defattr(-,root,root) %{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql %{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql %{pg_dir}/share/contrib/%{pkgname}/legacy.sql @@ -286,6 +242,7 @@ rm -rf %{buildroot} %{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql %{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql %endif +%{pg_dir}/lib/bitcode/* %if %utils %files utils @@ -307,19 +264,8 @@ rm -rf %{buildroot} %attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl %endif -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - ################################################################################ %changelog -* Thu Nov 18 2021 Anton Novojilov - 3.0.4-0 -- Updated to the latest stable version - -* Fri Mar 26 2021 Anton Novojilov - 3.0.3-1 -- Updated for compatibility with other major versions - -* Sat Feb 20 2021 Anton Novojilov - 3.0.3-0 -- Initial build for kaos-repo +* Thu Sep 21 2023 Anton Novojilov - 3.0.9-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.0.9/NEWS diff --git a/specs/postgresql-11/postgis31.spec b/specs/postgresql-11/postgis31.spec index 35332cb47..d23329e50 100644 --- a/specs/postgresql-11/postgis31.spec +++ b/specs/postgresql-11/postgis31.spec @@ -4,98 +4,70 @@ ################################################################################ -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - %{!?utils:%define utils 1} %{!?raster:%define raster 1} -%define maj_ver 3.1 -%define lib_ver 3 -%define pg_maj_ver 11 -%define pg_low_fullver 11.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define gdal_dir %{_prefix}/gdal3 -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}31 +################################################################################ + +%define maj_ver 3.1 +%define lib_ver 3 +%define pg_ver 11 +%define pg_low_fullver %{pg_ver}.18 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}31 %define __perl_requires filter-requires-perl-Pg.sh ################################################################################ -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{fullname}_%{pg_maj_ver} -Version: 3.1.4 +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.1.9 Release: 0%{?dist} License: GPLv2+ Group: Applications/Databases URL: https://www.postgis.net Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh +Source1: filter-requires-perl-Pg.sh Source100: checksum.sha512 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif %if %raster +%if 0%{?rhel} == 7 BuildRequires: gdal3-devel -Requires: gdal3 +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif %endif -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} -Requires(post): %{_sbindir}/update-alternatives +Requires(post): update-alternatives -Conflicts: %{realname}30 +Conflicts: %{realname}30 %{realname}32 %{realname}33 %{realname}34 Provides: %{realname} = %{version}-%{release} @@ -112,9 +84,10 @@ certified as compliant with the "Types and Functions" profile. ################################################################################ %package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description client The postgis-client package contains the client tools and their libraries @@ -122,19 +95,11 @@ of PostGIS. ################################################################################ -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - %package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description scripts This package postgis-scripts contains the SQL scripts for installing PostGIS @@ -144,9 +109,10 @@ in a PostgreSQL database, and for upgrading from earlier PostGIS versions. %if %utils %package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg %description utils The postgis-utils package provides the utilities for PostGIS. @@ -159,29 +125,18 @@ The postgis-utils package provides the utilities for PostGIS. %setup -qn %{realname}-%{version} -if %{__ldconfig} -p | grep -q 'gdal.so.1' ; then - echo "!! GDAL 1.x is installed. Please remove package before build. !!" - exit 1 -fi - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - %build # We need the below for GDAL export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" -# perfecto:ignore -export CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang -export LLVM_CONFIG=%{_libdir}/llvm5.0/bin/llvm-config - -# Use gcc and gcc-c++ from devtoolset +%if 0%{?rhel} == 7 export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" -export LIBGDAL_CFLAGS="" +%endif %configure \ --with-pgconfig=%{pg_dir}/bin/pg_config \ - --with-gdalconfig=%{gdal_dir}/bin/gdal-config \ + --with-gdalconfig=%{_bindir}/gdal-config \ %if !%raster --without-raster \ %endif @@ -202,6 +157,8 @@ rm -rf %{buildroot} %{make_install} %{make_install} -C extensions +rm -rf %{buildroot}%{pg_dir}/doc + mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp @@ -219,20 +176,20 @@ install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} %endif %post -%{__ldconfig} +/sbin/ldconfig -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 %postun -%{__ldconfig} +/sbin/ldconfig if [[ $1 -eq 0 ]] ; then # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql fi %clean @@ -249,16 +206,15 @@ rm -rf %{buildroot} %if %raster %{pg_dir}/lib/postgis_raster-%{lib_ver}.so %endif -%{pg_dir}/lib/bitcode/* %files client -%defattr(755,root,root) +%defattr(-,root,root) %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %files scripts -%defattr(644,root,root) +%defattr(-,root,root) %{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql %{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql %{pg_dir}/share/contrib/%{pkgname}/legacy.sql @@ -285,6 +241,7 @@ rm -rf %{buildroot} %{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql %{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql %endif +%{pg_dir}/lib/bitcode/* %if %utils %files utils @@ -305,19 +262,8 @@ rm -rf %{buildroot} %attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl %endif -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - ################################################################################ %changelog -* Thu Nov 18 2021 Anton Novojilov - 3.1.4-0 -- Updated to the latest stable version - -* Fri Mar 26 2021 Anton Novojilov - 3.1.1-1 -- Updated for compatibility with other major versions - -* Sat Feb 20 2021 Anton Novojilov - 3.1.1-0 -- Initial build for kaos-repo +* Thu Sep 21 2023 Anton Novojilov - 3.1.9-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.1.9/NEWS diff --git a/specs/postgresql-11/postgis32.spec b/specs/postgresql-11/postgis32.spec new file mode 100644 index 000000000..660b14ee9 --- /dev/null +++ b/specs/postgresql-11/postgis32.spec @@ -0,0 +1,269 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.2 +%define lib_ver 3 +%define pg_ver 11 +%define pg_low_fullver %{pg_ver}.18 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}32 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.2.5 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}33 %{realname}34 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp +chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql +chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql + +mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ + %{buildroot}%{pg_dir}/bin/shp2pgsql \ + %{buildroot}%{pg_dir}/bin/raster2pgsql \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.2.5-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.2.5/NEWS diff --git a/specs/postgresql-11/postgis33.spec b/specs/postgresql-11/postgis33.spec new file mode 100644 index 000000000..f72e4265a --- /dev/null +++ b/specs/postgresql-11/postgis33.spec @@ -0,0 +1,278 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.3 +%define lib_ver 3 +%define pg_ver 11 +%define pg_low_fullver %{pg_ver}.18 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}33 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.3.4 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}32 %{realname}34 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp +chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql +chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql + +mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ + %{buildroot}%{pg_dir}/bin/pgtopo_export \ + %{buildroot}%{pg_dir}/bin/pgtopo_import \ + %{buildroot}%{pg_dir}/bin/raster2pgsql \ + %{buildroot}%{pg_dir}/bin/shp2pgsql \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_export postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_import postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export + update-alternatives --remove postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/pgtopo_export +%{pg_dir}/bin/%{pkgname}/pgtopo_import +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_or_replace_to_create.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/create_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.3.4-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.3.4/NEWS diff --git a/specs/postgresql-12/postgis25.spec b/specs/postgresql-12/postgis25.spec deleted file mode 100644 index 1a8ea6b17..000000000 --- a/specs/postgresql-12/postgis25.spec +++ /dev/null @@ -1,347 +0,0 @@ -################################################################################ - -%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd - -################################################################################ - -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - -%{!?utils:%define utils 1} -%{!?raster:%define raster 1} - -%define maj_ver 2.5 -%define pg_maj_ver 12 -%define pg_low_fullver 12.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}25 - -%define __perl_requires filter-requires-perl-Pg.sh - -################################################################################ - -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{realname}25_%{pg_maj_ver} -Version: 2.5.5 -Release: 1%{?dist} -License: GPLv2+ -Group: Applications/Databases -URL: https://www.postgis.net - -Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh - -Source100: checksum.sha512 - -Patch0: %{fullname}-gdalfpic.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} - -BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel -BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel -BuildRequires: devtoolset-3-gcc-c++ devtoolset-3-libstdc++-devel -BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 - -%if %raster -BuildRequires: gdal-devel >= 1.9.0 -Requires: gdal >= 1.9.0 -%endif - -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} - -Requires(post): %{_sbindir}/update-alternatives - -Conflicts: %{realname}24 -Conflicts: %{realname}2 - -Provides: %{realname} = %{version}-%{release} - -################################################################################ - -%description -PostGIS adds support for geographic objects to the PostgreSQL object-relational -database. In effect, PostGIS "spatially enables" the PostgreSQL server, -allowing it to be used as a backend spatial database for geographic information -systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS -follows the OpenGIS "Simple Features Specification for SQL" and has been -certified as compliant with the "Types and Functions" profile. - -################################################################################ - -%package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} - -%description client -The postgis-client package contains the client tools and their libraries -of PostGIS. - -################################################################################ - -%package devel -Summary: Development headers and libraries for PostGIS -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -The postgis-devel package contains the header files and libraries -needed to compile C or C++ applications which will directly interact -with PostGIS. - -################################################################################ - -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - -%package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} - -%description scripts -This package postgis-scripts contains the SQL scripts for installing PostGIS -in a PostgreSQL database, and for upgrading from earlier PostGIS versions. - -################################################################################ - -%if %utils -%package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg - -%description utils -The postgis-utils package provides the utilities for PostGIS. -%endif - -################################################################################ - -%prep -%{crc_check} - -%setup -qn %{realname}-%{version} - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - -%patch0 -p0 - -%build -# We need the below for GDAL -export LD_LIBRARY_PATH=%{pg_dir}/lib - -# perfecto:ignore -export CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang -export LLVM_CONFIG=%{_libdir}/llvm5.0/bin/llvm-config - -# Use gcc and gcc-c++ from devtoolset -export PATH="/opt/rh/devtoolset-3/root/usr/bin:$PATH" - -%configure --with-pgconfig=%{pg_dir}/bin/pg_config \ -%if !%raster - --without-raster \ -%endif - --disable-rpath \ - --libdir=%{pg_dir}/lib - -%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" -%{__make} -C extensions - -%if %utils -%{__make} -C utils -%endif - -%install -rm -rf %{buildroot} - -%{make_install} -%{make_install} -C extensions - -mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} - -chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp -chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql -chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql - -mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ - %{buildroot}%{pg_dir}/bin/shp2pgsql \ - %{buildroot}%{pg_dir}/bin/raster2pgsql \ - %{buildroot}%{pg_dir}/bin/%{pkgname}/ - -%if %utils -install -dm 755 %{buildroot}%{_datadir}/%{name} -install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} -%endif - -%post -%{__ldconfig} - -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 - -%postun -%{__ldconfig} - -if [[ $1 -eq 0 ]] ; then - # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql -fi - -%clean -rm -rf %{buildroot} - -################################################################################ - -%files -%defattr(-,root,root) -%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt -%{pg_dir}/lib/address_standardizer.so -%{pg_dir}/lib/postgis-%{maj_ver}.so -%{pg_dir}/lib/postgis_topology-%{maj_ver}.so -%{pg_dir}/lib/liblwgeom.so -%{pg_dir}/lib/liblwgeom-%{maj_ver}.so.0 -%{pg_dir}/lib/liblwgeom-%{maj_ver}.so.0.0.0 -%if %raster -%{pg_dir}/lib/rtpostgis-%{maj_ver}.so -%endif -%{pg_dir}/lib/bitcode/* - -%files client -%defattr(755,root,root) -%{pg_dir}/bin/%{pkgname}/pgsql2shp -%{pg_dir}/bin/%{pkgname}/raster2pgsql -%{pg_dir}/bin/%{pkgname}/shp2pgsql - -%files devel -%defattr(644,root,root) -%{_includedir}/liblwgeom.h -%{_includedir}/liblwgeom_topo.h -%{pg_dir}/lib/liblwgeom*.a -%{pg_dir}/lib/liblwgeom*.la - -%files scripts -%defattr(644,root,root) -%{pg_dir}/share/contrib/%{pkgname}/legacy.sql -%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql -%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_proc_set_search_path.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl -%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql -%{pg_dir}/share/contrib/%{pkgname}/topology.sql -%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql -%{pg_dir}/share/extension/address_standardizer*.control -%{pg_dir}/share/extension/address_standardizer*.sql -%{pg_dir}/share/extension/postgis*.control -%{pg_dir}/share/extension/postgis*.sql -%if %raster -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_proc_set_search_path.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade_for_extension.sql -%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql -%endif - -%if %utils -%files utils -%defattr(-,root,root) -%doc utils/README -%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl -%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl -%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl -%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_set_search_path.pl -%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_upgrade.pl -%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl -%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl -%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl -%attr(755,root,root) %{_datadir}/%{name}/svn_repo_revision.pl -%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl -%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl -%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl -%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl -%endif - -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - -################################################################################ - -%changelog -* Fri Mar 26 2021 Anton Novojilov - 2.5.5-1 -- Updated for compatibility with other major versions - -* Sun Feb 21 2021 Anton Novojilov - 2.5.5-0 -- Updated to the latest stable release - -* Mon Jan 20 2020 Anton Novojilov - 2.5.3-0 -- Updated to the latest stable release - -* Fri Oct 25 2019 Anton Novojilov - 2.5.0-0 -- Initial build diff --git a/specs/postgresql-12/postgis30.spec b/specs/postgresql-12/postgis30.spec index 34ce1b9d3..bc2ebe2c7 100644 --- a/specs/postgresql-12/postgis30.spec +++ b/specs/postgresql-12/postgis30.spec @@ -4,98 +4,70 @@ ################################################################################ -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - %{!?utils:%define utils 1} %{!?raster:%define raster 1} -%define maj_ver 3.0 -%define lib_ver 3 -%define pg_maj_ver 12 -%define pg_low_fullver 12.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define gdal_dir %{_prefix}/gdal3 -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}30 +################################################################################ + +%define maj_ver 3.0 +%define lib_ver 3 +%define pg_ver 12 +%define pg_low_fullver %{pg_ver}.13 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}30 %define __perl_requires filter-requires-perl-Pg.sh ################################################################################ -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{fullname}_%{pg_maj_ver} -Version: 3.0.4 +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.0.9 Release: 0%{?dist} License: GPLv2+ Group: Applications/Databases URL: https://www.postgis.net Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh +Source1: filter-requires-perl-Pg.sh Source100: checksum.sha512 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif %if %raster +%if 0%{?rhel} == 7 BuildRequires: gdal3-devel -Requires: gdal3 +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif %endif -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} -Requires(post): %{_sbindir}/update-alternatives +Requires(post): update-alternatives -Conflicts: %{realname}31 +Conflicts: %{realname}31 %{realname}32 %{realname}33 %{realname}34 Provides: %{realname} = %{version}-%{release} @@ -112,9 +84,10 @@ certified as compliant with the "Types and Functions" profile. ################################################################################ %package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description client The postgis-client package contains the client tools and their libraries @@ -122,19 +95,11 @@ of PostGIS. ################################################################################ -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - %package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description scripts This package postgis-scripts contains the SQL scripts for installing PostGIS @@ -144,9 +109,10 @@ in a PostgreSQL database, and for upgrading from earlier PostGIS versions. %if %utils %package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg %description utils The postgis-utils package provides the utilities for PostGIS. @@ -159,29 +125,18 @@ The postgis-utils package provides the utilities for PostGIS. %setup -qn %{realname}-%{version} -if %{__ldconfig} -p | grep -q 'gdal.so.1' ; then - echo "!! GDAL 1.x is installed. Please remove package before build. !!" - exit 1 -fi - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - %build # We need the below for GDAL export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" -# perfecto:ignore -export CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang -export LLVM_CONFIG=%{_libdir}/llvm5.0/bin/llvm-config - -# Use gcc and gcc-c++ from devtoolset +%if 0%{?rhel} == 7 export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" -export LIBGDAL_CFLAGS="" +%endif %configure \ --with-pgconfig=%{pg_dir}/bin/pg_config \ - --with-gdalconfig=%{gdal_dir}/bin/gdal-config \ + --with-gdalconfig=%{_bindir}/gdal-config \ %if !%raster --without-raster \ %endif @@ -201,6 +156,8 @@ rm -rf %{buildroot} %{make_install} %{make_install} -C extensions +rm -rf %{buildroot}%{pg_dir}/doc + mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp @@ -218,20 +175,20 @@ install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} %endif %post -%{__ldconfig} +/sbin/ldconfig -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 %postun -%{__ldconfig} +/sbin/ldconfig if [[ $1 -eq 0 ]] ; then # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql fi %clean @@ -248,16 +205,15 @@ rm -rf %{buildroot} %if %raster %{pg_dir}/lib/postgis_raster-%{lib_ver}.so %endif -%{pg_dir}/lib/bitcode/* %files client -%defattr(755,root,root) +%defattr(-,root,root) %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %files scripts -%defattr(644,root,root) +%defattr(-,root,root) %{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql %{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql %{pg_dir}/share/contrib/%{pkgname}/legacy.sql @@ -286,6 +242,7 @@ rm -rf %{buildroot} %{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql %{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql %endif +%{pg_dir}/lib/bitcode/* %if %utils %files utils @@ -307,19 +264,8 @@ rm -rf %{buildroot} %attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl %endif -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - ################################################################################ %changelog -* Thu Nov 18 2021 Anton Novojilov - 3.0.4-0 -- Updated to the latest stable version - -* Fri Mar 26 2021 Anton Novojilov - 3.0.3-1 -- Updated for compatibility with other major versions - -* Sat Feb 20 2021 Anton Novojilov - 3.0.3-0 -- Initial build for kaos-repo +* Thu Sep 21 2023 Anton Novojilov - 3.0.9-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.0.9/NEWS diff --git a/specs/postgresql-12/postgis31.spec b/specs/postgresql-12/postgis31.spec index b71e976fb..3735a416c 100644 --- a/specs/postgresql-12/postgis31.spec +++ b/specs/postgresql-12/postgis31.spec @@ -4,98 +4,70 @@ ################################################################################ -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - %{!?utils:%define utils 1} %{!?raster:%define raster 1} -%define maj_ver 3.1 -%define lib_ver 3 -%define pg_maj_ver 12 -%define pg_low_fullver 12.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define gdal_dir %{_prefix}/gdal3 -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}31 +################################################################################ + +%define maj_ver 3.1 +%define lib_ver 3 +%define pg_ver 12 +%define pg_low_fullver %{pg_ver}.13 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}31 %define __perl_requires filter-requires-perl-Pg.sh ################################################################################ -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{fullname}_%{pg_maj_ver} -Version: 3.1.4 +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.1.9 Release: 0%{?dist} License: GPLv2+ Group: Applications/Databases URL: https://www.postgis.net Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh +Source1: filter-requires-perl-Pg.sh Source100: checksum.sha512 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif %if %raster +%if 0%{?rhel} == 7 BuildRequires: gdal3-devel -Requires: gdal3 +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif %endif -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} -Requires(post): %{_sbindir}/update-alternatives +Requires(post): update-alternatives -Conflicts: %{realname}30 +Conflicts: %{realname}30 %{realname}32 %{realname}33 %{realname}34 Provides: %{realname} = %{version}-%{release} @@ -112,9 +84,10 @@ certified as compliant with the "Types and Functions" profile. ################################################################################ %package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description client The postgis-client package contains the client tools and their libraries @@ -122,19 +95,11 @@ of PostGIS. ################################################################################ -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - %package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description scripts This package postgis-scripts contains the SQL scripts for installing PostGIS @@ -144,9 +109,10 @@ in a PostgreSQL database, and for upgrading from earlier PostGIS versions. %if %utils %package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg %description utils The postgis-utils package provides the utilities for PostGIS. @@ -159,29 +125,18 @@ The postgis-utils package provides the utilities for PostGIS. %setup -qn %{realname}-%{version} -if %{__ldconfig} -p | grep -q 'gdal.so.1' ; then - echo "!! GDAL 1.x is installed. Please remove package before build. !!" - exit 1 -fi - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - %build # We need the below for GDAL export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" -# perfecto:ignore -export CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang -export LLVM_CONFIG=%{_libdir}/llvm5.0/bin/llvm-config - -# Use gcc and gcc-c++ from devtoolset +%if 0%{?rhel} == 7 export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" -export LIBGDAL_CFLAGS="" +%endif %configure \ --with-pgconfig=%{pg_dir}/bin/pg_config \ - --with-gdalconfig=%{gdal_dir}/bin/gdal-config \ + --with-gdalconfig=%{_bindir}/gdal-config \ %if !%raster --without-raster \ %endif @@ -202,6 +157,8 @@ rm -rf %{buildroot} %{make_install} %{make_install} -C extensions +rm -rf %{buildroot}%{pg_dir}/doc + mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp @@ -219,20 +176,20 @@ install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} %endif %post -%{__ldconfig} +/sbin/ldconfig -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 %postun -%{__ldconfig} +/sbin/ldconfig if [[ $1 -eq 0 ]] ; then # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql fi %clean @@ -249,16 +206,15 @@ rm -rf %{buildroot} %if %raster %{pg_dir}/lib/postgis_raster-%{lib_ver}.so %endif -%{pg_dir}/lib/bitcode/* %files client -%defattr(755,root,root) +%defattr(-,root,root) %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %files scripts -%defattr(644,root,root) +%defattr(-,root,root) %{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql %{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql %{pg_dir}/share/contrib/%{pkgname}/legacy.sql @@ -285,6 +241,7 @@ rm -rf %{buildroot} %{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql %{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql %endif +%{pg_dir}/lib/bitcode/* %if %utils %files utils @@ -305,19 +262,8 @@ rm -rf %{buildroot} %attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl %endif -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - ################################################################################ %changelog -* Thu Nov 18 2021 Anton Novojilov - 3.1.4-0 -- Updated to the latest stable version - -* Fri Mar 26 2021 Anton Novojilov - 3.1.1-1 -- Updated for compatibility with other major versions - -* Sat Feb 20 2021 Anton Novojilov - 3.1.1-0 -- Initial build for kaos-repo +* Thu Sep 21 2023 Anton Novojilov - 3.1.9-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.1.9/NEWS diff --git a/specs/postgresql-12/postgis32.spec b/specs/postgresql-12/postgis32.spec new file mode 100644 index 000000000..19c6f6c10 --- /dev/null +++ b/specs/postgresql-12/postgis32.spec @@ -0,0 +1,269 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.2 +%define lib_ver 3 +%define pg_ver 12 +%define pg_low_fullver %{pg_ver}.13 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}32 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.2.5 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}33 %{realname}34 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp +chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql +chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql + +mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ + %{buildroot}%{pg_dir}/bin/shp2pgsql \ + %{buildroot}%{pg_dir}/bin/raster2pgsql \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.2.5-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.2.5/NEWS diff --git a/specs/postgresql-12/postgis33.spec b/specs/postgresql-12/postgis33.spec new file mode 100644 index 000000000..7e4d83e12 --- /dev/null +++ b/specs/postgresql-12/postgis33.spec @@ -0,0 +1,278 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.3 +%define lib_ver 3 +%define pg_ver 12 +%define pg_low_fullver %{pg_ver}.13 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}33 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.3.4 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}32 %{realname}34 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp +chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql +chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql + +mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ + %{buildroot}%{pg_dir}/bin/pgtopo_export \ + %{buildroot}%{pg_dir}/bin/pgtopo_import \ + %{buildroot}%{pg_dir}/bin/raster2pgsql \ + %{buildroot}%{pg_dir}/bin/shp2pgsql \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_export postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_import postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export + update-alternatives --remove postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/pgtopo_export +%{pg_dir}/bin/%{pkgname}/pgtopo_import +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_or_replace_to_create.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/create_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.3.4-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.3.4/NEWS diff --git a/specs/postgresql-12/postgis34.spec b/specs/postgresql-12/postgis34.spec new file mode 100644 index 000000000..77b1c1f47 --- /dev/null +++ b/specs/postgresql-12/postgis34.spec @@ -0,0 +1,281 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.4 +%define lib_ver 3 +%define pg_ver 12 +%define pg_low_fullver %{pg_ver}.13 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}34 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.4.0 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}32 %{realname}33 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{_bindir}/pgsql2shp +chrpath --delete %{buildroot}%{_bindir}/raster2pgsql +chrpath --delete %{buildroot}%{_bindir}/shp2pgsql + +mv %{buildroot}%{_bindir}/* \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_export postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_import postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import %{pg_ver}0 +update-alternatives --install %{_bindir}/postgis postgis-postgis %{pg_dir}/bin/%{pkgname}/postgis %{pg_ver}0 +update-alternatives --install %{_bindir}/postgis_restore postgis-postgis_restore %{pg_dir}/bin/%{pkgname}/postgis_restore %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export + update-alternatives --remove postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import + update-alternatives --remove postgis-postgis %{pg_dir}/bin/%{pkgname}/postgis + update-alternatives --remove postgis-postgis_restore %{pg_dir}/bin/%{pkgname}/postgis_restore + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif +%{_mandir}/man1/* + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/pgtopo_export +%{pg_dir}/bin/%{pkgname}/pgtopo_import +%{pg_dir}/bin/%{pkgname}/postgis +%{pg_dir}/bin/%{pkgname}/postgis_restore +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_or_replace_to_create.pl +%attr(755,root,root) %{_datadir}/%{name}/create_skip_signatures.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_uninstall.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/create_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.4.0-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.4.0/NEWS diff --git a/specs/postgresql-13/postgis31.spec b/specs/postgresql-13/postgis31.spec index b171c235e..4ce4361dc 100644 --- a/specs/postgresql-13/postgis31.spec +++ b/specs/postgresql-13/postgis31.spec @@ -4,98 +4,70 @@ ################################################################################ -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - %{!?utils:%define utils 1} %{!?raster:%define raster 1} -%define maj_ver 3.1 -%define lib_ver 3 -%define pg_maj_ver 13 -%define pg_low_fullver 13.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define gdal_dir %{_prefix}/gdal3 -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}31 +################################################################################ + +%define maj_ver 3.1 +%define lib_ver 3 +%define pg_ver 13 +%define pg_low_fullver %{pg_ver}.9 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}31 %define __perl_requires filter-requires-perl-Pg.sh ################################################################################ -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{fullname}_%{pg_maj_ver} -Version: 3.1.4 +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.1.9 Release: 0%{?dist} License: GPLv2+ Group: Applications/Databases URL: https://www.postgis.net Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh +Source1: filter-requires-perl-Pg.sh Source100: checksum.sha512 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif %if %raster +%if 0%{?rhel} == 7 BuildRequires: gdal3-devel -Requires: gdal3 +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif %endif -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} -Requires(post): %{_sbindir}/update-alternatives +Requires(post): update-alternatives -Conflicts: %{realname}30 +Conflicts: %{realname}30 %{realname}32 %{realname}33 %{realname}34 Provides: %{realname} = %{version}-%{release} @@ -112,9 +84,10 @@ certified as compliant with the "Types and Functions" profile. ################################################################################ %package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description client The postgis-client package contains the client tools and their libraries @@ -122,19 +95,11 @@ of PostGIS. ################################################################################ -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - %package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description scripts This package postgis-scripts contains the SQL scripts for installing PostGIS @@ -144,9 +109,10 @@ in a PostgreSQL database, and for upgrading from earlier PostGIS versions. %if %utils %package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg %description utils The postgis-utils package provides the utilities for PostGIS. @@ -159,29 +125,18 @@ The postgis-utils package provides the utilities for PostGIS. %setup -qn %{realname}-%{version} -if %{__ldconfig} -p | grep -q 'gdal.so.1' ; then - echo "!! GDAL 1.x is installed. Please remove package before build. !!" - exit 1 -fi - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - %build # We need the below for GDAL export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" -# perfecto:ignore -export CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang -export LLVM_CONFIG=%{_libdir}/llvm5.0/bin/llvm-config - -# Use gcc and gcc-c++ from devtoolset +%if 0%{?rhel} == 7 export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" -export LIBGDAL_CFLAGS="" +%endif %configure \ --with-pgconfig=%{pg_dir}/bin/pg_config \ - --with-gdalconfig=%{gdal_dir}/bin/gdal-config \ + --with-gdalconfig=%{_bindir}/gdal-config \ %if !%raster --without-raster \ %endif @@ -202,6 +157,8 @@ rm -rf %{buildroot} %{make_install} %{make_install} -C extensions +rm -rf %{buildroot}%{pg_dir}/doc + mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp @@ -219,20 +176,20 @@ install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} %endif %post -%{__ldconfig} +/sbin/ldconfig -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 %postun -%{__ldconfig} +/sbin/ldconfig if [[ $1 -eq 0 ]] ; then # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql fi %clean @@ -249,16 +206,15 @@ rm -rf %{buildroot} %if %raster %{pg_dir}/lib/postgis_raster-%{lib_ver}.so %endif -%{pg_dir}/lib/bitcode/* %files client -%defattr(755,root,root) +%defattr(-,root,root) %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %files scripts -%defattr(644,root,root) +%defattr(-,root,root) %{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql %{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql %{pg_dir}/share/contrib/%{pkgname}/legacy.sql @@ -285,6 +241,7 @@ rm -rf %{buildroot} %{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql %{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql %endif +%{pg_dir}/lib/bitcode/* %if %utils %files utils @@ -305,19 +262,8 @@ rm -rf %{buildroot} %attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl %endif -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - ################################################################################ %changelog -* Thu Nov 18 2021 Anton Novojilov - 3.1.4-0 -- Updated to the latest stable version - -* Fri Mar 26 2021 Anton Novojilov - 3.1.1-1 -- Updated for compatibility with other major versions - -* Sat Feb 20 2021 Anton Novojilov - 3.1.1-0 -- Initial build for kaos-repo +* Thu Sep 21 2023 Anton Novojilov - 3.1.9-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.1.9/NEWS diff --git a/specs/postgresql-13/postgis32.spec b/specs/postgresql-13/postgis32.spec new file mode 100644 index 000000000..a7977c09b --- /dev/null +++ b/specs/postgresql-13/postgis32.spec @@ -0,0 +1,269 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.2 +%define lib_ver 3 +%define pg_ver 13 +%define pg_low_fullver %{pg_ver}.9 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}32 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.2.5 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}33 %{realname}34 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp +chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql +chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql + +mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ + %{buildroot}%{pg_dir}/bin/shp2pgsql \ + %{buildroot}%{pg_dir}/bin/raster2pgsql \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.2.5-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.2.5/NEWS diff --git a/specs/postgresql-13/postgis33.spec b/specs/postgresql-13/postgis33.spec new file mode 100644 index 000000000..527754211 --- /dev/null +++ b/specs/postgresql-13/postgis33.spec @@ -0,0 +1,278 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.3 +%define lib_ver 3 +%define pg_ver 13 +%define pg_low_fullver %{pg_ver}.9 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}33 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.3.4 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}32 %{realname}34 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp +chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql +chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql + +mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ + %{buildroot}%{pg_dir}/bin/pgtopo_export \ + %{buildroot}%{pg_dir}/bin/pgtopo_import \ + %{buildroot}%{pg_dir}/bin/raster2pgsql \ + %{buildroot}%{pg_dir}/bin/shp2pgsql \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_export postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_import postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export + update-alternatives --remove postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/pgtopo_export +%{pg_dir}/bin/%{pkgname}/pgtopo_import +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_or_replace_to_create.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/create_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.3.4-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.3.4/NEWS diff --git a/specs/postgresql-13/postgis34.spec b/specs/postgresql-13/postgis34.spec new file mode 100644 index 000000000..5b24c3c4f --- /dev/null +++ b/specs/postgresql-13/postgis34.spec @@ -0,0 +1,281 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.4 +%define lib_ver 3 +%define pg_ver 13 +%define pg_low_fullver %{pg_ver}.9 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}34 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.4.0 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}32 %{realname}33 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{_bindir}/pgsql2shp +chrpath --delete %{buildroot}%{_bindir}/raster2pgsql +chrpath --delete %{buildroot}%{_bindir}/shp2pgsql + +mv %{buildroot}%{_bindir}/* \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_export postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_import postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import %{pg_ver}0 +update-alternatives --install %{_bindir}/postgis postgis-postgis %{pg_dir}/bin/%{pkgname}/postgis %{pg_ver}0 +update-alternatives --install %{_bindir}/postgis_restore postgis-postgis_restore %{pg_dir}/bin/%{pkgname}/postgis_restore %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export + update-alternatives --remove postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import + update-alternatives --remove postgis-postgis %{pg_dir}/bin/%{pkgname}/postgis + update-alternatives --remove postgis-postgis_restore %{pg_dir}/bin/%{pkgname}/postgis_restore + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif +%{_mandir}/man1/* + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/pgtopo_export +%{pg_dir}/bin/%{pkgname}/pgtopo_import +%{pg_dir}/bin/%{pkgname}/postgis +%{pg_dir}/bin/%{pkgname}/postgis_restore +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_or_replace_to_create.pl +%attr(755,root,root) %{_datadir}/%{name}/create_skip_signatures.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_uninstall.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/create_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.4.0-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.4.0/NEWS diff --git a/specs/postgresql-14/postgis31.spec b/specs/postgresql-14/postgis31.spec index 2c066c934..fb28ebd1e 100644 --- a/specs/postgresql-14/postgis31.spec +++ b/specs/postgresql-14/postgis31.spec @@ -4,98 +4,72 @@ ################################################################################ -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - %{!?utils:%define utils 1} %{!?raster:%define raster 1} -%define maj_ver 3.1 -%define lib_ver 3 -%define pg_maj_ver 15 -%define pg_low_fullver 15.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define gdal_dir %{_prefix}/gdal3 -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}31 +################################################################################ + +%define maj_ver 3.1 +%define lib_ver 3 +%define pg_ver 14 +%define pg_low_fullver %{pg_ver}.6 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}31 %define __perl_requires filter-requires-perl-Pg.sh ################################################################################ -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{fullname}_%{pg_maj_ver} -Version: 3.1.4 -Release: 0%{?dist} -License: GPLv2+ -Group: Applications/Databases -URL: https://www.postgis.net +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.1.9 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh -Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh +Source100: checksum.sha512 -Source100: checksum.sha512 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 -BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel -BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel -BuildRequires: libgeotiff-devel libpng-devel libtiff-devel -BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel -BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif %if %raster -BuildRequires: gdal3-devel -Requires: gdal3 +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif %endif -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} -Requires(post): %{_sbindir}/update-alternatives +Requires(post): update-alternatives -Provides: %{realname} = %{version}-%{release} +Conflicts: %{realname}30 %{realname}32 %{realname}33 %{realname}34 + +Provides: %{realname} = %{version}-%{release} ################################################################################ @@ -110,9 +84,10 @@ certified as compliant with the "Types and Functions" profile. ################################################################################ %package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description client The postgis-client package contains the client tools and their libraries @@ -120,19 +95,11 @@ of PostGIS. ################################################################################ -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - %package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description scripts This package postgis-scripts contains the SQL scripts for installing PostGIS @@ -142,9 +109,10 @@ in a PostgreSQL database, and for upgrading from earlier PostGIS versions. %if %utils %package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg %description utils The postgis-utils package provides the utilities for PostGIS. @@ -157,29 +125,18 @@ The postgis-utils package provides the utilities for PostGIS. %setup -qn %{realname}-%{version} -if %{__ldconfig} -p | grep -q 'gdal.so.1' ; then - echo "!! GDAL 1.x is installed. Please remove package before build. !!" - exit 1 -fi - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - %build # We need the below for GDAL export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" -# perfecto:ignore -export CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang -export LLVM_CONFIG=%{_libdir}/llvm5.0/bin/llvm-config - -# Use gcc and gcc-c++ from devtoolset +%if 0%{?rhel} == 7 export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" -export LIBGDAL_CFLAGS="" +%endif %configure \ --with-pgconfig=%{pg_dir}/bin/pg_config \ - --with-gdalconfig=%{gdal_dir}/bin/gdal-config \ + --with-gdalconfig=%{_bindir}/gdal-config \ %if !%raster --without-raster \ %endif @@ -200,6 +157,8 @@ rm -rf %{buildroot} %{make_install} %{make_install} -C extensions +rm -rf %{buildroot}%{pg_dir}/doc + mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp @@ -217,20 +176,20 @@ install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} %endif %post -%{__ldconfig} +/sbin/ldconfig -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 %postun -%{__ldconfig} +/sbin/ldconfig if [[ $1 -eq 0 ]] ; then # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql fi %clean @@ -247,16 +206,15 @@ rm -rf %{buildroot} %if %raster %{pg_dir}/lib/postgis_raster-%{lib_ver}.so %endif -%{pg_dir}/lib/bitcode/* %files client -%defattr(755,root,root) +%defattr(-,root,root) %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %files scripts -%defattr(644,root,root) +%defattr(-,root,root) %{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql %{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql %{pg_dir}/share/contrib/%{pkgname}/legacy.sql @@ -283,6 +241,7 @@ rm -rf %{buildroot} %{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql %{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql %endif +%{pg_dir}/lib/bitcode/* %if %utils %files utils @@ -303,13 +262,8 @@ rm -rf %{buildroot} %attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl %endif -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - ################################################################################ %changelog -* Thu Nov 18 2021 Anton Novojilov - 3.1.4-0 -- Initial build for kaos-repo +* Thu Sep 21 2023 Anton Novojilov - 3.1.9-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.1.9/NEWS diff --git a/specs/postgresql-14/postgis32.spec b/specs/postgresql-14/postgis32.spec new file mode 100644 index 000000000..208d188c5 --- /dev/null +++ b/specs/postgresql-14/postgis32.spec @@ -0,0 +1,269 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.2 +%define lib_ver 3 +%define pg_ver 14 +%define pg_low_fullver %{pg_ver}.6 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}32 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.2.5 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}33 %{realname}34 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp +chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql +chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql + +mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ + %{buildroot}%{pg_dir}/bin/shp2pgsql \ + %{buildroot}%{pg_dir}/bin/raster2pgsql \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.2.5-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.2.5/NEWS diff --git a/specs/postgresql-14/postgis33.spec b/specs/postgresql-14/postgis33.spec new file mode 100644 index 000000000..f9e426569 --- /dev/null +++ b/specs/postgresql-14/postgis33.spec @@ -0,0 +1,278 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.3 +%define lib_ver 3 +%define pg_ver 14 +%define pg_low_fullver %{pg_ver}.6 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}33 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.3.4 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}32 %{realname}34 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp +chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql +chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql + +mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ + %{buildroot}%{pg_dir}/bin/pgtopo_export \ + %{buildroot}%{pg_dir}/bin/pgtopo_import \ + %{buildroot}%{pg_dir}/bin/raster2pgsql \ + %{buildroot}%{pg_dir}/bin/shp2pgsql \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_export postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_import postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export + update-alternatives --remove postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/pgtopo_export +%{pg_dir}/bin/%{pkgname}/pgtopo_import +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_or_replace_to_create.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/create_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.3.4-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.3.4/NEWS diff --git a/specs/postgresql-14/postgis34.spec b/specs/postgresql-14/postgis34.spec new file mode 100644 index 000000000..6e73517be --- /dev/null +++ b/specs/postgresql-14/postgis34.spec @@ -0,0 +1,281 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.4 +%define lib_ver 3 +%define pg_ver 14 +%define pg_low_fullver %{pg_ver}.6 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}34 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.4.0 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}32 %{realname}33 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{_bindir}/pgsql2shp +chrpath --delete %{buildroot}%{_bindir}/raster2pgsql +chrpath --delete %{buildroot}%{_bindir}/shp2pgsql + +mv %{buildroot}%{_bindir}/* \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_export postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_import postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import %{pg_ver}0 +update-alternatives --install %{_bindir}/postgis postgis-postgis %{pg_dir}/bin/%{pkgname}/postgis %{pg_ver}0 +update-alternatives --install %{_bindir}/postgis_restore postgis-postgis_restore %{pg_dir}/bin/%{pkgname}/postgis_restore %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export + update-alternatives --remove postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import + update-alternatives --remove postgis-postgis %{pg_dir}/bin/%{pkgname}/postgis + update-alternatives --remove postgis-postgis_restore %{pg_dir}/bin/%{pkgname}/postgis_restore + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif +%{_mandir}/man1/* + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/pgtopo_export +%{pg_dir}/bin/%{pkgname}/pgtopo_import +%{pg_dir}/bin/%{pkgname}/postgis +%{pg_dir}/bin/%{pkgname}/postgis_restore +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_or_replace_to_create.pl +%attr(755,root,root) %{_datadir}/%{name}/create_skip_signatures.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_uninstall.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/create_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.4.0-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.4.0/NEWS diff --git a/specs/postgresql-13/postgis30.spec b/specs/postgresql-15/postgis31.spec similarity index 57% rename from specs/postgresql-13/postgis30.spec rename to specs/postgresql-15/postgis31.spec index 1d7294c0c..fb45cc29a 100644 --- a/specs/postgresql-13/postgis30.spec +++ b/specs/postgresql-15/postgis31.spec @@ -4,98 +4,70 @@ ################################################################################ -%define _posixroot / -%define _root /root -%define _bin /bin -%define _sbin /sbin -%define _srv /srv -%define _home /home -%define _lib32 %{_posixroot}lib -%define _lib64 %{_posixroot}lib64 -%define _libdir32 %{_prefix}%{_lib32} -%define _libdir64 %{_prefix}%{_lib64} -%define _logdir %{_localstatedir}/log -%define _rundir %{_localstatedir}/run -%define _lockdir %{_localstatedir}/lock/subsys -%define _cachedir %{_localstatedir}/cache -%define _spooldir %{_localstatedir}/spool -%define _crondir %{_sysconfdir}/cron.d -%define _loc_prefix %{_prefix}/local -%define _loc_exec_prefix %{_loc_prefix} -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_libdir %{_loc_exec_prefix}/%{_lib} -%define _loc_libdir32 %{_loc_exec_prefix}/%{_lib32} -%define _loc_libdir64 %{_loc_exec_prefix}/%{_lib64} -%define _loc_libexecdir %{_loc_exec_prefix}/libexec -%define _loc_sbindir %{_loc_exec_prefix}/sbin -%define _loc_bindir %{_loc_exec_prefix}/bin -%define _loc_datarootdir %{_loc_prefix}/share -%define _loc_includedir %{_loc_prefix}/include -%define _loc_mandir %{_loc_datarootdir}/man -%define _rpmstatedir %{_sharedstatedir}/rpm-state -%define _pkgconfigdir %{_libdir}/pkgconfig - -%define __ln %{_bin}/ln -%define __touch %{_bin}/touch -%define __service %{_sbin}/service -%define __chkconfig %{_sbin}/chkconfig -%define __ldconfig %{_sbin}/ldconfig - -################################################################################ - %{!?utils:%define utils 1} %{!?raster:%define raster 1} -%define maj_ver 3.0 -%define lib_ver 3 -%define pg_maj_ver 13 -%define pg_low_fullver 13.0 -%define pg_dir %{_prefix}/pgsql-%{pg_maj_ver} -%define gdal_dir %{_prefix}/gdal3 -%define realname postgis -%define pkgname %{realname}-%{maj_ver} -%define fullname %{realname}30 +################################################################################ + +%define maj_ver 3.1 +%define lib_ver 3 +%define pg_ver 15 +%define pg_low_fullver %{pg_ver}.0 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}31 %define __perl_requires filter-requires-perl-Pg.sh ################################################################################ -Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_maj_ver} -Name: %{fullname}_%{pg_maj_ver} -Version: 3.0.4 +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.1.9 Release: 0%{?dist} License: GPLv2+ Group: Applications/Databases URL: https://www.postgis.net Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz -Source1: https://download.osgeo.org/%{realname}/docs/%{realname}-%{version}.pdf -Source2: filter-requires-perl-Pg.sh +Source1: filter-requires-perl-Pg.sh Source100: checksum.sha512 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: postgresql%{pg_maj_ver}-devel = %{pg_low_fullver} -BuildRequires: postgresql%{pg_maj_ver}-libs = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif %if %raster +%if 0%{?rhel} == 7 BuildRequires: gdal3-devel -Requires: gdal3 +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif %endif -Requires: postgresql%{pg_maj_ver} geos >= 3.9 proj hdf5 json-c pcre -Requires: %{fullname}_%{pg_maj_ver}-client = %{version}-%{release} +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} -Requires(post): %{_sbindir}/update-alternatives +Requires(post): update-alternatives -Conflicts: %{realname}31 +Conflicts: %{realname}30 %{realname}32 %{realname}33 %{realname}34 Provides: %{realname} = %{version}-%{release} @@ -112,9 +84,10 @@ certified as compliant with the "Types and Functions" profile. ################################################################################ %package client -Summary: Client tools and their libraries of PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description client The postgis-client package contains the client tools and their libraries @@ -122,19 +95,11 @@ of PostGIS. ################################################################################ -%package docs -Summary: Extra documentation for PostGIS -Group: Applications/Databases - -%description docs -The postgis-docs package includes PDF documentation of PostGIS. - -################################################################################ - %package scripts -Summary: Installing and upgrading scripts for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} %description scripts This package postgis-scripts contains the SQL scripts for installing PostGIS @@ -144,9 +109,10 @@ in a PostgreSQL database, and for upgrading from earlier PostGIS versions. %if %utils %package utils -Summary: The utils for PostGIS -Group: Applications/Databases -Requires: %{name} = %{version}-%{release} perl-DBD-Pg +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg %description utils The postgis-utils package provides the utilities for PostGIS. @@ -159,32 +125,22 @@ The postgis-utils package provides the utilities for PostGIS. %setup -qn %{realname}-%{version} -if %{__ldconfig} -p | grep -q 'gdal.so.1' ; then - echo "!! GDAL 1.x is installed. Please remove package before build. !!" - exit 1 -fi - -# Copy .pdf file to top directory before installing -cp -p %{SOURCE1} . - %build # We need the below for GDAL export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" -# perfecto:ignore -export CLANG=/opt/rh/llvm-toolset-7/root/usr/bin/clang -export LLVM_CONFIG=%{_libdir}/llvm5.0/bin/llvm-config - -# Use gcc and gcc-c++ from devtoolset +%if 0%{?rhel} == 7 export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" -export LIBGDAL_CFLAGS="" +%endif %configure \ --with-pgconfig=%{pg_dir}/bin/pg_config \ - --with-gdalconfig=%{gdal_dir}/bin/gdal-config \ + --with-gdalconfig=%{_bindir}/gdal-config \ %if !%raster --without-raster \ %endif + --without-protobuf \ --disable-rpath \ --libdir=%{pg_dir}/lib @@ -201,6 +157,8 @@ rm -rf %{buildroot} %{make_install} %{make_install} -C extensions +rm -rf %{buildroot}%{pg_dir}/doc + mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp @@ -218,20 +176,20 @@ install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} %endif %post -%{__ldconfig} +/sbin/ldconfig -%{_sbindir}/update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_maj_ver}0 -%{_sbindir}/update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_maj_ver}0 +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 %postun -%{__ldconfig} +/sbin/ldconfig if [[ $1 -eq 0 ]] ; then # Only remove these links if the package is completely removed from the system - %{_sbindir}/update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp - %{_sbindir}/update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql - %{_sbindir}/update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql fi %clean @@ -248,21 +206,19 @@ rm -rf %{buildroot} %if %raster %{pg_dir}/lib/postgis_raster-%{lib_ver}.so %endif -%{pg_dir}/lib/bitcode/* %files client -%defattr(755,root,root) +%defattr(-,root,root) %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %files scripts -%defattr(644,root,root) +%defattr(-,root,root) %{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql %{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql %{pg_dir}/share/contrib/%{pkgname}/legacy.sql %{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql -%{pg_dir}/share/contrib/%{pkgname}/postgis_proc_set_search_path.sql %{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl %{pg_dir}/share/contrib/%{pkgname}/postgis.sql %{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql @@ -282,10 +238,10 @@ rm -rf %{buildroot} %if %raster %{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql %{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql -%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_proc_set_search_path.sql %{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql %{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql %endif +%{pg_dir}/lib/bitcode/* %if %utils %files utils @@ -295,7 +251,6 @@ rm -rf %{buildroot} %attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl %attr(755,root,root) %{_datadir}/%{name}/create_undef.pl %attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl -%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_set_search_path.pl %attr(755,root,root) %{_datadir}/%{name}/postgis_proc_upgrade.pl %attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl %attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl @@ -307,19 +262,8 @@ rm -rf %{buildroot} %attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl %endif -%files docs -%defattr(-,root,root) -%doc %{realname}-%{version}.pdf -%doc %{pg_dir}/doc/extension/README.address_standardizer - ################################################################################ %changelog -* Thu Nov 18 2021 Anton Novojilov - 3.0.4-0 -- Updated to the latest stable version - -* Fri Mar 26 2021 Anton Novojilov - 3.0.3-1 -- Updated for compatibility with other major versions - -* Sat Feb 20 2021 Anton Novojilov - 3.0.3-0 -- Initial build for kaos-repo +* Thu Sep 21 2023 Anton Novojilov - 3.1.9-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.1.9/NEWS diff --git a/specs/postgresql-15/postgis32.spec b/specs/postgresql-15/postgis32.spec new file mode 100644 index 000000000..95fbe076b --- /dev/null +++ b/specs/postgresql-15/postgis32.spec @@ -0,0 +1,269 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.2 +%define lib_ver 3 +%define pg_ver 15 +%define pg_low_fullver %{pg_ver}.0 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}32 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.2.5 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}33 %{realname}34 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp +chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql +chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql + +mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ + %{buildroot}%{pg_dir}/bin/shp2pgsql \ + %{buildroot}%{pg_dir}/bin/raster2pgsql \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_proc_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.2.5-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.2.5/NEWS diff --git a/specs/postgresql-15/postgis33.spec b/specs/postgresql-15/postgis33.spec new file mode 100644 index 000000000..939417be5 --- /dev/null +++ b/specs/postgresql-15/postgis33.spec @@ -0,0 +1,278 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.3 +%define lib_ver 3 +%define pg_ver 15 +%define pg_low_fullver %{pg_ver}.0 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}33 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.3.4 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}32 %{realname}34 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{pg_dir}/bin/pgsql2shp +chrpath --delete %{buildroot}%{pg_dir}/bin/raster2pgsql +chrpath --delete %{buildroot}%{pg_dir}/bin/shp2pgsql + +mv %{buildroot}%{pg_dir}/bin/pgsql2shp \ + %{buildroot}%{pg_dir}/bin/pgtopo_export \ + %{buildroot}%{pg_dir}/bin/pgtopo_import \ + %{buildroot}%{pg_dir}/bin/raster2pgsql \ + %{buildroot}%{pg_dir}/bin/shp2pgsql \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_export postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_import postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export + update-alternatives --remove postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/pgtopo_export +%{pg_dir}/bin/%{pkgname}/pgtopo_import +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_restore.pl +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_or_replace_to_create.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_undef.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/create_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.3.4-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.3.4/NEWS diff --git a/specs/postgresql-15/postgis34.spec b/specs/postgresql-15/postgis34.spec new file mode 100644 index 000000000..1a4998de5 --- /dev/null +++ b/specs/postgresql-15/postgis34.spec @@ -0,0 +1,281 @@ +################################################################################ + +%global crc_check pushd ../SOURCES ; sha512sum -c %{SOURCE100} ; popd + +################################################################################ + +%{!?utils:%define utils 1} +%{!?raster:%define raster 1} + +################################################################################ + +%define maj_ver 3.4 +%define lib_ver 3 +%define pg_ver 15 +%define pg_low_fullver %{pg_ver}.0 +%define pg_dir %{_prefix}/pgsql-%{pg_ver} +%define realname postgis +%define pkgname %{realname}-%{maj_ver} +%define fullname %{realname}34 + +%define __perl_requires filter-requires-perl-Pg.sh + +################################################################################ + +Summary: Geographic Information Systems Extensions to PostgreSQL %{pg_ver} +Name: %{fullname}_%{pg_ver} +Version: 3.4.0 +Release: 0%{?dist} +License: GPLv2+ +Group: Applications/Databases +URL: https://www.postgis.net + +Source0: https://download.osgeo.org/%{realname}/source/%{realname}-%{version}.tar.gz +Source1: filter-requires-perl-Pg.sh + +Source100: checksum.sha512 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: postgresql%{pg_ver}-devel = %{pg_low_fullver} +BuildRequires: postgresql%{pg_ver}-libs = %{pg_low_fullver} + +BuildRequires: geos-devel >= 3.9 chrpath make pcre-devel hdf5-devel +BuildRequires: proj-devel libtool flex json-c-devel libxml2-devel +BuildRequires: libgeotiff-devel libpng-devel libtiff-devel +BuildRequires: sqlite >= 3.40 + +%if 0%{?rhel} == 7 +BuildRequires: devtoolset-7-gcc-c++ devtoolset-7-libstdc++-devel libstdc++-static +BuildRequires: llvm5.0-devel >= 5.0 llvm-toolset-7-clang >= 4.0.1 +%else +BuildRequires: gcc-c++ llvm-devel >= 6.0.0 clang-devel >= 6.0.0 +%endif + +%if %raster +%if 0%{?rhel} == 7 +BuildRequires: gdal3-devel +Requires: gdal3-libs +%else +BuildRequires: gdal-devel >= 3 +Requires: gdal-libs >= 3 +%endif +%endif + +Requires: postgresql%{pg_ver} geos >= 3.9 proj hdf5 json-c pcre +Requires: %{fullname}_%{pg_ver}-client = %{version}-%{release} + +Requires(post): update-alternatives + +Conflicts: %{realname}30 %{realname}31 %{realname}32 %{realname}33 + +Provides: %{realname} = %{version}-%{release} + +################################################################################ + +%description +PostGIS adds support for geographic objects to the PostgreSQL object-relational +database. In effect, PostGIS "spatially enables" the PostgreSQL server, +allowing it to be used as a backend spatial database for geographic information +systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS +follows the OpenGIS "Simple Features Specification for SQL" and has been +certified as compliant with the "Types and Functions" profile. + +################################################################################ + +%package client +Summary: Client tools and their libraries of PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description client +The postgis-client package contains the client tools and their libraries +of PostGIS. + +################################################################################ + +%package scripts +Summary: Installing and upgrading scripts for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} + +%description scripts +This package postgis-scripts contains the SQL scripts for installing PostGIS +in a PostgreSQL database, and for upgrading from earlier PostGIS versions. + +################################################################################ + +%if %utils +%package utils +Summary: The utils for PostGIS +Group: Applications/Databases + +Requires: %{name} = %{version}-%{release} perl-DBD-Pg + +%description utils +The postgis-utils package provides the utilities for PostGIS. +%endif + +################################################################################ + +%prep +%{crc_check} + +%setup -qn %{realname}-%{version} + +%build +# We need the below for GDAL +export LD_LIBRARY_PATH=%{pg_dir}/lib +export LIBGDAL_CFLAGS="" + +%if 0%{?rhel} == 7 +export PATH="/opt/rh/devtoolset-7/root/usr/bin:$PATH" +%endif + +%configure \ + --with-pgconfig=%{pg_dir}/bin/pg_config \ + --with-gdalconfig=%{_bindir}/gdal-config \ +%if !%raster + --without-raster \ +%endif + --without-protobuf \ + --disable-rpath \ + --libdir=%{pg_dir}/lib + +%{__make} %{?_smp_mflags} LPATH=$(%{pg_dir}/bin/pg_config --pkglibdir) shlib="%{name}.so" +%{__make} -C extensions + +%if %utils +%{__make} -C utils +%endif + +%install +rm -rf %{buildroot} + +%{make_install} +%{make_install} -C extensions + +rm -rf %{buildroot}%{pg_dir}/doc + +mkdir -p %{buildroot}%{pg_dir}/bin/%{pkgname} + +chrpath --delete %{buildroot}%{_bindir}/pgsql2shp +chrpath --delete %{buildroot}%{_bindir}/raster2pgsql +chrpath --delete %{buildroot}%{_bindir}/shp2pgsql + +mv %{buildroot}%{_bindir}/* \ + %{buildroot}%{pg_dir}/bin/%{pkgname}/ + +%if %utils +install -dm 755 %{buildroot}%{_datadir}/%{name} +install -pm 644 utils/*.pl %{buildroot}%{_datadir}/%{name} +%endif + +%post +/sbin/ldconfig + +update-alternatives --install %{_bindir}/pgsql2shp postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_export postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export %{pg_ver}0 +update-alternatives --install %{_bindir}/pgtopo_import postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import %{pg_ver}0 +update-alternatives --install %{_bindir}/postgis postgis-postgis %{pg_dir}/bin/%{pkgname}/postgis %{pg_ver}0 +update-alternatives --install %{_bindir}/postgis_restore postgis-postgis_restore %{pg_dir}/bin/%{pkgname}/postgis_restore %{pg_ver}0 +update-alternatives --install %{_bindir}/raster2pgsql postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql %{pg_ver}0 +update-alternatives --install %{_bindir}/shp2pgsql postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql %{pg_ver}0 + +%postun +/sbin/ldconfig + +if [[ $1 -eq 0 ]] ; then + # Only remove these links if the package is completely removed from the system + update-alternatives --remove postgis-pgsql2shp %{pg_dir}/bin/%{pkgname}/pgsql2shp + update-alternatives --remove postgis-pgtopo_export %{pg_dir}/bin/%{pkgname}/pgtopo_export + update-alternatives --remove postgis-pgtopo_import %{pg_dir}/bin/%{pkgname}/pgtopo_import + update-alternatives --remove postgis-postgis %{pg_dir}/bin/%{pkgname}/postgis + update-alternatives --remove postgis-postgis_restore %{pg_dir}/bin/%{pkgname}/postgis_restore + update-alternatives --remove postgis-raster2pgsql %{pg_dir}/bin/%{pkgname}/raster2pgsql + update-alternatives --remove postgis-shp2pgsql %{pg_dir}/bin/%{pkgname}/shp2pgsql +fi + +%clean +rm -rf %{buildroot} + +################################################################################ + +%files +%defattr(-,root,root) +%doc COPYING CREDITS NEWS TODO README.%{realname} doc/html loader/README.* doc/%{realname}.xml doc/ZMSgeoms.txt +%{pg_dir}/lib/address_standardizer-%{lib_ver}.so +%{pg_dir}/lib/postgis-%{lib_ver}.so +%{pg_dir}/lib/postgis_topology-%{lib_ver}.so +%if %raster +%{pg_dir}/lib/postgis_raster-%{lib_ver}.so +%endif +%{_mandir}/man1/* + +%files client +%defattr(-,root,root) +%{pg_dir}/bin/%{pkgname}/pgsql2shp +%{pg_dir}/bin/%{pkgname}/pgtopo_export +%{pg_dir}/bin/%{pkgname}/pgtopo_import +%{pg_dir}/bin/%{pkgname}/postgis +%{pg_dir}/bin/%{pkgname}/postgis_restore +%{pg_dir}/bin/%{pkgname}/raster2pgsql +%{pg_dir}/bin/%{pkgname}/shp2pgsql + +%files scripts +%defattr(-,root,root) +%{pg_dir}/share/contrib/%{pkgname}/legacy_gist.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy_minimal.sql +%{pg_dir}/share/contrib/%{pkgname}/legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/postgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/raster_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/sfcgal_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/spatial_ref_sys.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_comments.sql +%{pg_dir}/share/contrib/%{pkgname}/topology.sql +%{pg_dir}/share/contrib/%{pkgname}/topology_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_postgis.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_topology.sql +%{pg_dir}/share/extension/address_standardizer*.control +%{pg_dir}/share/extension/address_standardizer*.sql +%{pg_dir}/share/extension/postgis*.control +%{pg_dir}/share/extension/postgis*.sql +%if %raster +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_legacy.sql +%{pg_dir}/share/contrib/%{pkgname}/rtpostgis_upgrade.sql +%{pg_dir}/share/contrib/%{pkgname}/uninstall_rtpostgis.sql +%endif +%{pg_dir}/lib/bitcode/* + +%if %utils +%files utils +%defattr(-,root,root) +%doc utils/README +%attr(755,root,root) %{_datadir}/%{name}/create_extension_unpackage.pl +%attr(755,root,root) %{_datadir}/%{name}/create_or_replace_to_create.pl +%attr(755,root,root) %{_datadir}/%{name}/create_skip_signatures.pl +%attr(755,root,root) %{_datadir}/%{name}/create_spatial_ref_sys_config_dump.pl +%attr(755,root,root) %{_datadir}/%{name}/create_uninstall.pl +%attr(755,root,root) %{_datadir}/%{name}/create_unpackaged.pl +%attr(755,root,root) %{_datadir}/%{name}/create_upgrade.pl +%attr(755,root,root) %{_datadir}/%{name}/postgis_restore.pl +%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl +%attr(755,root,root) %{_datadir}/%{name}/read_scripts_version.pl +%attr(755,root,root) %{_datadir}/%{name}/repo_revision.pl +%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_estimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_geography_joinestimation.pl +%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl +%endif + +################################################################################ + +%changelog +* Thu Sep 21 2023 Anton Novojilov - 3.4.0-0 +- https://git.osgeo.org/gitea/postgis/postgis/raw/tag/3.4.0/NEWS