summaryrefslogtreecommitdiffstats
path: root/extra/postgresql-libs/Pkgfile
blob: 98ab2f2a8fba04efc82b2d98d5ec06701baf3463 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Description: Librairires pour postgresql
# URL: http://www.postgresql.org/
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: linux-pam

name=postgresql-libs
version=8.4.1
release=1
source=(ftp://ftp.postgresql.org/pub/source/v$version/postgresql-$version.tar.bz2)

build() {
  cd postgresql-$version

  # configure
  ./configure --prefix=/usr --with-openssl --datadir=/srv/pgsql/data \
  --with-pam

  # make and install
  for dir in src/interfaces src/bin/pg_config; do
    pushd ${dir}
    make
    make DESTDIR=$PKG install
    popd
  done

  cd src/include
  make

  set -e
  mkdir -p $PKG/usr/include/postgresql/{internal,internal/libpq}
  mkdir -p $PKG/usr/include/libpq

  # These headers are needed by the public headers of the interfaces.
  install -m644 pg_config.h $PKG/usr/include/
  install -m644 pg_config_os.h $PKG/usr/include/
  install -m644 postgres_ext.h $PKG/usr/include/
  install -m644 libpq/libpq-fs.h $PKG/usr/include/libpq/
  install -m644 pg_config_manual.h $PKG/usr/include/

  # These headers are needed by the not-so-public headers of the interfaces.
  install -m644 c.h $PKG/usr/include/postgresql/internal/
  install -m644 port.h $PKG/usr/include/postgresql/internal/
  install -m644 postgres_fe.h $PKG/usr/include/postgresql/internal/
  install -m644 libpq/pqcomm.h $PKG/usr/include/postgresql/internal/libpq/

  install -D -m644 ../../COPYRIGHT $PKG/usr/share/licenses/$pkgname/LICENSE

  set +e
}