fix?(package): postgreact: ~stir the stupid shit till it works [3]

This commit is contained in:
zerosummed
2025-04-18 21:37:23 +03:00
parent aec4876832
commit 60d977110c
7 changed files with 63 additions and 42 deletions

View File

@@ -1,16 +1,18 @@
EXTENSION ?= postgreact
EXTENSION_VERSION ?= 1.0
# INFO(nrv): just in case idk how pgxs Makefile and shit all work
EXTVERSION = $(EXTENSION_VERSION)
EXTENSION_COMMENT ?= My first extension
MODULE_big = $(EXTENSION)
DATA = $(EXTENSION)--$(EXTENSION_VERSION).sql
DATA = $(EXTENSION)--$(EXTENSION_VERSION).sql $(EXTENSION).control
OBJS = $(EXTENSION).o
PG_CONFIG = pg_config
$(BUILD_DIR)/$(EXTENSION).control:
sed "s/@EXTENSION_VERSION@/$(EXTVERSION)/g" $(EXTENSION).control.in > $@
PGXS := $(shell $(PG_CONFIG) --pgxs)
.PHONY: $(EXTENSION).control
$(EXTENSION).control:
sed "s/@EXTENSION_VERSION@/$(EXTENSION_VERSION)/g; s/@EXTENSION_COMMENT@/$(EXTENSION_COMMENT)/g; s/@EXTENSION@/$(EXTENSION)/g" $(EXTENSION).control.in > $@
include $(PGXS)
# vim:wrap