summaryrefslogtreecommitdiffstats
path: root/abs/extra/postgresql-libs/PKGBUILD
blob: ac037c793fd80cae5dca6e2805b74ae46e202782 (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
51
52
53
54
55
56
57
58
# $Id: PKGBUILD 27764 2009-02-25 16:30:54Z douglas $
# Maintainer: Paul Mattal <paul@archlinux.org>

pkgname=postgresql-libs
pkgver=8.3.6
pkgrel=1
pkgdesc="Libraries for use with PostgreSQL"
arch=(i686 x86_64)
license=('BSD')
url="http://www.postgresql.org/"
depends=('openssl>=0.9.8b' 'zlib' 'readline')
options=('!makeflags')
source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2)

build() {
  cd $startdir/src/postgresql-$pkgver || return 1

  # configure
  ./configure --prefix=/usr --with-openssl --datadir=/usr/share/postgresql \
  --with-pam \
  	|| return 1

  # make and install
  for dir in src/interfaces src/bin/pg_config; do
    pushd ${dir} || return 1
    make || return 1
    make DESTDIR=${startdir}/pkg install || return 1
    popd
  done

  cd src/include || return 1
  make || return 1

  set -e
  mkdir -p $startdir/pkg/usr/include/postgresql/{internal,internal/libpq} \
  	|| return 1
  mkdir -p $startdir/pkg/usr/include/libpq || return 1

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

  # These headers are needed by the not-so-public headers of the interfaces.
  install -m644 c.h $startdir/pkg/usr/include/postgresql/internal/ || return 1
  install -m644 port.h $startdir/pkg/usr/include/postgresql/internal/ \
  	|| return 1
  install -m644 postgres_fe.h $startdir/pkg/usr/include/postgresql/internal/ \
  	|| return 1
  install -m644 libpq/pqcomm.h $startdir/pkg/usr/include/postgresql/internal/libpq/ || return 1
 
  install -D -m644 ../../COPYRIGHT $startdir/pkg/usr/share/licenses/$pkgname/LICENSE || return 1

  set +e
}
md5sums=('4f8c67d802bd03b5b844e268bba7d44a')