1 # Maintainer: Scott Smith <jcdenton513 gmail com>
2 # Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
4 #pkgname=('postgresql84-libs')
5 pkgname=('postgresql84')
7 # To save some compile time you can opt to uncomment the following lines
8 # if you're building this package using makepkg. If you're using a packager
9 # like clyde, I don't guarantee anything. This will build both postgresql84
10 # and postgresql84-libs. Remember to comment the pkgname lines above!
12 #pkgbase=('postgresql84')
13 #pkgname=('postgresql84-libs' 'postgresql84')
17 arch=('i686' 'x86_64')
18 url="http://www.postgresql.org"
20 makedepends=('libxml2' 'python2' 'perl')
21 source=("ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2"
26 postgresql84.logrotate
27 plperl-5.14-8.4.patch)
33 cd "${srcdir}/${_pkgbase}-${pkgver}"
35 # patch to remove regress/test make target (won't build with it present)
36 #patch -Np1 -i ../build.patch
38 # patch for plperl for Perl 5.14
39 patch -Np1 -i ../plperl-5.14-8.4.patch
43 --prefix=/usr/${_pqdir} \
47 --with-python PYTHON=/usr/bin/python2 \
49 --with-system-tzdata=/usr/share/zoneinfo \
51 --enable-thread-safety
53 sed -i -e '/interfaces/d' src/Makefile
59 for dir in src/interfaces src/bin/pg_config; do
73 package_postgresql84-libs() {
74 pkgdesc="Libraries for use with PostgreSQL 8.4"
75 depends=('openssl>=1.0.0')
77 cd "${srcdir}/${_pkgbase}-${pkgver}"
80 install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
83 for dir in src/interfaces src/bin/pg_config; do
85 make DESTDIR="${pkgdir}" install
89 install -D -m644 doc/man1/pg_config.1 "${pkgdir}/usr/${_pqdir}/share/man/man1/pg_config.1"
93 mkdir -p "${pkgdir}"/usr/${_pqdir}/include/{libpq,postgresql/internal/libpq}
95 # these headers are needed by the public headers of the interfaces
96 install -m644 pg_config.h "${pkgdir}/usr/${_pqdir}/include/"
97 install -m644 pg_config_os.h "${pkgdir}/usr/${_pqdir}/include/"
98 install -m644 postgres_ext.h "${pkgdir}/usr/${_pqdir}/include/"
99 install -m644 libpq/libpq-fs.h "${pkgdir}/usr/${_pqdir}/include/libpq/"
100 install -m644 pg_config_manual.h "${pkgdir}/usr/${_pqdir}/include/"
102 # these headers are needed by the not-so-public headers of the interfaces
103 install -m644 c.h "${pkgdir}/usr/${_pqdir}/include/postgresql/internal/"
104 install -m644 port.h "${pkgdir}/usr/${_pqdir}/include/postgresql/internal/"
105 install -m644 postgres_fe.h "${pkgdir}/usr/${_pqdir}/include/postgresql/internal/"
106 install -m644 libpq/pqcomm.h "${pkgdir}/usr/${_pqdir}/include/postgresql/internal/libpq/"
109 package_postgresql84() {
110 pkgdesc="A sophisticated object-relational DBMS version 8.4"
111 backup=('etc/conf.d/postgresql84' 'etc/pam.d/postgresql84' 'etc/logrotate.d/postgresql84')
112 depends=("postgresql84-libs>=${pkgver}" 'libxml2' 'readline>=6.0')
113 optdepends=('python2: for PL/Python support'
114 'perl: for PL/Perl support')
115 provides=('postgresql84-client')
116 conflicts=('postgresql84-client')
118 cd "${srcdir}/${_pkgbase}-${pkgver}"
121 make DESTDIR="${pkgdir}" install
122 # we don't want this, it is in the -libs package
123 pushd src/bin/pg_config
124 make DESTDIR="${pkgdir}" uninstall
125 rm "${pkgdir}/usr/${_pqdir}/share/man/man1/pg_config.1"
129 install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgbase}/LICENSE"
133 make DESTDIR="${pkgdir}" install
135 # create symlinks for 8.4 binaries
136 mkdir -p ${pkgdir}/usr/bin
138 for bin in $(ls ${pkgdir}/usr/${_pqdir}/bin/); do
139 ln -s /usr/${_pqdir}/bin/$bin ${pkgdir}/usr/bin/${bin}84
142 # clean up unneeded installed items
143 rm -rf "${pkgdir}/usr/${_pqdir}/include/postgresql/internal"
144 rm -rf "${pkgdir}/usr/${_pqdir}/include/libpq"
145 find "${pkgdir}/usr/${_pqdir}/include" -maxdepth 1 -type f -execdir rm {} +
147 # install launch script
148 install -D -m755 "${srcdir}/postgresql84" "${pkgdir}/etc/rc.d/postgresql84"
151 install -D -m644 ${srcdir}/postgresql84.confd \
152 "${pkgdir}/etc/conf.d/postgresql84"
154 install -D -m644 ${srcdir}/postgresql84.pam \
155 "${pkgdir}/etc/pam.d/postgresql84"
157 install -D -m644 ${srcdir}/postgresql84.logrotate \
158 "${pkgdir}/etc/logrotate.d/postgresql84"
160 chown root:root "${pkgdir}"/usr/${_pqdir}/share/doc/postgresql/html/*
163 md5sums=('4603e8ea30cee97189b62b39022f2043'
164 'aa60b154a9233e218723d8fb39626bbd'
165 '1d9f982cf5800b8b699a39a38bd51e04'
166 '4d74f4227dc5e12bf95b3490758d86c9'
167 '96f82c38f3f540b53f3e5144900acf17'
168 'b365e638136e6394dfeeb3dae1473c79'
169 'e44b21275b69cc5157f5f9fae638c8a5')