I've been trying to compile GDAL 3.2 on CentOS 8 (due to a java project requiring gdal bindings that should be provided by gdal32-java), however rpmbuild fails right at the start before I make any change:
$ rpmbuild --rebuild ../gdal32-3.2.3-1.rhel8.src.rpm
Installing ../gdal32-3.2.3-1.rhel8.src.rpm
error: line 23: Unknown tag: %pgdg_set_gis_variables
Note that the source RPM is from the pgdg-source-common repository provided by postgres at https://download.postgresql.org/pub/repos/yum/srpms/common/redhat/rhel-8-x86_64
. All dependencies required by the spec file are installed.
The tag %pgdg_set_gis_variables
in gdal32.spec appears only once (at the line where an error is reported) and seems to initialize some global variables used to retrieve other files/resolve dependencies.
By unpacking the file into SOURCES
and commenting-out this tag - as well as manually setting the expected values that I see unused, I could get rpmbuild -ba SOURCES/gdal32.spec
, however it fails at configure, presumably due to missing values that should have been set by %pgdg_set_gis_variables
(+ In this case, I get an error that shows that there is an attempt to expand the tag despite its being commented-out).
Do you know where I could find a sample that provides this tag/How I could build this RPM ?