postresql-postgis2: Substitute major version in PLIST

Add a variable MAJOR, currently 2.4, and instead of open-coding 2.4 in
PLIST, use ${MAJOR}, and teach print-PLIST how to invert that in only
the right places.

No functional change; this just reduces work on updating.
This commit is contained in:
gdt 2018-05-30 17:03:56 +00:00
parent c7be67a9da
commit 6cf460a0b7
2 changed files with 37 additions and 32 deletions

View file

@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.44 2018/05/30 12:03:46 gdt Exp $
# $NetBSD: Makefile,v 1.45 2018/05/30 17:03:56 gdt Exp $
DISTNAME= postgis-2.4.4
MAJOR= 2.4
DISTNAME= postgis-${MAJOR}.4
PKGNAME= postgresql${PGSQL_VERSION}-${DISTNAME}
CATEGORIES= databases geography
MASTER_SITES= https://download.osgeo.org/postgis/source/
@ -48,6 +49,10 @@ INSTALL_TARGET= install docs-install
DOCDIR= ${PREFIX}/share/doc/postgis
PLIST_SUBST+= MAJOR=${MAJOR}
PRINT_PLIST_AWK+= { gsub(/postgis-${MAJOR:S|/|\\/|g}/, "postgis-$${MAJOR}") }
PRINT_PLIST_AWK+= { gsub(/topology-${MAJOR:S|/|\\/|g}/, "topology-$${MAJOR}") }
SUBST_CLASSES+= paths
SUBST_FILES.paths= extras/template_gis/profile \
extras/template_gis/createdb.postgis.1 \

View file

@ -1,39 +1,39 @@
@comment $NetBSD: PLIST,v 1.13 2018/05/30 12:03:46 gdt Exp $
@comment $NetBSD: PLIST,v 1.14 2018/05/30 17:03:56 gdt Exp $
bin/pgsql2shp
bin/raster2pgsql
bin/shp2pgsql
include/liblwgeom.h
include/liblwgeom_topo.h
lib/liblwgeom.la
lib/postgresql/postgis-2.4.so
lib/postgresql/postgis_topology-2.4.so
lib/postgresql/rtpostgis-2.4.so
share/postgresql/contrib/postgis-2.4/legacy.sql
share/postgresql/contrib/postgis-2.4/legacy_gist.sql
share/postgresql/contrib/postgis-2.4/legacy_minimal.sql
share/postgresql/contrib/postgis-2.4/postgis.sql
share/postgresql/contrib/postgis-2.4/postgis_comments.sql
share/postgresql/contrib/postgis-2.4/postgis_for_extension.sql
share/postgresql/contrib/postgis-2.4/postgis_proc_set_search_path.sql
share/postgresql/contrib/postgis-2.4/postgis_restore.pl
share/postgresql/contrib/postgis-2.4/postgis_upgrade.sql
share/postgresql/contrib/postgis-2.4/postgis_upgrade_for_extension.sql
share/postgresql/contrib/postgis-2.4/raster_comments.sql
share/postgresql/contrib/postgis-2.4/rtpostgis.sql
share/postgresql/contrib/postgis-2.4/rtpostgis_for_extension.sql
share/postgresql/contrib/postgis-2.4/rtpostgis_legacy.sql
share/postgresql/contrib/postgis-2.4/rtpostgis_proc_set_search_path.sql
share/postgresql/contrib/postgis-2.4/rtpostgis_upgrade.sql
share/postgresql/contrib/postgis-2.4/rtpostgis_upgrade_for_extension.sql
share/postgresql/contrib/postgis-2.4/sfcgal_comments.sql
share/postgresql/contrib/postgis-2.4/spatial_ref_sys.sql
share/postgresql/contrib/postgis-2.4/topology.sql
share/postgresql/contrib/postgis-2.4/topology_comments.sql
share/postgresql/contrib/postgis-2.4/topology_upgrade.sql
share/postgresql/contrib/postgis-2.4/uninstall_legacy.sql
share/postgresql/contrib/postgis-2.4/uninstall_postgis.sql
share/postgresql/contrib/postgis-2.4/uninstall_rtpostgis.sql
share/postgresql/contrib/postgis-2.4/uninstall_topology.sql
lib/postgresql/postgis-${MAJOR}.so
lib/postgresql/postgis_topology-${MAJOR}.so
lib/postgresql/rtpostgis-${MAJOR}.so
share/postgresql/contrib/postgis-${MAJOR}/legacy.sql
share/postgresql/contrib/postgis-${MAJOR}/legacy_gist.sql
share/postgresql/contrib/postgis-${MAJOR}/legacy_minimal.sql
share/postgresql/contrib/postgis-${MAJOR}/postgis.sql
share/postgresql/contrib/postgis-${MAJOR}/postgis_comments.sql
share/postgresql/contrib/postgis-${MAJOR}/postgis_for_extension.sql
share/postgresql/contrib/postgis-${MAJOR}/postgis_proc_set_search_path.sql
share/postgresql/contrib/postgis-${MAJOR}/postgis_restore.pl
share/postgresql/contrib/postgis-${MAJOR}/postgis_upgrade.sql
share/postgresql/contrib/postgis-${MAJOR}/postgis_upgrade_for_extension.sql
share/postgresql/contrib/postgis-${MAJOR}/raster_comments.sql
share/postgresql/contrib/postgis-${MAJOR}/rtpostgis.sql
share/postgresql/contrib/postgis-${MAJOR}/rtpostgis_for_extension.sql
share/postgresql/contrib/postgis-${MAJOR}/rtpostgis_legacy.sql
share/postgresql/contrib/postgis-${MAJOR}/rtpostgis_proc_set_search_path.sql
share/postgresql/contrib/postgis-${MAJOR}/rtpostgis_upgrade.sql
share/postgresql/contrib/postgis-${MAJOR}/rtpostgis_upgrade_for_extension.sql
share/postgresql/contrib/postgis-${MAJOR}/sfcgal_comments.sql
share/postgresql/contrib/postgis-${MAJOR}/spatial_ref_sys.sql
share/postgresql/contrib/postgis-${MAJOR}/topology.sql
share/postgresql/contrib/postgis-${MAJOR}/topology_comments.sql
share/postgresql/contrib/postgis-${MAJOR}/topology_upgrade.sql
share/postgresql/contrib/postgis-${MAJOR}/uninstall_legacy.sql
share/postgresql/contrib/postgis-${MAJOR}/uninstall_postgis.sql
share/postgresql/contrib/postgis-${MAJOR}/uninstall_rtpostgis.sql
share/postgresql/contrib/postgis-${MAJOR}/uninstall_topology.sql
share/postgresql/extension/postgis--2.0.0--${PKGVERSION}.sql
share/postgresql/extension/postgis--2.0.1--${PKGVERSION}.sql
share/postgresql/extension/postgis--2.0.2--${PKGVERSION}.sql