Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up PostGIS and Debian build instructions #27

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,18 @@ This code depends on the following libraries and requires them for compilation:

* [PostgreSQL](http://www.postgresql.org) 9.6+
* [Protobuf-c](https://github.com/protobuf-c/protobuf-c) 1.2+ - used for data serialization
* [PostGIS](http://www.postgis.net/) 2.1+ - used for Postgres geometric types support

## Building

`postgres-decoderbufs` has to be built from source after installing required dependencies. The required dependencies are first PostgreSQL
(for pg_config), PostgreSQL server development packages, protobuf-c for the Protocol Buffer support and some PostGIS development packages.
(for pg_config), PostgreSQL server development packages, and protobuf-c for the Protocol Buffer support.

### Installing Dependencies
#### Debian

# Core build utilities
apt-get update && apt-get install -f -y software-properties-common build-essential pkg-config git postgresql-server-dev-9.6

# PostGIS dependency
apt-get install -f -y libproj-dev liblwgeom-dev

# Protobuf-c dependency (requires a non-stable Debian repo)
add-apt-repository "deb http://ftp.debian.org/debian testing main contrib" && apt-get update
apt-get install -y libprotobuf-c-dev=1.2.1-1+b1
# Core build utilities
apt-get update
apt-get install -f -y build-essential pkg-config git libprotobuf-c-dev postgresql-server-dev-all

When updating the ProtoBuf definition, also install the ProtoBuf C compiler:

Expand All @@ -47,7 +40,6 @@ The above are taken from the Debezium [container images](https://github.com/debe
#### Other Linux distributions

You just need to make sure the above software packages (_or some flavour thereof_) are installed for your distro.
Note that the last step from the above sequence is only required for Debian to be able to install `libprotobuf-c-dev:1.2.1`

### Getting the source code

Expand Down Expand Up @@ -139,8 +131,6 @@ The following table shows how current PostgreSQL type OIDs are mapped to which d
| TIMESTAMPTZOID | datum_string |
| BYTEAOID | datum_bytes |
| POINTOID | datum_point |
| PostGIS geometry | datum_point |
| PostGIS geography | datum_point |

## Support

Expand Down
3 changes: 0 additions & 3 deletions rpms/postgres-decoderbufs.spec
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@ Source0: https://github.com/debezium/%{name}/archive/v%{full_version}.tar.gz

BuildRequires: gcc
BuildRequires: postgresql-devel >= 9.6, postgresql-server-devel >= 9.6
BuildRequires: postgis-devel >= 2
BuildRequires: protobuf-c-devel

Requires: protobuf-c
%{?postgresql_module_requires}

Recommends: postgis

%description
A PostgreSQL logical decoder output plugin to deliver data as Protocol Buffers messages.

Expand Down