2010-03-02 05:01:46 +00:00
|
|
|
# Template file for 'postgresql'
|
|
|
|
pkgname=postgresql
|
2014-07-14 13:37:37 +00:00
|
|
|
version=8.4.21
|
2014-09-16 07:39:33 +00:00
|
|
|
revision=2
|
2011-10-24 12:14:47 +00:00
|
|
|
build_style=gnu-configure
|
2010-03-02 05:01:46 +00:00
|
|
|
configure_args="--with-docdir=/usr/share/doc --with-openssl --with-python
|
2012-12-07 10:54:59 +00:00
|
|
|
--with-pam --datadir=/usr/share/postgresql --enable-thread-safety
|
|
|
|
--with-perl --with-tcl --without-ldap --without-gssapi --without-krb5
|
|
|
|
--without-bonjour --with-libxml --with-libxslt --disable-rpath
|
|
|
|
--with-system-tzdata=/usr/share/zoneinfo --enable-nls"
|
2010-03-02 05:01:46 +00:00
|
|
|
short_desc="Sophisticated open-source Object-Relational DBMS"
|
|
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
2011-06-20 13:19:36 +00:00
|
|
|
homepage="http://www.postgresql.org"
|
|
|
|
license="BSD"
|
2012-07-02 09:33:29 +00:00
|
|
|
distfiles="ftp://ftp.postgresql.org/pub/source/v${version}/${pkgname}-${version}.tar.bz2"
|
2014-07-14 13:37:37 +00:00
|
|
|
checksum=388f67e59f2a16c27e84f50656f5d755adf3d0a883138366d091aa0c727c1e2c
|
2010-03-02 05:01:46 +00:00
|
|
|
|
2013-04-14 09:13:30 +00:00
|
|
|
hostmakedepends="flex"
|
2014-07-14 13:37:37 +00:00
|
|
|
makedepends="libfl-devel readline-devel>=6.3 libressl-devel perl>=5.16
|
|
|
|
tcl-devel>=8.6 python-devel libxml2-devel libxslt-devel pam-devel"
|
2014-01-01 15:10:11 +00:00
|
|
|
conf_files="
|
|
|
|
/etc/default/${pkgname}
|
|
|
|
/etc/pam.d/${pkgname}
|
|
|
|
/etc/${pkgname}/${pkgname}.conf"
|
|
|
|
systemd_services="${pkgname}.service on"
|
|
|
|
# Create 'postgres' user for the server.
|
|
|
|
system_accounts="postgres"
|
|
|
|
postgres_homedir="/var/lib/${pkgname}"
|
|
|
|
postgres_shell="/bin/sh"
|
|
|
|
postgres_descr="PostgreSQL database server user"
|
2012-12-07 10:54:59 +00:00
|
|
|
|
2013-07-25 07:59:19 +00:00
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
configure_args+=" --without-perl --without-python --without-tcl"
|
|
|
|
fi
|
|
|
|
|
2012-01-28 11:20:35 +00:00
|
|
|
post_install() {
|
|
|
|
vinstall ${FILESDIR}/${pkgname}.confd 644 etc/default ${pkgname}
|
2012-07-10 07:16:16 +00:00
|
|
|
vinstall ${FILESDIR}/${pkgname}.service 644 usr/lib/systemd/system
|
|
|
|
vinstall ${FILESDIR}/${pkgname}-initdb 755 usr/lib/systemd/scripts
|
2012-01-28 11:20:35 +00:00
|
|
|
vinstall ${FILESDIR}/${pkgname}.pam 644 etc/pam.d ${pkgname}
|
|
|
|
vinstall ${DESTDIR}/usr/share/${pkgname}/${pkgname}.conf.sample \
|
|
|
|
644 etc/${pkgname} ${pkgname}.conf
|
2010-03-02 05:01:46 +00:00
|
|
|
}
|
2013-04-14 09:13:30 +00:00
|
|
|
|
|
|
|
postgresql-doc_package() {
|
|
|
|
short_desc="PostgreSQL documentation"
|
|
|
|
noarch=yes
|
|
|
|
pkg_install() {
|
|
|
|
vmove usr/share/doc
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
postgresql-libs_package() {
|
|
|
|
short_desc="PostgreSQL shared libraries"
|
|
|
|
pkg_install() {
|
2013-04-14 15:18:23 +00:00
|
|
|
vmove "usr/lib/*.so*"
|
2013-04-14 09:13:30 +00:00
|
|
|
for d in $(find ${DESTDIR}/usr/share/locale \
|
|
|
|
-type f -name libpq5\*); do
|
|
|
|
mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
done
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
postgresql-libs-devel_package() {
|
|
|
|
depends="postgresql-libs>=$version"
|
|
|
|
short_desc="PostgreSQL shared libraries (development files)"
|
|
|
|
pkg_install() {
|
|
|
|
for f in pg_config ecpg; do
|
|
|
|
vmove usr/bin/${f}
|
2013-04-14 15:18:23 +00:00
|
|
|
vmove "usr/share/man/man1/$(basename ${f})*"
|
2013-04-14 09:13:30 +00:00
|
|
|
done
|
|
|
|
vmove usr/include
|
|
|
|
vmove "usr/lib/*.a"
|
|
|
|
vmove usr/lib/postgresql/pgxs
|
|
|
|
for d in $(find ${DESTDIR}/usr/share/locale \
|
|
|
|
-type f -name pg_config\* -o -name ecpg\*); do
|
|
|
|
mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
done
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-07-25 07:59:19 +00:00
|
|
|
# XXX disabled for now in cross builds.
|
|
|
|
if [ -z "$CROSS_BUILD" ]; then
|
|
|
|
|
2013-04-14 09:13:30 +00:00
|
|
|
postgresql-plperl_package() {
|
|
|
|
depends="perl>=5.16 postgresql>=$version"
|
|
|
|
short_desc="PL/Perl procedural language for PostgreSQL"
|
|
|
|
pkg_install() {
|
2013-04-14 15:18:23 +00:00
|
|
|
vmove "usr/lib/postgresql/plperl*"
|
2013-04-14 09:13:30 +00:00
|
|
|
for d in $(find ${DESTDIR}/usr/share/locale \
|
|
|
|
-type f -name plperl\*); do
|
|
|
|
mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
done
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
postgresql-plpython_package() {
|
|
|
|
depends="postgresql>=$version"
|
|
|
|
short_desc="PL/Python procedural language for PostgreSQL"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/lib/postgresql/plpython*"
|
|
|
|
for d in $(find ${DESTDIR}/usr/share/locale \
|
|
|
|
-type f -name plpython\*); do
|
|
|
|
mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
done
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
postgresql-pltcl_package() {
|
|
|
|
depends="postgresql>=$version"
|
|
|
|
short_desc="PL/Tcl procedural language for PostgreSQL"
|
|
|
|
pkg_install() {
|
|
|
|
vmove "usr/bin/pltcl*"
|
|
|
|
vmove "usr/lib/postgresql/pltcl*"
|
|
|
|
for d in $(find ${DESTDIR}/usr/share/locale \
|
|
|
|
-type f -name pltcl\*); do
|
|
|
|
mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
done
|
|
|
|
vmove "usr/share/postgresql/*.pltcl"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-07-25 07:59:19 +00:00
|
|
|
fi # !CROSS_BUILD
|
|
|
|
|
2013-04-14 09:13:30 +00:00
|
|
|
postgresql-client_package() {
|
|
|
|
short_desc="Client frontends programs for PostgreSQL"
|
|
|
|
pkg_install() {
|
|
|
|
for f in clusterdb createdb createlang createuser dropdb droplang \
|
|
|
|
dropuser pg_dump pg_dumpall pg_restore psql reindexdb \
|
|
|
|
vacuumdb; do
|
|
|
|
vmove usr/bin/${f}
|
2013-04-14 15:18:23 +00:00
|
|
|
vmove usr/share/man/man1/$(basename ${f}).1
|
2013-04-14 09:13:30 +00:00
|
|
|
done
|
|
|
|
vmove usr/share/man/man7
|
|
|
|
for d in $(find ${DESTDIR}/usr/share/locale \
|
|
|
|
-type f -name pgscripts\* -o \
|
|
|
|
-name psql\* -o \
|
|
|
|
-name pg_dump\*); do
|
2013-04-14 15:18:23 +00:00
|
|
|
mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
|
|
done
|
|
|
|
mv ${DESTDIR}/usr/share/postgresql/psqlrc.* \
|
|
|
|
${PKGDESTDIR}/usr/share/postgresql
|
|
|
|
}
|
2013-04-14 09:13:30 +00:00
|
|
|
}
|