Sync with fedora to make proj up to date

Resolves: RHEL-81599
This commit is contained in:
Ales Nezbeda 2025-04-28 09:07:08 +02:00
parent aa08b8379d
commit b1f73504db
3 changed files with 167 additions and 34 deletions

2
.gitignore vendored
View File

@ -7,3 +7,5 @@
/proj-data-1.3.tar.gz
/proj-7.2.1.tar.gz
/proj-data-1.4.tar.gz
/proj-9.5.1.tar.gz
/proj-data-1.20.tar.gz

195
proj.spec
View File

@ -1,19 +1,14 @@
%global proj_version 7.2.1
%global data_version 1.4
# The name is special so that rpmdev-bumpspec will bump this rather than adding .1 to the end
%global baserelease 2
# In order to avoid needing to keep incrementing the release version for the
# main package forever, we will just construct one for proj that is guaranteed
# to increment safely. Changing this can only be done during an update when the
# base proj version number is increasing.
%global data_release %{proj_version}.%{baserelease}%{?dist}
%if 0%{?fedora}
%bcond_without mingw
%else
%bcond_with mingw
%endif
%global data_version 1.20
Name: proj
# Also check whether there is a new proj-data release when upgrading!
Version: %{proj_version}
Release: %{baserelease}%{?dist}
Version: 9.5.1
Release: 2%{?dist}
Summary: Cartographic projection software (PROJ)
License: MIT
@ -21,19 +16,36 @@ URL: https://proj.org
Source0: https://download.osgeo.org/%{name}/%{name}-%{version}.tar.gz
Source1: https://download.osgeo.org/%{name}/%{name}-data-%{data_version}.tar.gz
# Ship a pkgconfig file
Patch0: proj_pkgconfig.patch
BuildRequires: cmake
BuildRequires: curl-devel
BuildRequires: gcc-c++
%if 0%{?fedora}
BuildRequires: gmock-devel
BuildRequires: gtest-devel >= 1.8.0
%endif
BuildRequires: make
BuildRequires: libtiff-devel
BuildRequires: sqlite-devel
%if %{with mingw}
BuildRequires: mingw32-curl
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc-c++
BuildRequires: mingw32-libtiff
BuildRequires: mingw32-sqlite
BuildRequires: mingw64-curl
BuildRequires: mingw64-filesystem >= 95
BuildRequires: mingw64-gcc-c++
BuildRequires: mingw64-libtiff
BuildRequires: mingw64-sqlite
%endif
%if 0%{?fedora}
Obsoletes: proj-datumgrid < 1.8-6.3.2.6
%endif
Requires: proj-data = %{version}-%{release}
%description
Proj and invproj perform respective forward and inverse transformation of
@ -44,12 +56,23 @@ projection functions.
%package devel
Summary: Development files for PROJ
Requires: %{name}%{?_isa} = %{version}-%{release}
%if 0%{?fedora}
Obsoletes: %{name}-static < 7.2.0
%endif
%description devel
This package contains libproj and the appropriate header files and man pages.
%package data
Summary: Proj data files
BuildArch: noarch
%description data
Proj arch independent data files.
%if 0%{?fedora}
%package data-europe
Summary: Compat package for old proj-datumgrid-europe
BuildArch: noarch
@ -58,6 +81,7 @@ Provides: deprecated()
Requires: proj-data-at
Requires: proj-data-be
Requires: proj-data-ch
Requires: proj-data-cz
Requires: proj-data-de
Requires: proj-data-dk
Requires: proj-data-es
@ -65,10 +89,13 @@ Requires: proj-data-eur
Requires: proj-data-fi
Requires: proj-data-fo
Requires: proj-data-fr
Requires: proj-data-hu
Requires: proj-data-is
Requires: proj-data-nl
Requires: proj-data-pl
Requires: proj-data-pt
Requires: proj-data-se
Requires: proj-data-si
Requires: proj-data-sk
Requires: proj-data-uk
@ -123,9 +150,10 @@ Compat package for old proj-datumgrid-world.
Please do not depend on this package, it will get removed!
%files data-world
%endif
# TODO: why the \ cruft in this section?
%define data_subpkg(c:n:e:s:) \
%define countrycode %{-c:%{-c*}}%{!-c:%{error:Country code not defined}} \
%define countryname %{-n:%{-n*}}%{!-n:%{error:Country name not defined}} \
@ -136,7 +164,8 @@ Please do not depend on this package, it will get removed!
Summary: %{countryname} datum grids for Proj\
BuildArch: noarch\
# See README.DATA \
License: CC-BY and MIT and BSD and Public Domain \
License: CC-BY-4.0 OR CC-BY-SA-4.0 OR MIT OR BSD-2-Clause OR CC0-1.0\
Requires: proj-data = %{version}-%{release} \
Supplements: proj\
\
%description data-%{countrycode}\
@ -147,12 +176,14 @@ Supplements: proj\
%{extrafile}
%data_subpkg -c ar -n Argentina
%data_subpkg -c at -n Austria
%data_subpkg -c au -n Australia
%data_subpkg -c be -n Belgium
%data_subpkg -c br -n Brasil
%data_subpkg -c ca -n Canada
%data_subpkg -c ch -n Switzerland
%data_subpkg -c ch -n Switzerland -e CH
%data_subpkg -c cz -n Czech
%data_subpkg -c de -n Germany
%data_subpkg -c dk -n Denmark -e DK
%data_subpkg -c es -n Spain
@ -160,16 +191,50 @@ Supplements: proj\
%data_subpkg -c fi -n Finland
%data_subpkg -c fo -n %{quote:Faroe Island} -e FO -s 1
%data_subpkg -c fr -n France
%data_subpkg -c hu -n Hungary
%data_subpkg -c is -n Island -e ISL
%data_subpkg -c jp -n Japan
%data_subpkg -c mx -n Mexico
%data_subpkg -c no -n Norway
%data_subpkg -c nc -n %{quote:New Caledonia}
%data_subpkg -c nl -n Netherlands
%data_subpkg -c nz -n %{quote:New Zealand}
%data_subpkg -c pl -n Poland
%data_subpkg -c pt -n Portugal
%data_subpkg -c se -n Sweden
%data_subpkg -c sk -n Slovakia
%data_subpkg -c si -n Slovenia
%data_subpkg -c uk -n %{quote:United Kingdom}
%data_subpkg -c us -n %{quote:United States}
%data_subpkg -c za -n %{quote:South Africa}
%if %{with mingw}
%package -n mingw32-%{name}
Summary: Cartographic projection software (PROJ.4)
Obsoletes: mingw32-%{name}-static < 6.3.2-3
BuildArch: noarch
%description -n mingw32-%{name}
Proj and invproj perform respective forward and inverse transformation of
cartographic data to or from cartesian data with a wide range of selectable
projection functions. Proj docs: http://www.remotesensing.org/dl/new_docs/
%package -n mingw64-%{name}
Summary: Cartographic projection software (PROJ.4)
Obsoletes: mingw64-%{name}-static < 6.3.2-3
BuildArch: noarch
%description -n mingw64-%{name}
Proj and invproj perform respective forward and inverse transformation of
cartographic data to or from cartesian data with a wide range of selectable
projection functions. Proj docs: http://www.remotesensing.org/dl/new_docs/
%{?mingw_debug_package}
%endif
%prep
@ -177,41 +242,82 @@ Supplements: proj\
%build
# Native build
%if 0%{?fedora}
%cmake -DUSE_EXTERNAL_GTEST=ON
%else
%cmake -DBUILD_TESTING=OFF
%endif
%cmake_build
%if %{with mingw}
# MinGW build
%mingw_cmake -DBUILD_TESTING=OFF
%mingw_make_build
%endif
%install
%cmake_install
%if %{with mingw}
%mingw_make_install
%endif
# Install data
mkdir -p %{buildroot}%{_datadir}/%{name}
tar -xf %{SOURCE1} --directory %{buildroot}%{_datadir}/%{name}
%if %{with mingw}
rm -rf %{buildroot}%{mingw32_docdir}
rm -rf %{buildroot}%{mingw32_mandir}
rm -rf %{buildroot}%{mingw64_docdir}
rm -rf %{buildroot}%{mingw64_mandir}
%mingw_debug_install_post
%endif
%if 0%{?fedora}
%check
%ctest
# nkg test requires internet connection
%ctest -E nkg
%endif
%files
%license COPYING
%doc NEWS AUTHORS README.md
%{_bindir}/cct
%{_bindir}/cs2cs
%{_bindir}/geod
%{_bindir}/gie
%{_bindir}/invgeod
%{_bindir}/invproj
%{_bindir}/proj
%{_bindir}/projinfo
%{_bindir}/projsync
%{_libdir}/libproj.so.21*
%{_libdir}/libproj.so.19
%{_mandir}/man1/*.1*
%{_libdir}/libproj.so.25*
%files devel
%{_includedir}/*.h
%{_includedir}/proj/
%{_libdir}/libproj.so
%{_libdir}/cmake/proj/
%{_libdir}/cmake/proj4/
%{_libdir}/pkgconfig/%{name}.pc
%files data
%doc README.md
%dir %{_docdir}/%{name}/
%doc %{_docdir}/%{name}/AUTHORS.md
%doc %{_docdir}/%{name}/NEWS.md
%license %{_docdir}/%{name}/COPYING
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/CH
%{_datadir}/%{name}/GL27
%{_datadir}/%{name}/ITRF2000
%{_datadir}/%{name}/ITRF2008
%{_datadir}/%{name}/ITRF2014
%{_datadir}/%{name}/ITRF2020
%{_datadir}/%{name}/nad.lst
%{_datadir}/%{name}/nad27
%{_datadir}/%{name}/nad83
@ -224,17 +330,42 @@ tar -xf %{SOURCE1} --directory %{buildroot}%{_datadir}/%{name}
%{_datadir}/%{name}/deformation_model.schema.json
%{_datadir}/%{name}/projjson.schema.json
%{_datadir}/%{name}/triangulation.schema.json
%{_mandir}/man1/*.1*
%files devel
%{_includedir}/*.h
%{_includedir}/proj/
%{_libdir}/libproj.so
%{_libdir}/cmake/proj/
%{_libdir}/cmake/proj4/
%{_libdir}/pkgconfig/%{name}.pc
%if %{with mingw}
%files -n mingw32-%{name}
%license COPYING
%{mingw32_bindir}/libproj_9.dll
%{mingw32_bindir}/*.exe
%{mingw32_libdir}/libproj.dll.a
%{mingw32_libdir}/cmake/proj/
%{mingw32_libdir}/cmake/proj4/
%{mingw32_libdir}/pkgconfig/proj.pc
%{mingw32_includedir}/*.h
%{mingw32_includedir}/proj/
%{mingw32_datadir}/%{name}/
%files -n mingw64-%{name}
%license COPYING
%{mingw64_bindir}/libproj_9.dll
%{mingw64_bindir}/*.exe
%{mingw64_libdir}/libproj.dll.a
%{mingw64_libdir}/cmake/proj/
%{mingw64_libdir}/cmake/proj4/
%{mingw64_libdir}/pkgconfig/proj.pc
%{mingw64_includedir}/*.h
%{mingw64_includedir}/proj/
%{mingw64_datadir}/%{name}/
%endif
%changelog
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 9.5.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Mon Dec 02 2024 Sandro Mani <manisandro@gmail.com> - 9.5.1-1
- Update to 9.5.1
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

View File

@ -1,2 +1,2 @@
SHA512 (proj-7.2.1.tar.gz) = 59b9b31b0183e620a2f4a25a08620c170773fe4f99e8eca59e9ed6815f43bb379ea21ef71e8f759dbd747855b982657d7503bac3acc542218e0d862105f25324
SHA512 (proj-data-1.4.tar.gz) = 9c3fdf2851ef003309ae62348be785abd31c15d15ceb28ea58804852e40e17cd0f5b45cf5ab788343111e12437c1bb446355a71cefc327ff175971b9a69f0e86
SHA512 (proj-9.5.1.tar.gz) = 1b2a874f3b2e1343d2cbfff1e81c269cccac6c4a227b159f2d4063ebc4400bc968ed0c5bf66fe4d297b313e917087c8bfd1aa33345a5131ed53254b7130c9e86
SHA512 (proj-data-1.20.tar.gz) = 1a667a6096473ae0a3c0dc946d5832f393a447514f8a4251ed97004759534168871623342399ae9571e934c973c137b20ed15d1714569fc5b5ea26737235d907