pg_str/Makefile

16 lines
675 B
Makefile
Raw Normal View History

PACKAGE_VERSION=0.3.1
2023-02-13 21:22:29 -08:00
PACKAGE_NAME=pg_str
PG_VERSION=15
PREFIX=target/release/$(PACKAGE_NAME)-pg$(PG_VERSION)
build:
cargo pgrx package
2023-02-13 21:22:29 -08:00
install: $(PREFIX)
cp -f $(PREFIX)/usr/share/postgresql/$(PG_VERSION)/extension/$(PACKAGE_NAME)--$(PACKAGE_VERSION).sql /usr/share/postgresql/$(PG_VERSION)/extension/$(PACKAGE_NAME)--$(PACKAGE_VERSION).sql
cp -f $(PREFIX)/usr/lib/postgresql/$(PG_VERSION)/lib/$(PACKAGE_NAME).so /usr/lib/postgresql/$(PG_VERSION)/lib/$(PACKAGE_NAME).so
cp -f $(PREFIX)/usr/share/postgresql/$(PG_VERSION)/extension/$(PACKAGE_NAME).control /usr/share/postgresql/$(PG_VERSION)/extension/$(PACKAGE_NAME).control
restart:
sudo service postgresql restart