Skip to content

Commit

Permalink
Add configure to make builds (percona#80)
Browse files Browse the repository at this point in the history
Trying to locate json-c library

`Makefile` is gone. It should be generated by configure based on
`Makefile.in`

The `configre` in turn generated by `autoconf` based on `configure.ac`

See https://github.com/Percona-Lab/postgres-tde-ext/wiki/Make-Builds-for-Developers
  • Loading branch information
dAdAbird authored Dec 6, 2023
1 parent b9cc6db commit 5279d39
Show file tree
Hide file tree
Showing 9 changed files with 8,526 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/postgresql-16-pgdg-package-pgxs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
- name: Build postgres-tde-ext
run: |
sudo -u postgres bash -c './configure'
sudo -u postgres bash -c 'make USE_PGXS=1'
sudo make USE_PGXS=1 install
working-directory: src/postgres-tde-ext
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/postgresql-16-src-make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:

- name: Build postgres-tde-ext
run: |
./configure
make -j
sudo make install
working-directory: src/contrib/postgres-tde-ext
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
*.so
*.o

/config.cache
/config.log
/config.status
/Makefile
/autom4te.cache
/configure~
8 changes: 3 additions & 5 deletions Makefile → Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,19 @@ src/keyring/keyring_file.o \
src/keyring/keyring_api.o \
src/pg_tde.o

override PG_CPPFLAGS += @tde_CPPFLAGS@

ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
override PG_CPPFLAGS += -I$(CURDIR)/src/include
# TODO: use proper configure for this
override PG_CPPFLAGS += -I/usr/include/json-c
include $(PGXS)
else
subdir = contrib/postgres-tde-ext
top_builddir = ../..
override PG_CPPFLAGS += -I$(top_srcdir)/$(subdir)/src/include
# TODO: use proper configure for this
override PG_CPPFLAGS += -I/usr/include/json-c
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

SHLIB_LINK += -lcrypto -lssl -ljson-c
override SHLIB_LINK += @tde_LDFLAGS@ -lcrypto -lssl
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,13 @@ Compile and install the extension

```
cd postgres-tde-ext
./configure
make USE_PGXS=1
sudo make USE_PGXS=1 install
```

_See [Make Builds for Developers](https://github.com/Percona-Lab/postgres-tde-ext/wiki/Make-builds-for-developers) for more info on the build infrastructure._

## Install from package

1. Download the latest [release package](https://github.com/Percona-Lab/postgres-tde-ext/releases)
Expand Down
Loading

0 comments on commit 5279d39

Please sign in to comment.