https://github.com/ancwrd1/build-pgsql
Build PostgreSQL easily for Linux
https://github.com/ancwrd1/build-pgsql
binaries linux postgresql
Last synced: about 2 months ago
JSON representation
Build PostgreSQL easily for Linux
- Host: GitHub
- URL: https://github.com/ancwrd1/build-pgsql
- Owner: ancwrd1
- Created: 2023-10-10T16:50:53.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2026-02-28T10:13:50.000Z (4 months ago)
- Last Synced: 2026-02-28T15:07:56.352Z (4 months ago)
- Topics: binaries, linux, postgresql
- Language: Shell
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bash script to build and package the portable PostgreSQL binaries for Linux
## Introduction
This script will build the specified PostgreSQL version for the target triple and package it
into the tarball. A minimum set of options is selected: openssl and libedit.
No existing dependencies are required; the script will download and build them automatically. All dependencies are linked
statically. Executables are created with `$ORIGIN/../lib` rpath and so are portable.
## Usage
### Host compilation
If you have a cross compiler installed for the target triple run the build-postgresql.sh as follows:
```bash
./build-postgresql.sh
```
Where `triple` can be either a target triple or a "host" indicating the current build host.
If `zig` compiler is installed it is also possible to use "zig cc" cross compiler to build for specific
target and GLIBC version.
Examples:
```bash
./build-postgresql.sh aarch64-unknown-linux-gnu 17.2
./build-postgresql.sh x86_64-unknown-linux-gnu 17.2
CC="zig cc --target=x86_64-linux-gnu.2.18" ./build-postgresql.sh x86_64-unknown-linux-gnu 17.2
```
## Packaging
Resulting tarball is generated under `dist/` directory.