forked from postgres/postgres
-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 893 Bytes
/
Makefile
File metadata and controls
28 lines (22 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Minimal PGXS-style shim for PGlite builds.
#
# Upstream pg_session_jwt is pgrx-based and doesn't ship a Makefile compatible
# with PGlite's backend build (which expects to `make install` each extension
# directory). This shim installs a fallback-mode-only SQL implementation that
# uses PostgREST-compatible `request.jwt.claims`.
EXTENSION = pg_session_jwt
EXTVERSION = 0.4.0
prefix ?= /install/pglite
EXTENSION_DIR = $(DESTDIR)$(prefix)/share/postgresql/extension
.PHONY: all install
all:
@echo "$(EXTENSION): nothing to build (SQL-only shim)"
install:
mkdir -p $(EXTENSION_DIR)
printf "%s\n" \
"comment = 'pg_session_jwt (PGlite shim): JWT session helpers using request.jwt.claims'" \
"default_version = '$(EXTVERSION)'" \
"relocatable = false" \
"trusted = true" \
> $(EXTENSION_DIR)/$(EXTENSION).control
cp -f pglite/$(EXTENSION)--$(EXTVERSION).sql $(EXTENSION_DIR)/