154 lines
4.8 KiB
Plaintext
154 lines
4.8 KiB
Plaintext
# Template file for 'postgresql'
|
|
pkgname=postgresql
|
|
version=8.4.15
|
|
revision=4
|
|
build_style=gnu-configure
|
|
configure_args="--with-docdir=/usr/share/doc --with-openssl --with-python
|
|
--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"
|
|
short_desc="Sophisticated open-source Object-Relational DBMS"
|
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
|
homepage="http://www.postgresql.org"
|
|
license="BSD"
|
|
distfiles="ftp://ftp.postgresql.org/pub/source/v${version}/${pkgname}-${version}.tar.bz2"
|
|
checksum=6a83771bbbdf1ad9c1dd900da3fbfdf6ef75857db8e012f7129a1f865279bc4d
|
|
long_desc="
|
|
PostgreSQL is a powerful, open source object-relational database system.
|
|
It has more than 15 years of active development and a proven architecture
|
|
that has earned it a strong reputation for reliability, data integrity,
|
|
and correctness."
|
|
|
|
hostmakedepends="flex"
|
|
makedepends="readline-devel openssl-devel perl>=5.16
|
|
tcl-devel>=8.6 python-devel libxml2-devel libxslt-devel pam-devel"
|
|
|
|
post_install() {
|
|
vinstall ${FILESDIR}/${pkgname}.confd 644 etc/default ${pkgname}
|
|
vinstall ${FILESDIR}/${pkgname}.service 644 usr/lib/systemd/system
|
|
vinstall ${FILESDIR}/${pkgname}-initdb 755 usr/lib/systemd/scripts
|
|
vinstall ${FILESDIR}/${pkgname}.pam 644 etc/pam.d ${pkgname}
|
|
vinstall ${DESTDIR}/usr/share/${pkgname}/${pkgname}.conf.sample \
|
|
644 etc/${pkgname} ${pkgname}.conf
|
|
}
|
|
|
|
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() {
|
|
vmove "usr/lib/*.so*"
|
|
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}
|
|
vmove "usr/share/man/man1/$(basename ${f})*"
|
|
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
|
|
}
|
|
}
|
|
|
|
postgresql-plperl_package() {
|
|
depends="perl>=5.16 postgresql>=$version"
|
|
short_desc="PL/Perl procedural language for PostgreSQL"
|
|
pkg_install() {
|
|
vmove "usr/lib/postgresql/plperl*"
|
|
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"
|
|
}
|
|
}
|
|
|
|
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}
|
|
vmove usr/share/man/man1/$(basename ${f}).1
|
|
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
|
|
mkdir -p ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
mv ${d} ${PKGDESTDIR}/$(dirname ${d#${DESTDIR}})
|
|
done
|
|
mv ${DESTDIR}/usr/share/postgresql/psqlrc.* \
|
|
${PKGDESTDIR}/usr/share/postgresql
|
|
}
|
|
}
|
|
|
|
postgresql_package() {
|
|
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"
|
|
depends="shadow"
|
|
pkg_install() {
|
|
vmove all
|
|
}
|
|
}
|