Sync with portage [Wed Feb 27 15:47:27 MSK 2013].
This commit is contained in:
parent
ce40bb5172
commit
0ee14d5046
517 changed files with 5904 additions and 13744 deletions
|
@ -1,3 +1,4 @@
|
|||
DIST httpd-2.2.22.tar.bz2 5378934 SHA256 dcdc9f1dc722f84798caf69d69dca78daa5e09a4269060045aeca7e4f44cb231 SHA512 b6901453aaef3cac31cf763f7748e06a2492e1f72e4158627f38e45423a9bcd9bea1f74ba1a1ec9a5c7fc554eb062ea61b944e2001f19825def2e530ce8a42bc WHIRLPOOL 32a03d638f82d791effdce888a02e66189d6fe87c2179ab9f3de034fbf5c8311d24835f28e9a18addb847aa6859ed817bf2e11833e315285474eefcea6f56891
|
||||
DIST httpd-2.2.23.tar.bz2 5485205 SHA256 14fe79bd6edd957c02cb41f4175e132c08e6ff74a7d08dc1858dd8224e351c34 SHA512 69b3bc942b2a91cdb57356a5c57078794db2d8404a23080a2621cdf33ae2d9bdbbacd0f6e95fd6e71fbfa87e94942be0a014c3e8709148f991e391d03aa6dee2 WHIRLPOOL 8d00184aff654b2d7f1c5ebd471f19ffcb57107ea37179fa05c424424d7b70ff0c9abf3be68ed9f0d091b3c057f1ba24cb989937e35087c3199f82e3dddbbd4f
|
||||
DIST httpd-2.4.3.tar.bz2 4559279 SHA256 d82102b9c111f1892fb20a2bccf4370de579c6521b2f172ed0b36f2759fb249e SHA512 d4501ae69aacb75d960bc8cb61c9e1ff52e6e42a37c37ca84c839262e183ca2f305794da28266aa2119d211ba0f4531705f66330079ab594c05e92ae8196d1ab WHIRLPOOL 4ffb7dc8057200f676557a70591d6938e92a8990d88dc88237d278f185290d260312dd8cfdd08994ffd7b7280502b3debea0f3e02acc718dd9db613222b6d2ae
|
||||
DIST httpd-2.4.4.tar.bz2 4780289 SHA256 92aabddeca76a4ac7330b143df1407bbf35574c7291c15172238ac598d97655c SHA512 d68789e1e585b4acf26e4e32d063fa512525f8fcc2077b1dbf573dd9f4b47667772d94bb65fefb354fbfae331e87b3fdea422a732838c86d8887eed4b3a76af0 WHIRLPOOL c2ec29a0d52ff1d674f103d0d59c0acd15b194b1102ba5078ef76b62aa959ff92adc5977e095b30c6a778cd9385f9c4ded9bfdc6ce8fba381735ca1aa84aa9f0
|
||||
|
|
78
app-admin/apache-tools/apache-tools-2.4.4.ebuild
Normal file
78
app-admin/apache-tools/apache-tools-2.4.4.ebuild
Normal file
|
@ -0,0 +1,78 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/apache-tools/apache-tools-2.4.4.ebuild,v 1.1 2013/02/27 06:54:34 patrick Exp $
|
||||
|
||||
EAPI="3"
|
||||
inherit flag-o-matic eutils
|
||||
|
||||
DESCRIPTION="Useful Apache tools - htdigest, htpasswd, ab, htdbm"
|
||||
HOMEPAGE="http://httpd.apache.org/"
|
||||
SRC_URI="mirror://apache/httpd/httpd-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc64-solaris ~x64-solaris"
|
||||
IUSE="ssl"
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND="=dev-libs/apr-1*
|
||||
=dev-libs/apr-util-1*
|
||||
dev-libs/libpcre
|
||||
ssl? ( dev-libs/openssl )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/libtool"
|
||||
|
||||
S="${WORKDIR}/httpd-${PV}"
|
||||
|
||||
src_configure() {
|
||||
local myconf=""
|
||||
|
||||
# Instead of filtering --as-needed (bug #128505), append --no-as-needed
|
||||
append-ldflags $(no-as-needed)
|
||||
|
||||
use ssl && myconf+=" --with-ssl=${EPREFIX}/usr --enable-ssl"
|
||||
|
||||
# econf overwrites the stuff from config.layout, so we have to put them into
|
||||
# our myconf line too
|
||||
econf \
|
||||
--sbindir="${EPREFIX}"/usr/sbin \
|
||||
--with-perl="${EPREFIX}"/usr/bin/perl \
|
||||
--with-expat="${EPREFIX}"/usr \
|
||||
--with-z="${EPREFIX}"/usr \
|
||||
--with-apr="${EPREFIX}"/usr \
|
||||
--with-apr-util="${EPREFIX}"/usr \
|
||||
--with-pcre="${EPREFIX}"/usr \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd support || die
|
||||
emake
|
||||
}
|
||||
|
||||
src_install () {
|
||||
cd support || die
|
||||
|
||||
make DESTDIR="${D}" install
|
||||
|
||||
# install manpages
|
||||
doman "${S}"/docs/man/{dbmmanage,htdigest,htpasswd,htdbm,ab,logresolve}.1 \
|
||||
"${S}"/docs/man/{htcacheclean,rotatelogs}.8
|
||||
|
||||
# Providing compatiblity symlinks for #177697 (which we'll stop to install
|
||||
# at some point).
|
||||
pushd "${ED}"/usr/sbin/ >/dev/null
|
||||
for i in *; do
|
||||
dosym /usr/sbin/${i} /usr/sbin/${i}2
|
||||
done
|
||||
popd "${ED}"/usr/sbin/ >/dev/null
|
||||
|
||||
# Provide a symlink for ab-ssl
|
||||
if use ssl; then
|
||||
dosym /usr/bin/ab /usr/bin/ab-ssl
|
||||
dosym /usr/bin/ab /usr/bin/ab2-ssl
|
||||
fi
|
||||
|
||||
dodoc "${S}"/CHANGES
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-mesa/eselect-mesa-0.0.10.ebuild,v 1.13 2013/01/20 20:21:16 vapier Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-mesa/eselect-mesa-0.0.10.ebuild,v 1.14 2013/02/27 05:49:34 zmedico Exp $
|
||||
|
||||
EAPI=3
|
||||
|
||||
|
@ -11,7 +11,7 @@ SRC_URI="mirror://gentoo/${P}.tar.gz"
|
|||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~sparc-solaris ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~sparc-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-opengl/eselect-opengl-1.2.7.ebuild,v 1.1 2013/01/26 04:08:04 mattst88 Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-opengl/eselect-opengl-1.2.7.ebuild,v 1.2 2013/02/27 05:48:54 zmedico Exp $
|
||||
|
||||
EAPI=4
|
||||
|
||||
|
@ -22,7 +22,7 @@ SRC_URI="${MIRROR}/glext.h.${GLEXT}.xz
|
|||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
DEPEND="app-arch/xz-utils"
|
||||
|
|
|
@ -2,5 +2,7 @@ DIST amanda-2.6.0p2.tar.gz 2402088 SHA256 3830d9c95cfe72e63aea5179208851a141481b
|
|||
DIST amanda-2.6.1p2.tar.gz 2868102 SHA256 828c71040f1ccf69f9996907a3575b7dc27890ea7a5fae5eac77183125eda195 SHA512 40e74f74bce3beec2341693cb155107544a361a5a07fdd2b52fd9e27fd87ebc371bbe539a09d8b721a411fa00a417ab12f4d39ee059d1249154d14782bdc5bf2 WHIRLPOOL 119481e843220cdf799c2a6dbdd2c1235bfc17ac6b25c37d9501a146c7a7ee7d4f1de05ce51713d44370d0c9f46e5b680cfc18246f82fef71989e26c371b5816
|
||||
DIST amanda-3.2.1.tar.gz 4116514 SHA256 187b4ccc32af03b4ca6a9658f2d6a7884a934c7864730b0bb5bc5e82457b486f SHA512 56947c9514c7ce4f907c7531cd8a85ddf1b7c65096cb38400741010d5e1484c1e063f86e3d74335691c16f69bbb23e0577a90df7b50b9d46cbf28f9d643f74aa WHIRLPOOL 77524e1489848700ca4457b6e46776871ce285d3e086bb5aa873cb0d76996b1cdf00aaca3bb5111bf4e91b066cdc53d20cd55379ba2bd0db7b708030d97846a3
|
||||
DIST amanda-3.2.2.tar.gz 4120254 SHA256 6bf8e3e39a55e877d8cbe75b927b985b9316654af26a3bd47022a2a2c99b3bac SHA512 97917dd0d3da5d7de6595685d140427b444d894d5e310addf95fb7f7ba1ba32339e8b4f0a34daafd41ea8759d19905fe0f7e8aa00076e0ebca67551ba9db2c31 WHIRLPOOL 68c6d5b5c0bf2845cd7aa931b8ff12e1d76b5c22277e84a8a8bb88f70105d2ed17193247a2e83be3866781fc30edd33e10247d7594eb384ff84c98f30e59a415
|
||||
DIST amanda-3.2.3.tar.gz 4125405 SHA256 8ac37cc82add71ffd009fa4ea8763c633037277e15d51d28aefb8cb4c0b6a7fd SHA512 54742505afad7e74a16d47377f8dea43566017c1cb77f146fc11eaf408389dc5d33dd90da0b8a169e6ee69918aba4eab3a022671120c1312cb830fa5abe663da WHIRLPOOL 0f01917156cd08e148fb350785b0cba45f4e83f89973cedb0afe19b9015ea92b15e82d302cbf50882419936231ae8c172433888b3132a9feaba4f2a9ef8e80f8
|
||||
DIST amanda-3.3.0.tar.gz 4193702 SHA256 f2af2e8aec7750cd6ac7628e5425f673c75fc4e4a14992a24367b0ac2978f366 SHA512 dda0c7b7d2777d9bae46d6bda9104252f696914669080c7e538ab906d3f2f3e2c00cd479fe1db8d489873aa7215fe41b0ab3fc34b942922bf0cfc2c80393a694 WHIRLPOOL 6400d9df492aeb8d4dfe8b83dd286a7cd38acc3309c4058e6e3faaa8196c86e453b654b5bd75b53eec8ca4098528dad93de7c253631c057e0d0a7862bf5bfa0e
|
||||
DIST amanda-3.3.1.tar.gz 4328574 SHA256 190fcf84b7154494772d7ff6f8225fc165e89b4563437c6358549456f73e7612 SHA512 86b7b127c81e75bdc60bebbaf06e474667c364e66b3c12ed6797f1a5ef6971010bc20e4b596488586e0cde6cdbb7e0a96679cabf04d2e427d9eb2922347ebd66 WHIRLPOOL 6bd79359676492b181bc7bb9b044f7f50271361b1bb820e995d6c062bbb14d69baa5d0f3b7f6fafa87386cebc4a30c6a89b8c527744f8bbc05ff72595db80304
|
||||
DIST amanda-3.3.3.tar.gz 4394935 SHA256 c36c9cd61dc62a7824abb7ba74cc4b09527bd82a930d691cf207b60b4bb15b72 SHA512 42af74a9e3b3fd92600e78d98eb4cdcf9d260bd9bbd016dde4133db346374deb41e4893159205336b35521c36f737c2877fd5030028531e1c09a0a6ac2931ba9 WHIRLPOOL 730deda1d85e645e658500a01ea72895f836a3dd99209314a65161674da24fed5aad98313a8ef66ef76176c6c7b1a60e62d30d692cfe2121eb429d9cb37f5636
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.0_p2-r4.ebuild,v 1.18 2012/12/14 11:05:41 ulm Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.0_p2-r4.ebuild,v 1.20 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
inherit perl-module autotools eutils user
|
||||
|
||||
|
@ -12,7 +12,7 @@ SLOT="0"
|
|||
KEYWORDS="amd64 ppc ppc64 ~sparc x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
sys-apps/gawk
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
dev-lang/perl
|
||||
app-arch/dump
|
||||
|
@ -172,6 +172,9 @@ src_unpack() {
|
|||
src_compile() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.1_p2.ebuild,v 1.9 2012/12/14 11:05:41 ulm Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-2.6.1_p2.ebuild,v 1.11 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
inherit autotools eutils user
|
||||
|
||||
|
@ -13,7 +13,7 @@ SLOT="0"
|
|||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
sys-apps/gawk
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
|
@ -155,6 +155,9 @@ src_unpack() {
|
|||
src_compile() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.1.ebuild,v 1.15 2012/12/14 11:05:41 ulm Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.1.ebuild,v 1.17 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit autotools eutils perl-module user
|
||||
|
@ -14,7 +14,7 @@ SLOT="0"
|
|||
KEYWORDS="amd64 ppc ppc64 ~sparc x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
sys-apps/gawk
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
|
@ -186,6 +186,9 @@ src_prepare() {
|
|||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.2.ebuild,v 1.6 2012/12/14 11:05:41 ulm Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.2.ebuild,v 1.8 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit autotools eutils perl-module user
|
||||
|
@ -14,7 +14,7 @@ SLOT="0"
|
|||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
sys-apps/gawk
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
|
@ -186,6 +186,9 @@ src_prepare() {
|
|||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
|
462
app-backup/amanda/amanda-3.2.3.ebuild
Normal file
462
app-backup/amanda/amanda-3.2.3.ebuild
Normal file
|
@ -0,0 +1,462 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.2.3.ebuild,v 1.2 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit autotools eutils perl-module user
|
||||
|
||||
MY_P="${P/_}"
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
readline? ( sys-libs/readline )
|
||||
!minimal? (
|
||||
virtual/mailx
|
||||
app-arch/mt-st
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
"
|
||||
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba xfs"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
|
||||
[ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
|
||||
[ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
|
||||
[ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
|
||||
[ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
|
||||
[ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
|
||||
[ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
|
||||
[ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
|
||||
[ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
base_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Fix a fun race condition if you use encryption.
|
||||
# This is one of the reasons you should test your recovery procedures often.
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0p2-amcrypt-ossl-asym-race-fix.patch
|
||||
|
||||
# gentoo bug 248838, check /sbin stuff before /bin
|
||||
#epatch "${FILESDIR}"/${PN}-2.6.0_p2-syslocpath.patch
|
||||
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}"
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
|
||||
done
|
||||
|
||||
(
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
|
||||
use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
|
||||
) > "${T}"/amandahosts
|
||||
|
||||
if ! use minimal; then
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} `use_with kerberos krb5-security`"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perlinfo
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
base_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
# parallel make install b0rked
|
||||
emake -j1 DESTDIR="${D}" install || die
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perlinfo
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$EMERGE_FROM" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.0.ebuild,v 1.5 2012/12/14 11:05:41 ulm Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.0.ebuild,v 1.7 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit autotools eutils perl-module user
|
||||
|
@ -14,7 +14,7 @@ SLOT="0"
|
|||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
sys-apps/gawk
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
|
@ -186,6 +186,9 @@ src_prepare() {
|
|||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.1.ebuild,v 1.6 2012/12/14 11:05:41 ulm Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.1.ebuild,v 1.8 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit autotools eutils perl-module user
|
||||
|
@ -14,7 +14,7 @@ SLOT="0"
|
|||
KEYWORDS="amd64 ppc ppc64 ~sparc x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/inetd
|
||||
sys-apps/gawk
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
|
@ -191,6 +191,9 @@ src_prepare() {
|
|||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
|
466
app-backup/amanda/amanda-3.3.3.ebuild
Normal file
466
app-backup/amanda/amanda-3.3.3.ebuild
Normal file
|
@ -0,0 +1,466 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-backup/amanda/amanda-3.3.3.ebuild,v 1.2 2013/02/26 23:00:38 robbat2 Exp $
|
||||
|
||||
EAPI=3
|
||||
inherit autotools eutils perl-module user systemd
|
||||
|
||||
MY_P="${P/_}"
|
||||
DESCRIPTION="The Advanced Maryland Automatic Network Disk Archiver"
|
||||
HOMEPAGE="http://www.amanda.org/"
|
||||
SRC_URI="mirror://sourceforge/amanda/${P}.tar.gz"
|
||||
LICENSE="HPND BSD BSD-2 GPL-2+ GPL-3+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
|
||||
RDEPEND="sys-libs/readline
|
||||
virtual/awk
|
||||
app-arch/tar
|
||||
>=dev-lang/perl-5.6
|
||||
app-arch/dump
|
||||
net-misc/openssh
|
||||
>=dev-libs/glib-2.26.0
|
||||
nls? ( virtual/libintl )
|
||||
s3? ( >=net-misc/curl-7.10.0 )
|
||||
!s3? ( curl? ( >=net-misc/curl-7.10.0 ) )
|
||||
samba? ( net-fs/samba )
|
||||
kerberos? ( app-crypt/mit-krb5 )
|
||||
xfs? ( sys-fs/xfsdump )
|
||||
readline? ( sys-libs/readline )
|
||||
!systemd? ( virtual/inetd )
|
||||
!minimal? (
|
||||
virtual/mailx
|
||||
app-arch/mt-st
|
||||
sys-block/mtx
|
||||
gnuplot? ( sci-visualization/gnuplot )
|
||||
app-crypt/aespipe
|
||||
app-crypt/gnupg
|
||||
)"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-text/docbook-xsl-stylesheets-1.72.0
|
||||
app-text/docbook-xml-dtd
|
||||
dev-libs/libxslt
|
||||
"
|
||||
|
||||
IUSE="curl gnuplot ipv6 kerberos minimal nls readline s3 samba systemd xfs"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
MYFILESDIR="${T}/files"
|
||||
ENVDIR="/etc/env.d"
|
||||
ENVDFILE="97amanda"
|
||||
TMPENVFILE="${T}/${ENVDFILE}"
|
||||
|
||||
# This is a complete list of Amanda settings that the ebuild takes from the
|
||||
# build environment. This allows users to alter the behavior of the package as
|
||||
# upstream intended, but keeping with Gentoo style. We store a copy of them in
|
||||
# /etc/env.d/97amanda during the install, so that they are preserved for future
|
||||
# installed. This variable name must not start with AMANDA_, as we do not want
|
||||
# it captured into the env file.
|
||||
ENV_SETTINGS_AMANDA="
|
||||
AMANDA_GROUP_GID AMANDA_GROUP_NAME
|
||||
AMANDA_USER_NAME AMANDA_USER_UID AMANDA_USER_SH AMANDA_USER_HOMEDIR AMANDA_USER_GROUPS
|
||||
AMANDA_SERVER AMANDA_SERVER_TAPE AMANDA_SERVER_INDEX
|
||||
AMANDA_TAR_LISTDIR AMANDA_TAR
|
||||
AMANDA_PORTS_UDP AMANDA_PORTS_TCP AMANDA_PORTS_BOTH AMANDA_PORTS
|
||||
AMANDA_CONFIG_NAME AMANDA_TMPDIR"
|
||||
|
||||
amanda_variable_setup() {
|
||||
|
||||
# Setting vars
|
||||
local currentamanda
|
||||
|
||||
# Grab the current settings
|
||||
currentamanda="$(set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' | xargs)"
|
||||
|
||||
# First we set the defaults
|
||||
[ -z "${AMANDA_GROUP_GID}" ] && AMANDA_GROUP_GID=87
|
||||
[ -z "${AMANDA_GROUP_NAME}" ] && AMANDA_GROUP_NAME=amanda
|
||||
[ -z "${AMANDA_USER_NAME}" ] && AMANDA_USER_NAME=amanda
|
||||
[ -z "${AMANDA_USER_UID}" ] && AMANDA_USER_UID=87
|
||||
[ -z "${AMANDA_USER_SH}" ] && AMANDA_USER_SH=/bin/bash
|
||||
[ -z "${AMANDA_USER_HOMEDIR}" ] && AMANDA_USER_HOMEDIR=/var/spool/amanda
|
||||
[ -z "${AMANDA_USER_GROUPS}" ] && AMANDA_USER_GROUPS="${AMANDA_GROUP_NAME}"
|
||||
|
||||
# This installs Amanda, with the server. However, it could be a client,
|
||||
# just specify an alternate server name in AMANDA_SERVER.
|
||||
[ -z "${AMANDA_SERVER}" ] && AMANDA_SERVER="${HOSTNAME}"
|
||||
[ -z "${AMANDA_SERVER_TAPE}" ] && AMANDA_SERVER_TAPE="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_SERVER_INDEX}" ] && AMANDA_SERVER_INDEX="${AMANDA_SERVER}"
|
||||
[ -z "${AMANDA_TAR_LISTDIR}" ] && AMANDA_TAR_LISTDIR=${AMANDA_USER_HOMEDIR}/tar-lists
|
||||
[ -z "${AMANDA_CONFIG_NAME}" ] && AMANDA_CONFIG_NAME=DailySet1
|
||||
[ -z "${AMANDA_TMPDIR}" ] && AMANDA_TMPDIR=/var/tmp/amanda
|
||||
[ -z "${AMANDA_DBGDIR}" ] && AMANDA_DBGDIR="$AMANDA_TMPDIR"
|
||||
# These are left empty by default
|
||||
[ -z "${AMANDA_PORTS_UDP}" ] && AMANDA_PORTS_UDP=
|
||||
[ -z "${AMANDA_PORTS_TCP}" ] && AMANDA_PORTS_TCP=
|
||||
[ -z "${AMANDA_PORTS_BOTH}" ] && AMANDA_PORTS_BOTH=
|
||||
[ -z "${AMANDA_PORTS}" ] && AMANDA_PORTS=
|
||||
|
||||
# What tar to use
|
||||
[ -z "${AMANDA_TAR}" ] && AMANDA_TAR=/bin/tar
|
||||
|
||||
# Now pull in the old stuff
|
||||
if [ -f "${ROOT}${ENVDIR}/${ENVDFILE}" ]; then
|
||||
# We don't just source it as we don't want everything in there.
|
||||
eval $(egrep "^AMANDA_" "${ROOT}${ENVDIR}/${ENVDFILE}" | grep -v '^AMANDA_ENV_SETTINGS')
|
||||
fi
|
||||
|
||||
# Re-apply the new settings if any
|
||||
[ -n "${currentamanda}" ] && eval `echo "${currentamanda}"`
|
||||
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
amanda_variable_setup
|
||||
|
||||
# If USE=minimal, give out a warning, if AMANDA_SERVER is not set to
|
||||
# another host than HOSTNAME.
|
||||
if use minimal && [ "${AMANDA_SERVER}" = "${HOSTNAME}" ] ; then
|
||||
elog "You are installing a client-only version of Amanda."
|
||||
elog "You should set the variable \$AMANDA_SERVER to point at your"
|
||||
elog "Amanda-tape-server, otherwise you will have to specify its name"
|
||||
elog "when using amrecover on the client."
|
||||
elog "For example: Use something like"
|
||||
elog "AMANDA_SERVER=\"myserver\" emerge amanda"
|
||||
elog
|
||||
fi
|
||||
|
||||
enewgroup "${AMANDA_GROUP_NAME}" "${AMANDA_GROUP_GID}"
|
||||
enewuser "${AMANDA_USER_NAME}" "${AMANDA_USER_UID}" "${AMANDA_USER_SH}" "${AMANDA_USER_HOMEDIR}" "${AMANDA_USER_GROUPS}"
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# we do not want the perl src_unpack
|
||||
base_src_unpack
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
|
||||
# gentoo bug #331111
|
||||
sed -i '/^check-local: check-perl$/d' "${S}"/config/automake/scripts.am
|
||||
sed -i '/^check-local:/s,syntax-check,,g' "${S}"/perl/Makefile.am
|
||||
|
||||
# bug with glibc-2.16.0
|
||||
sed -i -e '/gets is a security/d' "${S}"/gnulib/stdio.in.h
|
||||
|
||||
eautoreconf
|
||||
|
||||
# places for us to work in
|
||||
mkdir -p "${MYFILESDIR}"
|
||||
# Now we store the settings we just created
|
||||
set | egrep "^AMANDA_" | grep -v '^AMANDA_ENV_SETTINGS' > "${TMPENVFILE}"
|
||||
|
||||
# Prepare our custom files
|
||||
einfo "Building custom configuration files"
|
||||
local i # our iterator
|
||||
local sedexpr # var for sed expr
|
||||
sedexpr=''
|
||||
for i in ${ENV_SETTINGS_AMANDA} ; do
|
||||
local val
|
||||
eval "val=\"\${${i}}\""
|
||||
sedexpr="${sedexpr}s|__${i}__|${val}|g;"
|
||||
done
|
||||
|
||||
# now apply the sed expr
|
||||
for i in "${FILESDIR}"/amanda-* ; do
|
||||
sed -re "${sedexpr}" <"${i}" >"${MYFILESDIR}/`basename ${i}`"
|
||||
done
|
||||
|
||||
(
|
||||
cat "${MYFILESDIR}"/amanda-amandahosts-client-2.5.1_p3-r1
|
||||
use minimal || cat "${MYFILESDIR}"/amanda-amandahosts-server-2.5.1_p3-r1
|
||||
) > "${T}"/amandahosts
|
||||
|
||||
if ! use minimal; then
|
||||
sed -i -e 's:^\(my $amandahomedir\)=.*:\1 = $localstatedir;:' \
|
||||
server-src/am{addclient,serverconfig}.pl || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# fix bug #36316
|
||||
addpredict /var/cache/samba/gencache.tdb
|
||||
# fix bug #376169
|
||||
addpredict /run/blkid
|
||||
addpredict /etc/blkid.tab
|
||||
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
local myconf
|
||||
|
||||
einfo "Using ${AMANDA_SERVER_TAPE} for tape server."
|
||||
myconf="${myconf} --with-tape-server=${AMANDA_SERVER_TAPE}"
|
||||
einfo "Using ${AMANDA_SERVER_INDEX} for index server."
|
||||
myconf="${myconf} --with-index-server=${AMANDA_SERVER_INDEX}"
|
||||
einfo "Using ${AMANDA_USER_NAME} for amanda user."
|
||||
myconf="${myconf} --with-user=${AMANDA_USER_NAME}"
|
||||
einfo "Using ${AMANDA_GROUP_NAME} for amanda group."
|
||||
myconf="${myconf} --with-group=${AMANDA_GROUP_NAME}"
|
||||
einfo "Using ${AMANDA_TAR} as Tar implementation."
|
||||
myconf="${myconf} --with-gnutar=${AMANDA_TAR}"
|
||||
einfo "Using ${AMANDA_TAR_LISTDIR} as tar listdir."
|
||||
myconf="${myconf} --with-gnutar-listdir=${AMANDA_TAR_LISTDIR}"
|
||||
einfo "Using ${AMANDA_CONFIG_NAME} as default config name."
|
||||
myconf="${myconf} --with-config=${AMANDA_CONFIG_NAME}"
|
||||
einfo "Using ${AMANDA_TMPDIR} as Amanda temporary directory."
|
||||
myconf="${myconf} --with-tmpdir=${AMANDA_TMPDIR}"
|
||||
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ] && [ -n "${AMANDA_PORTS_TCP}" ] && [ -z "${AMANDA_PORTS_BOTH}" ] ; then
|
||||
eerror "If you want _both_ UDP and TCP ports, please use only the"
|
||||
eerror "AMANDA_PORTS environment variable for identical ports, or set"
|
||||
eerror "AMANDA_PORTS_BOTH."
|
||||
die "Bad port setup!"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_UDP}" ]; then
|
||||
einfo "Using UDP ports ${AMANDA_PORTS_UDP/,/-}"
|
||||
myconf="${myconf} --with-udpportrange=${AMANDA_PORTS_UDP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS_TCP}" ]; then
|
||||
einfo "Using TCP ports ${AMANDA_PORTS_TCP/,/-}"
|
||||
myconf="${myconf} --with-tcpportrange=${AMANDA_PORTS_TCP}"
|
||||
fi
|
||||
if [ -n "${AMANDA_PORTS}" ]; then
|
||||
einfo "Using ports ${AMANDA_PORTS/,/-}"
|
||||
myconf="${myconf} --with-portrange=${AMANDA_PORTS}"
|
||||
fi
|
||||
|
||||
# Extras
|
||||
# Speed option
|
||||
myconf="${myconf} --with-buffered-dump"
|
||||
# "debugging" in the configuration is NOT debug in the conventional sense.
|
||||
# It is actually just useful output in the application, and should remain
|
||||
# enabled. There are some cases of breakage with MTX tape changers as of
|
||||
# 2.5.1p2 that it exposes when turned off as well.
|
||||
myconf="${myconf} --with-debugging"
|
||||
# Where to put our files
|
||||
myconf="${myconf} --localstatedir=${AMANDA_USER_HOMEDIR}"
|
||||
|
||||
# Samba support
|
||||
myconf="${myconf} `use_with samba smbclient /usr/bin/smbclient`"
|
||||
|
||||
# Support for BSD, SSH, BSDUDP, BSDTCP security methods all compiled in by
|
||||
# default
|
||||
myconf="${myconf} --with-bsd-security"
|
||||
myconf="${myconf} --with-ssh-security"
|
||||
myconf="${myconf} --with-bsdudp-security"
|
||||
myconf="${myconf} --with-bsdtcp-security"
|
||||
|
||||
# kerberos-security mechanism version 5
|
||||
myconf="${myconf} `use_with kerberos krb5-security`"
|
||||
|
||||
# Amazon S3 support
|
||||
myconf="${myconf} `use_enable s3 s3-device`"
|
||||
|
||||
# libcurl is required for S3 but otherwise optional
|
||||
if ! use s3; then
|
||||
myconf="${myconf} $(use_with curl libcurl)"
|
||||
fi
|
||||
|
||||
# Client only, as requested in bug #127725
|
||||
if use minimal ; then
|
||||
myconf="${myconf} --without-server"
|
||||
else
|
||||
# amplot
|
||||
myconf="${myconf} $(use_with gnuplot)"
|
||||
fi
|
||||
|
||||
# IPv6 fun.
|
||||
myconf="${myconf} `use_with ipv6`"
|
||||
# This is to prevent the IPv6-is-working test
|
||||
# As the test fails on binpkg build hosts with no IPv6.
|
||||
use ipv6 && export amanda_cv_working_ipv6=yes
|
||||
|
||||
# I18N
|
||||
myconf="${myconf} `use_enable nls`"
|
||||
|
||||
# Bug #296634: Perl location
|
||||
perlinfo
|
||||
myconf="${myconf} --with-amperldir=${VENDOR_LIB}"
|
||||
|
||||
# Bug 296633: --disable-syntax-checks
|
||||
# Some tests are not safe for production systems
|
||||
myconf="${myconf} --disable-syntax-checks"
|
||||
|
||||
# build manpages
|
||||
myconf="${myconf} --enable-manpage-build"
|
||||
|
||||
econf \
|
||||
$(use_with readline) \
|
||||
${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Again, do not want the perl-module src_compile
|
||||
base_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source ${TMPENVFILE}
|
||||
|
||||
einfo "Doing stock install"
|
||||
# parallel make install b0rked
|
||||
emake -j1 DESTDIR="${D}" install || die
|
||||
|
||||
# Build the envdir file
|
||||
# Don't forget this..
|
||||
einfo "Building environment file"
|
||||
(
|
||||
echo "# These settings are what was present in the environment when this"
|
||||
echo "# Amanda was compiled. Changing anything below this comment will"
|
||||
echo "# have no effect on your application, but it merely exists to"
|
||||
echo "# preserve them for your next emerge of Amanda"
|
||||
cat "${TMPENVFILE}" | sed "s,=\$,='',g"
|
||||
) >> "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Env.d
|
||||
einfo "Installing environment config file"
|
||||
doenvd "${MYFILESDIR}/${ENVDFILE}"
|
||||
|
||||
# Lock down next section (up until docs).
|
||||
insopts -m0640
|
||||
# Installing Amanda Xinetd Services Definition
|
||||
einfo "Installing xinetd service file"
|
||||
insinto /etc/xinetd.d
|
||||
if use minimal ; then
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-client amanda
|
||||
else
|
||||
newins "${MYFILESDIR}"/amanda-xinetd-2.6.1_p1-server amanda
|
||||
fi
|
||||
|
||||
if ! use minimal; then
|
||||
einfo "Installing Sample Daily Cron Job for Amanda"
|
||||
insinto /etc/cron.daily
|
||||
newins "${MYFILESDIR}/amanda-cron" amanda
|
||||
fi
|
||||
|
||||
if use systemd; then
|
||||
einfo "Installing systemd service and socket files for Amanda"
|
||||
systemd_dounit "${FILESDIR}"/amanda.socket || die
|
||||
systemd_newunit "${FILESDIR}"/amanda.service 'amanda@.service' || die
|
||||
fi
|
||||
|
||||
|
||||
insinto /etc/amanda
|
||||
einfo "Installing .amandahosts File for ${AMANDA_USER_NAME} user"
|
||||
doins "${T}/amandahosts"
|
||||
fperms 600 /etc/amanda/amandahosts
|
||||
|
||||
dosym /etc/amanda/amandahosts "${AMANDA_USER_HOMEDIR}/.amandahosts"
|
||||
insinto "${AMANDA_USER_HOMEDIR}"
|
||||
einfo "Installing .profile for ${AMANDA_USER_NAME} user"
|
||||
newins "${MYFILESDIR}/amanda-profile" .profile
|
||||
|
||||
insinto /etc/amanda
|
||||
doins "${S}/example/amanda-client.conf"
|
||||
if ! use minimal ; then
|
||||
insinto "/etc/amanda/${AMANDA_CONFIG_NAME}"
|
||||
doins "${S}/example/amanda.conf"
|
||||
doins "${S}/example/disklist"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}/index"
|
||||
fi
|
||||
|
||||
keepdir "${AMANDA_TAR_LISTDIR}"
|
||||
keepdir "${AMANDA_USER_HOMEDIR}/amanda"
|
||||
keepdir "${AMANDA_TMPDIR}/dumps"
|
||||
# Just make sure it exists for XFS to work...
|
||||
use xfs && keepdir /var/xfsdump/inventory
|
||||
|
||||
local i
|
||||
for i in "${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" /etc/amanda; do
|
||||
einfo "Securing directory (${i})"
|
||||
fowners -R ${AMANDA_USER_NAME}:${AMANDA_GROUP_NAME} ${i}
|
||||
done
|
||||
# Do NOT use -R
|
||||
fperms 0700 \
|
||||
"${AMANDA_USER_HOMEDIR}" "${AMANDA_TAR_LISTDIR}" \
|
||||
"${AMANDA_TMPDIR}" "${AMANDA_TMPDIR}/dumps" \
|
||||
"${AMANDA_USER_HOMEDIR}/amanda" \
|
||||
"${AMANDA_USER_HOMEDIR}/${AMANDA_CONFIG_NAME}" \
|
||||
/etc/amanda /etc/amanda/${AMANDA_CONFIG_NAME}
|
||||
|
||||
einfo "Setting setuid permissions"
|
||||
amanda_permissions_fix "${D}"
|
||||
|
||||
# Relax permissions again
|
||||
insopts -m0644
|
||||
|
||||
# docs
|
||||
einfo "Installing documentation"
|
||||
dodoc AUTHORS ChangeLog DEVELOPING NEWS README ReleaseNotes UPGRADING
|
||||
# our inetd sample
|
||||
einfo "Installing standard inetd sample"
|
||||
newdoc "${MYFILESDIR}/amanda-inetd.amanda.sample-2.6.0_p2-r2" amanda-inetd.amanda.sample
|
||||
# Amanda example configs
|
||||
einfo "Installing example configurations"
|
||||
rm "${D}"/usr/share/amanda/{COPYRIGHT,ChangeLog,NEWS,ReleaseNotes}
|
||||
mv "${D}/usr/share/amanda/example" "${D}/usr/share/doc/${PF}/"
|
||||
docinto example1
|
||||
newdoc "${FILESDIR}/example_amanda.conf" amanda.conf
|
||||
newdoc "${FILESDIR}/example_disklist-2.5.1_p3-r1" disklist
|
||||
newdoc "${FILESDIR}/example_global.conf" global.conf
|
||||
|
||||
einfo "Cleaning up dud .la files"
|
||||
perlinfo
|
||||
find "${D}"/"${VENDOR_LIB}" -name '*.la' -print0 |xargs -0 rm -f
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
[ ! -f "${TMPENVFILE}" -a "$EMERGE_FROM" == "binary" ] && \
|
||||
TMPENVFILE="${ROOT}${ENVDIR}/${ENVDFILE}"
|
||||
[ ! -f "${TMPENVFILE}" ] && die "Variable setting file (${TMPENVFILE}) should exist!"
|
||||
source "${TMPENVFILE}"
|
||||
|
||||
# Migration of amandates from /etc to $localstatedir/amanda
|
||||
if [ -f "${ROOT}/etc/amandates" -a \
|
||||
! -f "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates" ]; then
|
||||
einfo "Migrating amandates from /etc/ to ${AMANDA_USER_HOMEDIR}/amanda"
|
||||
einfo "A backup is also placed at /etc/amandates.orig"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/etc/amandates.orig"
|
||||
mkdir -p "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/"
|
||||
cp -dp "${ROOT}/etc/amandates" "${ROOT}/${AMANDA_USER_HOMEDIR}/amanda/amandates"
|
||||
fi
|
||||
if [ -f "${ROOT}/etc/amandates" ]; then
|
||||
einfo "If you have migrated safely, please delete /etc/amandates"
|
||||
fi
|
||||
|
||||
einfo "Checking setuid permissions"
|
||||
amanda_permissions_fix "${ROOT}"
|
||||
|
||||
elog "You should configure Amanda in /etc/amanda now."
|
||||
elog
|
||||
elog "If you use xinetd, Don't forget to check /etc/xinetd.d/amanda"
|
||||
elog "and restart xinetd afterwards!"
|
||||
elog
|
||||
elog "Otherwise, please look at /usr/share/doc/${PF}/inetd.amanda.sample"
|
||||
elog "as an example of how to configure your inetd."
|
||||
elog
|
||||
elog "NOTICE: If you need raw access to partitions you need to add the"
|
||||
elog "amanda user to the 'disk' group."
|
||||
elog
|
||||
elog "NOTICE: If you have a tape changer, you need to add the amanda user"
|
||||
elog "to the 'tape' group."
|
||||
elog
|
||||
elog "If you use localhost in your disklist your restores may break."
|
||||
elog "You should replace it with the actual hostname!"
|
||||
elog "Please also see the syntax changes to amandahosts."
|
||||
}
|
||||
|
||||
# We have had reports of amanda file permissions getting screwed up.
|
||||
# Losing setuid, becoming too lax etc.
|
||||
# ONLY root and users in the amanda group should be able to run these binaries!
|
||||
amanda_permissions_fix() {
|
||||
local root="$1"
|
||||
[ -z "${root}" ] && die "Failed to pass root argument to amanda_permissions_fix!"
|
||||
local le="/usr/libexec/amanda"
|
||||
for i in /usr/sbin/amcheck "${le}"/calcsize "${le}"/killpgrp \
|
||||
"${le}"/rundump "${le}"/runtar "${le}"/dumper \
|
||||
"${le}"/planner ; do
|
||||
chown root:${AMANDA_GROUP_NAME} "${root}"/${i}
|
||||
chmod u=srwx,g=rx,o= "${root}"/${i}
|
||||
done
|
||||
}
|
10
app-backup/amanda/files/amanda.service
Normal file
10
app-backup/amanda/files/amanda.service
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=Amanda Backup System
|
||||
After=local-fs.target
|
||||
|
||||
[Service]
|
||||
User=amanda
|
||||
Group=amanda
|
||||
ExecStart=/usr/libexec/amanda/amandad -auth=bsdtcp amdump
|
||||
StandardInput=socket
|
||||
StandardOutput=socket
|
7
app-backup/amanda/files/amanda.socket
Normal file
7
app-backup/amanda/files/amanda.socket
Normal file
|
@ -0,0 +1,7 @@
|
|||
[Unit]
|
||||
Description=Amanda Socket
|
||||
[Socket]
|
||||
ListenStream=10080
|
||||
Accept=true
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-doc/devmanual/devmanual-9999.ebuild,v 1.5 2013/02/14 21:14:31 pacho Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-doc/devmanual/devmanual-9999.ebuild,v 1.6 2013/02/26 18:31:19 hwoarang Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
|
@ -12,7 +12,7 @@ EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/devmanual.git"
|
|||
|
||||
LICENSE="CC-BY-SA-2.0"
|
||||
SLOT="0"
|
||||
# Live ebuild but does not build anycode. It should work everywhere
|
||||
# Live ebuild but does not build anything. It should work everywhere
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh
|
||||
~sparc ~x86"
|
||||
IUSE=""
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/emul-linux-x86-xlibs/emul-linux-x86-xlibs-20130224-r1.ebuild,v 1.1 2013/02/26 22:59:48 mgorny Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
DESCRIPTION="Backwards compat for emul-linux-x86-xlibs using multilib"
|
||||
HOMEPAGE="http://dev.gentoo.org/~pacho/emul.html"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="metapackage"
|
||||
SLOT="0"
|
||||
KEYWORDS="-* ~amd64"
|
||||
IUSE="development opengl"
|
||||
|
||||
RDEPEND="~app-emulation/emul-linux-x86-baselibs-${PV}
|
||||
opengl? ( app-emulation/emul-linux-x86-opengl )
|
||||
|
||||
media-libs/fontconfig[abi_x86_32]
|
||||
media-libs/freetype[abi_x86_32]
|
||||
x11-libs/libICE[abi_x86_32]
|
||||
x11-libs/libpciaccess[abi_x86_32]
|
||||
x11-libs/libSM[abi_x86_32]
|
||||
x11-libs/libvdpau[abi_x86_32]
|
||||
x11-libs/libX11[abi_x86_32]
|
||||
x11-libs/libXau[abi_x86_32]
|
||||
x11-libs/libXaw[abi_x86_32]
|
||||
x11-libs/libxcb[abi_x86_32]
|
||||
x11-libs/libXcomposite[abi_x86_32]
|
||||
x11-libs/libXcursor[abi_x86_32]
|
||||
x11-libs/libXdamage[abi_x86_32]
|
||||
x11-libs/libXdmcp[abi_x86_32]
|
||||
x11-libs/libXext[abi_x86_32]
|
||||
x11-libs/libXfixes[abi_x86_32]
|
||||
x11-libs/libXft[abi_x86_32]
|
||||
x11-libs/libXi[abi_x86_32]
|
||||
x11-libs/libXinerama[abi_x86_32]
|
||||
x11-libs/libXmu[abi_x86_32]
|
||||
x11-libs/libXp[abi_x86_32]
|
||||
x11-libs/libXpm[abi_x86_32]
|
||||
x11-libs/libXrandr[abi_x86_32]
|
||||
x11-libs/libXrender[abi_x86_32]
|
||||
x11-libs/libXScrnSaver[abi_x86_32]
|
||||
x11-libs/libXt[abi_x86_32]
|
||||
x11-libs/libXtst[abi_x86_32]
|
||||
x11-libs/libXv[abi_x86_32]
|
||||
x11-libs/libXvMC[abi_x86_32]
|
||||
x11-libs/libXxf86dga[abi_x86_32]
|
||||
x11-libs/libXxf86vm[abi_x86_32]"
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/emul-linux-x86-xlibs/emul-linux-x86-xlibs-20130224.ebuild,v 1.1 2013/02/25 18:49:46 pacho Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/emul-linux-x86-xlibs/emul-linux-x86-xlibs-20130224.ebuild,v 1.2 2013/02/26 22:59:48 mgorny Exp $
|
||||
|
||||
EAPI=5
|
||||
inherit emul-linux-x86
|
||||
|
@ -13,4 +13,36 @@ IUSE="opengl"
|
|||
DEPEND=""
|
||||
RDEPEND="~app-emulation/emul-linux-x86-baselibs-${PV}
|
||||
x11-libs/libX11
|
||||
opengl? ( app-emulation/emul-linux-x86-opengl )"
|
||||
opengl? ( app-emulation/emul-linux-x86-opengl )
|
||||
|
||||
!media-libs/fontconfig[abi_x86_32]
|
||||
!media-libs/freetype[abi_x86_32]
|
||||
!x11-libs/libICE[abi_x86_32]
|
||||
!x11-libs/libpciaccess[abi_x86_32]
|
||||
!x11-libs/libSM[abi_x86_32]
|
||||
!x11-libs/libvdpau[abi_x86_32]
|
||||
!x11-libs/libX11[abi_x86_32]
|
||||
!x11-libs/libXau[abi_x86_32]
|
||||
!x11-libs/libXaw[abi_x86_32]
|
||||
!x11-libs/libxcb[abi_x86_32]
|
||||
!x11-libs/libXcomposite[abi_x86_32]
|
||||
!x11-libs/libXcursor[abi_x86_32]
|
||||
!x11-libs/libXdamage[abi_x86_32]
|
||||
!x11-libs/libXdmcp[abi_x86_32]
|
||||
!x11-libs/libXext[abi_x86_32]
|
||||
!x11-libs/libXfixes[abi_x86_32]
|
||||
!x11-libs/libXft[abi_x86_32]
|
||||
!x11-libs/libXi[abi_x86_32]
|
||||
!x11-libs/libXinerama[abi_x86_32]
|
||||
!x11-libs/libXmu[abi_x86_32]
|
||||
!x11-libs/libXp[abi_x86_32]
|
||||
!x11-libs/libXpm[abi_x86_32]
|
||||
!x11-libs/libXrandr[abi_x86_32]
|
||||
!x11-libs/libXrender[abi_x86_32]
|
||||
!x11-libs/libXScrnSaver[abi_x86_32]
|
||||
!x11-libs/libXt[abi_x86_32]
|
||||
!x11-libs/libXtst[abi_x86_32]
|
||||
!x11-libs/libXv[abi_x86_32]
|
||||
!x11-libs/libXvMC[abi_x86_32]
|
||||
!x11-libs/libXxf86dga[abi_x86_32]
|
||||
!x11-libs/libXxf86vm[abi_x86_32]"
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
open(INPUT, "<cpuemu_6.c");
|
||||
open(OUT1, ">cpuemu_6.t");
|
||||
open(OUT2, ">cpuemu_7.c");
|
||||
|
||||
$header = 1;
|
||||
$part = 0;
|
||||
|
||||
while ($line = <INPUT>) {
|
||||
|
||||
$size += length($line);
|
||||
|
||||
if (($line =~ /^#/ || $line eq "\n") && ($line ne "#ifdef PART_1\n") && $header) {
|
||||
print OUT1 $line;
|
||||
print OUT2 $line;
|
||||
} else {
|
||||
|
||||
$header = 0;
|
||||
|
||||
if ($line ne "#ifdef PART_4\n" && $part == 0) {
|
||||
print OUT1 $line;
|
||||
} else {
|
||||
$part = 1;
|
||||
print OUT2 $line;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
close(OUT2);
|
||||
close(OUT1);
|
||||
close(INPUT);
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.2.0-r2.ebuild,v 1.2 2013/02/25 17:43:21 idella4 Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.2.0-r2.ebuild,v 1.3 2013/02/27 08:03:21 idella4 Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
|
@ -26,7 +26,7 @@ LICENSE="GPL-2"
|
|||
SLOT="0"
|
||||
IUSE="custom-cflags debug efi flask pae xsm"
|
||||
|
||||
RDEPEND="efi? ( >=sys-devel/binutils-2.22[multitarget] )"
|
||||
DEPEND="efi? ( >=sys-devel/binutils-2.22[multitarget] )"
|
||||
PDEPEND="~app-emulation/xen-tools-${PV}[${PYTHON_USEDEP}]"
|
||||
|
||||
RESTRICT="test"
|
||||
|
@ -122,8 +122,11 @@ src_install() {
|
|||
local myopt
|
||||
use debug && myopt="${myopt} debug=y"
|
||||
use pae && myopt="${myopt} pae=y"
|
||||
|
||||
#The 'make install' doesn't 'mkdir -p' the subdirs
|
||||
use efi && mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
|
||||
if use efi; then
|
||||
mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
|
||||
fi
|
||||
|
||||
emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.2.1-r2.ebuild,v 1.1 2013/02/24 08:23:59 idella4 Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/xen/xen-4.2.1-r2.ebuild,v 1.2 2013/02/27 08:03:21 idella4 Exp $
|
||||
|
||||
EAPI=5
|
||||
|
||||
|
@ -113,8 +113,11 @@ src_install() {
|
|||
local myopt
|
||||
use debug && myopt="${myopt} debug=y"
|
||||
use pae && myopt="${myopt} pae=y"
|
||||
|
||||
#The 'make install' doesn't 'mkdir -p' the subdirs
|
||||
use efi && mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
|
||||
if use efi; then
|
||||
mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
|
||||
fi
|
||||
|
||||
emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/cstream/cstream-3.0.0.ebuild,v 1.1 2012/03/14 04:52:11 patrick Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/cstream/cstream-3.0.0.ebuild,v 1.2 2013/02/26 18:58:25 nimiux Exp $
|
||||
|
||||
EAPI="2"
|
||||
|
||||
|
@ -12,7 +12,7 @@ SRC_URI="http://www.cons.org/cracauer/download/${P}.tar.gz"
|
|||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
KEYWORDS="amd64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
src_prepare() {
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
DIST podofo-0.9.1.tar.gz 1080079 SHA256 7b969de0b6c584358f26fc5de23cff0378f46023e678fe058efbb64003ec9745 SHA512 4584aa770fd74eb246048d0350cfe55ffccb58528bf2e861fc6211a12cc8787e7118bb0023fc0977c5f8e483ce89c1c182a12e8b580983069c87e1a0d5b614e6 WHIRLPOOL ed09415f4ab15ec6fd47303b2a4b411426f43eef8fd14186f7ff00b2b78f985965da8421480b0888600ff407cb6d799df1d2bf65c36b858336633fd49a2932cf
|
||||
DIST podofo-0.9.2.tar.gz 1092131 SHA256 465191618c57da9ae9230e7919e1985a242ddc7d1045cfdb6fb066140ed0a3f3 SHA512 e0bda743b192edfd42f381498edc56f30e6d89f45e7abd2b4351e15fd672a432d07f067ab8ed5cf378b0ecbab6d98abb32c22c1ce860c0021e31235fc5683a21 WHIRLPOOL f22c5ec0c3de1ef661198e8c94b2ac9faab88c6b12ebe27da14642c6eaed154f2e1fbf4f404807d7e33f895ffb64663eb7e403ec8a9e0f87b32e3470b7f5acfb
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-text/podofo/podofo-0.9.1.ebuild,v 1.10 2012/10/28 02:45:53 zmedico Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-text/podofo/podofo-0.9.1.ebuild,v 1.11 2013/02/27 08:45:03 zmedico Exp $
|
||||
|
||||
EAPI=2
|
||||
inherit cmake-utils flag-o-matic multilib
|
||||
|
@ -23,17 +23,33 @@ RDEPEND="dev-lang/lua
|
|||
media-libs/tiff:0
|
||||
sys-libs/zlib"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
boost? ( dev-util/boost-build )
|
||||
test? ( dev-util/cppunit )"
|
||||
|
||||
DOCS="AUTHORS ChangeLog TODO"
|
||||
|
||||
src_prepare() {
|
||||
local x sed_args
|
||||
|
||||
sed -i \
|
||||
-e "s:LIBDIRNAME \"lib\":LIBDIRNAME \"$(get_libdir)\":" \
|
||||
CMakeLists.txt || die
|
||||
|
||||
# Use pkg-config to find headers for bug #459404.
|
||||
sed_args=
|
||||
for x in $(pkg-config --cflags freetype2) ; do
|
||||
[[ ${x} == -I* ]] || continue
|
||||
x=${x#-I}
|
||||
if [[ -f ${x}/ft2build.h ]] ; then
|
||||
sed_args+=" -e s:/usr/include/\\r\$:${x}:"
|
||||
elif [[ -f ${x}/freetype/config/ftheader.h ]] ; then
|
||||
sed_args+=" -e s:/usr/include/freetype2\\r\$:${x}:"
|
||||
fi
|
||||
done
|
||||
[[ -n ${sed_args} ]] && \
|
||||
{ sed -i ${sed_args} cmake/modules/FindFREETYPE.cmake || die; }
|
||||
|
||||
# Bug #439784: Add missing unistd include for close() and unlink().
|
||||
sed -i 's:^#include <stdio.h>$:#include <unistd.h>\n\0:' -i \
|
||||
test/unit/TestUtils.cpp || die
|
||||
|
|
118
app-text/podofo/podofo-0.9.2.ebuild
Normal file
118
app-text/podofo/podofo-0.9.2.ebuild
Normal file
|
@ -0,0 +1,118 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-text/podofo/podofo-0.9.2.ebuild,v 1.1 2013/02/27 08:45:03 zmedico Exp $
|
||||
|
||||
EAPI=2
|
||||
inherit cmake-utils flag-o-matic multilib
|
||||
|
||||
DESCRIPTION="PoDoFo is a C++ library to work with the PDF file format."
|
||||
HOMEPAGE="http://sourceforge.net/projects/podofo/"
|
||||
SRC_URI="mirror://sourceforge/podofo/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2 LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
|
||||
IUSE="+boost debug test"
|
||||
|
||||
RDEPEND="dev-lang/lua
|
||||
dev-libs/openssl
|
||||
media-libs/fontconfig
|
||||
media-libs/freetype:2
|
||||
virtual/jpeg
|
||||
>=media-libs/libpng-1.4:0
|
||||
media-libs/tiff:0
|
||||
sys-libs/zlib"
|
||||
DEPEND="${RDEPEND}
|
||||
virtual/pkgconfig
|
||||
boost? ( dev-util/boost-build )
|
||||
test? ( dev-util/cppunit )"
|
||||
|
||||
DOCS="AUTHORS ChangeLog TODO"
|
||||
|
||||
src_prepare() {
|
||||
local x sed_args
|
||||
|
||||
sed -i \
|
||||
-e "s:LIBDIRNAME \"lib\":LIBDIRNAME \"$(get_libdir)\":" \
|
||||
CMakeLists.txt || die
|
||||
|
||||
# Use pkg-config to find headers for bug #459404.
|
||||
sed_args=
|
||||
for x in $(pkg-config --cflags freetype2) ; do
|
||||
[[ ${x} == -I* ]] || continue
|
||||
x=${x#-I}
|
||||
if [[ -f ${x}/ft2build.h ]] ; then
|
||||
sed_args+=" -e s:/usr/include/\\r\$:${x}:"
|
||||
elif [[ -f ${x}/freetype/config/ftheader.h ]] ; then
|
||||
sed_args+=" -e s:/usr/include/freetype2\\r\$:${x}:"
|
||||
fi
|
||||
done
|
||||
[[ -n ${sed_args} ]] && \
|
||||
{ sed -i ${sed_args} cmake/modules/FindFREETYPE.cmake || die; }
|
||||
|
||||
# Bug #439784: Add missing unistd include for close() and unlink().
|
||||
sed -i 's:^#include <stdio.h>$:#include <unistd.h>\n\0:' -i \
|
||||
test/unit/TestUtils.cpp || die
|
||||
|
||||
# TODO: fix these test cases
|
||||
# ColorTest.cpp:62:Assertion
|
||||
# Test name: ColorTest::testDefaultConstructor
|
||||
# expected exception not thrown
|
||||
# - Expected: PdfError
|
||||
sed -e 's:CPPUNIT_TEST( testDefaultConstructor ://\0:' \
|
||||
-e 's:CPPUNIT_TEST( testGreyConstructor ://\0:' \
|
||||
-e 's:CPPUNIT_TEST( testRGBConstructor ://\0:' \
|
||||
-e 's:CPPUNIT_TEST( testCMYKConstructor ://\0:' \
|
||||
-e 's:CPPUNIT_TEST( testColorSeparationAllConstructor ://\0:' \
|
||||
-e 's:CPPUNIT_TEST( testColorSeparationNoneConstructor ://\0:' \
|
||||
-e 's:CPPUNIT_TEST( testColorSeparationConstructor ://\0:' \
|
||||
-e 's:CPPUNIT_TEST( testColorCieLabConstructor ://\0:' \
|
||||
-i test/unit/ColorTest.h || die
|
||||
|
||||
# ColorTest.cpp:42:Assertion
|
||||
# Test name: ColorTest::testHexNames
|
||||
# assertion failed
|
||||
# - Expression: static_cast<int>(rgb.GetGreen() * 255.0) == 0x0A
|
||||
sed -e 's:CPPUNIT_TEST( testHexNames ://\0:' \
|
||||
-i test/unit/ColorTest.h || die
|
||||
|
||||
# Bug #352125: test failure, depending on installed fonts
|
||||
# ##Failure Location unknown## : Error
|
||||
# Test name: FontTest::testFonts
|
||||
# uncaught exception of type PoDoFo::PdfError
|
||||
# - ePdfError_UnsupportedFontFormat
|
||||
sed -e 's:CPPUNIT_TEST( testFonts ://\0:' \
|
||||
-i test/unit/FontTest.h || die
|
||||
|
||||
# Bug #407015: fix to compile with Lua 5.2
|
||||
if has_version '>=dev-lang/lua-5.2' ; then
|
||||
sed -e 's: lua_open(: luaL_newstate(:' \
|
||||
-e 's: luaL_getn(: lua_rawlen(:' -i \
|
||||
tools/podofocolor/luaconverter.cpp \
|
||||
tools/podofoimpose/planreader_lua.cpp || die
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
|
||||
# Bug #381359: undefined reference to `PoDoFo::PdfVariant::DelayedLoadImpl()'
|
||||
filter-flags -fvisibility-inlines-hidden
|
||||
|
||||
mycmakeargs+=(
|
||||
"-DPODOFO_BUILD_SHARED=1"
|
||||
"-DPODOFO_HAVE_JPEG_LIB=1"
|
||||
"-DPODOFO_HAVE_PNG_LIB=1"
|
||||
"-DPODOFO_HAVE_TIFF_LIB=1"
|
||||
"-DWANT_FONTCONFIG=1"
|
||||
"-DUSE_STLPORT=0"
|
||||
$(cmake-utils_use_want boost)
|
||||
$(cmake-utils_use_has test CPPUNIT)
|
||||
)
|
||||
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
src_test() {
|
||||
cd "${CMAKE_BUILD_DIR}"/test/unit
|
||||
./podofo-test --selftest || die "self test failed"
|
||||
}
|
|
@ -1,4 +1 @@
|
|||
DIST pgadmin3-1.14.2.tar.gz 15041255 SHA256 043e782fcedbf46f040d7164256f531ad4711730b97bd280b16035fb279fd872 SHA512 a53e9b920e4112de7e7a891aaede08f0cd751f054ddee011c941b64454d7e00e1d125ece7cfe96a5598457cebf837d2f1169024cbe6c82b995bd65d0f71d6aef WHIRLPOOL 890ca9632d87805636b4914de2e92088252d10d717a2b23308a0fd224ca3c2c08ec146e21e4a4232bfce7b6b4dd833a1322651bc74c7987772cbdc71749b4e6b
|
||||
DIST pgadmin3-1.14.3.tar.gz 15074739 SHA256 00724a88b9f9f6ded24c98052053aef9b09a6a51816fbe9809f398307de12dd7 SHA512 14439ffc87309f6dccc243db33fcfb454a8892afd88ef0c6961750e3604a62427bcf2b1984eb80177ed193e03644e8d6f83fa4ae2102a62f03684df7f33e8bd2 WHIRLPOOL 5670bb23fae12a1aa0e34ffc862c372176eb1e43be9eb8838d18a981bdc5830c35905f7e1d6e3be606a04ff246dda52769bdd4127b2ac86fd5bede87b65a5b09
|
||||
DIST pgadmin3-1.16.0.tar.gz 13467810 SHA256 f9cd6ff620f9c920615261ed6bd4b4c9f7b446420ed18a8080d2375640d851ac SHA512 d6d3fa96af3dd655c799134f106d68f1684d245ff2bbb2bf510c574afb667693ffe0167e4795c791fcdcaab4f129a166c085832e78812a4d591009a4ea47d96b WHIRLPOOL 78eae140d5b250925a002af65a4150bd0d1c7c563a63d0909500d4b1092655cfc2114cf73787492cee0b7cf643da5c61b77089b7ed0cd3da301f45dc7b05f1e4
|
||||
DIST pgadmin3-1.16.1.tar.gz 13783723 SHA256 d4ba243dc24dc28e6d0db4104baec373ab3bec11c6dc0e6cfa4bd665a5b7c28e SHA512 f5f110f99d15801dc2b2253c803cf038871461909cb63f114ee769ff0977183d6825f3bf13f378822f874fc15aa593f52cd999ccb97370b786b6e02f45ce4a81 WHIRLPOOL 375f444147e2ff850d1fdffe8d88bbd9296aff652f1008447242e7cbe5995ad1ba37822fafe5012d09bf963cf4485183f72087c3ade3740c2eab974e931fb5b1
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/pgadmin3/pgadmin3-1.14.2.ebuild,v 1.4 2012/04/16 21:37:54 ranger Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WX_GTK_VER="2.8"
|
||||
|
||||
inherit multilib versionator wxwidgets
|
||||
|
||||
DESCRIPTION="wxWidgets GUI for PostgreSQL."
|
||||
HOMEPAGE="http://www.pgadmin.org/"
|
||||
SRC_URI="mirror://postgresql/${PN}/release/v${PV}/src/${P}.tar.gz"
|
||||
|
||||
LICENSE="POSTGRESQL"
|
||||
KEYWORDS="amd64 ppc x86 ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="debug"
|
||||
|
||||
DEPEND="x11-libs/wxGTK:2.8[X,debug=]
|
||||
>=dev-db/postgresql-base-8.4.0
|
||||
>=dev-libs/libxml2-2.6.18
|
||||
>=dev-libs/libxslt-1.1"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_setup() {
|
||||
local pgslot=$(postgresql-config show)
|
||||
|
||||
if [[ ${pgslot//.} < 84 ]] ; then
|
||||
eerror "PostgreSQL slot must be set to 8.4 or higher."
|
||||
eerror " postgresql-config set 8.4"
|
||||
die "PostgreSQL slot is not set to 8.4 or higher."
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf --with-wx-version=2.8 \
|
||||
$(use_enable debug)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
newicon "${S}/pgadmin/include/images/pgAdmin3.png" ${PN}.png
|
||||
|
||||
# icon location for the desktop file provided in pkg folder
|
||||
insinto /usr/share/pgadmin3
|
||||
doins "${S}/pgadmin/include/images/pgAdmin3.png"
|
||||
|
||||
domenu "${S}/pkg/pgadmin3.desktop"
|
||||
|
||||
# Fixing world-writable files
|
||||
fperms -R go-w /usr/share
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/pgadmin3/pgadmin3-1.14.3.ebuild,v 1.4 2012/09/12 13:47:33 johu Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WX_GTK_VER="2.8"
|
||||
|
||||
inherit multilib versionator wxwidgets
|
||||
|
||||
DESCRIPTION="wxWidgets GUI for PostgreSQL."
|
||||
HOMEPAGE="http://www.pgadmin.org/"
|
||||
SRC_URI="mirror://postgresql/${PN}/release/v${PV}/src/${P}.tar.gz"
|
||||
|
||||
LICENSE="POSTGRESQL"
|
||||
KEYWORDS="amd64 ppc x86 ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="debug"
|
||||
|
||||
DEPEND="x11-libs/wxGTK:2.8[X,debug=]
|
||||
>=dev-db/postgresql-base-8.4.0
|
||||
>=dev-libs/libxml2-2.6.18
|
||||
>=dev-libs/libxslt-1.1"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_setup() {
|
||||
local pgslot=$(postgresql-config show)
|
||||
|
||||
if [[ ${pgslot//.} < 84 ]] ; then
|
||||
eerror "PostgreSQL slot must be set to 8.4 or higher."
|
||||
eerror " postgresql-config set 8.4"
|
||||
die "PostgreSQL slot is not set to 8.4 or higher."
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf --with-wx-version=2.8 \
|
||||
$(use_enable debug)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
newicon "${S}/pgadmin/include/images/pgAdmin3.png" ${PN}.png
|
||||
|
||||
# icon location for the desktop file provided in pkg folder
|
||||
insinto /usr/share/pgadmin3
|
||||
doins "${S}/pgadmin/include/images/pgAdmin3.png"
|
||||
|
||||
domenu "${S}/pkg/pgadmin3.desktop"
|
||||
|
||||
# Fixing world-writable files
|
||||
fperms -R go-w /usr/share
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/pgadmin3/pgadmin3-1.16.0.ebuild,v 1.1 2012/11/08 11:15:01 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WX_GTK_VER="2.8"
|
||||
|
||||
inherit multilib versionator wxwidgets
|
||||
|
||||
DESCRIPTION="wxWidgets GUI for PostgreSQL."
|
||||
HOMEPAGE="http://www.pgadmin.org/"
|
||||
SRC_URI="mirror://postgresql/${PN}/release/v${PV}/src/${P}.tar.gz"
|
||||
|
||||
LICENSE="POSTGRESQL"
|
||||
KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
|
||||
SLOT="0"
|
||||
IUSE="debug"
|
||||
|
||||
DEPEND="x11-libs/wxGTK:2.8[X,debug=]
|
||||
>=dev-db/postgresql-base-8.4.0
|
||||
>=dev-libs/libxml2-2.6.18
|
||||
>=dev-libs/libxslt-1.1"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
pkg_setup() {
|
||||
local pgslot=$(postgresql-config show)
|
||||
|
||||
if [[ ${pgslot//.} < 84 ]] ; then
|
||||
eerror "PostgreSQL slot must be set to 8.4 or higher."
|
||||
eerror " postgresql-config set 8.4"
|
||||
die "PostgreSQL slot is not set to 8.4 or higher."
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf --with-wx-version=2.8 \
|
||||
$(use_enable debug)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
|
||||
newicon "${S}/pgadmin/include/images/pgAdmin3.png" ${PN}.png
|
||||
|
||||
# icon location for the desktop file provided in pkg folder
|
||||
insinto /usr/share/pgadmin3
|
||||
doins "${S}/pgadmin/include/images/pgAdmin3.png"
|
||||
|
||||
domenu "${S}/pkg/pgadmin3.desktop"
|
||||
|
||||
# Fixing world-writable files
|
||||
fperms -R go-w /usr/share
|
||||
}
|
|
@ -1,30 +1,11 @@
|
|||
DIST postgresql-8.3.20.tar.bz2 14624435 SHA256 922b6165dc21739356e22ba4d53e08f3b26cd38d8fb9569d5f8fa6d239611163 SHA512 e709632db165f543e510334adfa191ecff6fbe5ae6726578cbb5e4858de62fda53e67b19171c302492361c580bf6894af84dc97ee81e1146a04aec2984d4f91f WHIRLPOOL beee4643d4c2212d9d49390bf1f3ff279f54f2d3c90743610ee59d7e8b93a1e61136654a1f5abe5d49a7826afdea8166ae047f7f2eb2f461c543bf3111f294d5
|
||||
DIST postgresql-8.3.21.tar.bz2 14626010 SHA256 a64b6de9f8067b803f2ed46a025bfd2a16a5ae270db60e440a698f2c07e234f8 SHA512 6da6fab655412fb2cc59ba6228596d6d3caff1a0c6bbd574b61c807bc18941b8d3db6824ffb7da1ad78d89c61d4407402bdb0904bf7b60c49959f40cb2bf3191 WHIRLPOOL 1bb3afefa2610537a35d148ccf2b65d6fe2915774aa61e92afeaadb3c6e923bf1771be7a5828c8ac67d2a0dac94f8bad3330cb38fa2f3b6993ebe493998f11a0
|
||||
DIST postgresql-8.3.22.tar.bz2 14630723 SHA256 17b8f3709c0442e25329e41743f980b10a3149940cee921c28e0bb5b51fef0c6 SHA512 bdcde0659062f5045c6596cd5bb7e90e7e99cf6316896d211c5125ce11f52f2ffdc911aa960556ef06c5fb62a5f2e6efc3555eca060df7eb8bebcdc805d73bee WHIRLPOOL 093dceec2b2c25af70048e7fc49b1f3741115f362777c0f1687745a50fa3cdfd8ddd6b42be0c256b413188e17dfeb977c41aab56f0f91f3010d491278e9b36c9
|
||||
DIST postgresql-8.3.23.tar.bz2 14684669 SHA256 17a46617ddbeb16f37d79b43f4e72301b051e6ef888a2eac960375bf579018d9 SHA512 fa8e01c615298e4e4c77e0c0bf26913a96572d4c578c48c77fd9197ab20fe5c43ed1e72b9552ed266ff272d859014da0c8c8d11a120b6c01bf561c7d0f77fdc1 WHIRLPOOL 25d737bcac9e77529e3cf07741acfb156e3991f6bc6f154d7007ee879b5c510261eab96b7147c2cc485506c28cfc6692b0165a6d370a50e6de0dbdf7900c0b50
|
||||
DIST postgresql-8.4.13.tar.bz2 14666613 SHA256 20dd3442a3fa3a4fb1813b58f969ce4bbc54d73194fd4fe20d6f1313edc48cb9 SHA512 c6294846bf9adf39d5d57d2df26023ed4aa83464a773789eaaf5823a6dd6005eeb756f3835caaffde72729edd5b1f0ab300309417a4f9b570d6110b62096f1e4 WHIRLPOOL 1a9cbbdf1d651e49d85b7edee5da70fcadcef20a10fbc4340bd43679144662c68bede5c68b38933aaed8cc1a9a4db8c0b48e2a183140f901e07f09055e958e96
|
||||
DIST postgresql-8.4.14.tar.bz2 14679559 SHA256 1172e7735beea8a933eab0a4c01f9ad49fe872d8786af12a7fe596346b1d133a SHA512 bf9ddb393de08bbff92708b83697b907fbf34229a2ce66e1bf97c1deb9630c37c9a363f9305889e1f6ce4671d116a2c267302b7681281bb0482575ac81d6f28e WHIRLPOOL 8fe681ce8d263116fb2d3554adb2f45c1b21f7d6b840396fee532f7f200809dacc5127df7102b97be88193cd39148b40c81d781ec73ffc508e4908b0af2426bf
|
||||
DIST postgresql-8.4.15.tar.bz2 14701182 SHA256 6a83771bbbdf1ad9c1dd900da3fbfdf6ef75857db8e012f7129a1f865279bc4d SHA512 a1019c9324db9fb582cb554536c06d8f89a7dd92649e890206ea6c9d3e99127f37ff6598341505ce9bc1b095190583a53bdccc18773422097c33da98c17cb25d WHIRLPOOL 242bbb44a6042a40ad7a55a7b98422c21cdcf77cc778ab5f4a3e29553dc83a182ce2d7415df430545fdd9d8f3e53a21d09377f1f049269bc323c5f749cccc19f
|
||||
DIST postgresql-8.4.16.tar.bz2 14784029 SHA256 8d03d94d3957019227066f427ccb11232a823f2558e2f57e1ea2bc9ba004612f SHA512 05fd72b61eb478c3e6682956ec7a1216490c9b5e430f82baeba2a75cb78723e622b0e513153d64373919747c9e12647fc58aafe8a7aa2b5789baa577597e8c62 WHIRLPOOL 58b3c3a15478cbcb17e2447e30b21a16b1846c9188919ab11e4fe5ea5933803872eb5f6154630b9e8a053d636eef8d8f8fda5dd755a54ec978dcab3a93abf5b5
|
||||
DIST postgresql-9.0.10.tar.bz2 15015826 SHA256 4394184b0099e8c86a482f7d62930aa31b50fb23e7dfb8fe9e1d93eb828dc729 SHA512 93a6d63d89800f9fc2eeef694c55afcdb8b8a255a2952a69b1816a31b831d0f86ed8b8fc88ad68cbc27f322eb1aba24e2cc9d891a5487217753b3f196fa5b754 WHIRLPOOL e5161e09c636f6a48d72de4befb967575a94b429129e72e4eb6013dc074bfe4f8ad43e4a15c40ec7e00b64d790cdd8da0eeb8a0555db44ce59fb336b0153799e
|
||||
DIST postgresql-9.0.11.tar.bz2 15044657 SHA256 a6dcdc8dc5cea5feb4522b0638646173e5a6680bd1e9b7ab72a8981e54e07b2c SHA512 54622307b1a2f27d1dca919e1ad1e098b64e9e9fcbbf7a8b17cd8266af9c6712028cdb24a41c7c77a55c61c9445b872909f84db349117f58dd36d8cb450667a0 WHIRLPOOL 2d1a3f3faa7b3658c0ea011641903df71b8fcf0f1220cfcbde7c8228176cc9eca5b5a38c8eee2b4b64132a0f5844b5b3ac25ba9d4e979f3e2f7ac27a96716720
|
||||
DIST postgresql-9.0.12.tar.bz2 15122949 SHA256 80f06873cbdc8789abe6806dc52a708d9a7f4ac5432ffea4c069cbc33b2b1524 SHA512 e5259b0ee64d1f7d0a7662279433c782cf3a68cd5713b296f4e1225323b951b7d8512057be823b40d7c32487f5a508770aadd732c9c1ceeaa835e661bc8e010e WHIRLPOOL 12fadc8037825216533062c0ee7a5ae55e80771acdce6ad072e45f3432af00808cb94439a68294308b0585135e2118c36a7c9686d57f2d77b1d87a83d3dad514
|
||||
DIST postgresql-9.0.9.tar.bz2 15008401 SHA256 87417d181a0f534fa96ba1d315a62b721f5bc22b7bb70af3f674bc1a68a5da8a SHA512 1d0c1f38f7872402b3011a624c7fb11cae79d165432c2134e37d078bfcbf836e5d55f2e9c92770d0a4c7db1680b2287ca55d981b8cffc0dc8b1a291c4ec4877b WHIRLPOOL 4d8c3e987ea1c07e4550d8b79eaee8cce2fec4cf39aab70bb69f364796c3ff472f5e0e953bddf3f1dc3878b4db458c2ca14073df8925e57b614974496476c921
|
||||
DIST postgresql-9.1.5.tar.bz2 15602594 SHA256 0b889c132426fc68d8c2eb1bf112bf99cc653e9c95b5f4bbebc55cd9a8d6ce44 SHA512 63998808c8a5ad7a4712d6639a7d77d01bfdfee1ea41a40e7db1c4c469e3ecdf3af78a0451907aaf856f2e76e5166de15fb9009143fca8b4d36c964291402930 WHIRLPOOL 1d89227d7801e7d45465130e90c6f1ede8cca459e3879a9f641c5d90a6ffbd8a77cd6f8b489d7a8273246ef9d51c7c5218f611b9816351a7f4562bf7ac0112d2
|
||||
DIST postgresql-9.1.6.tar.bz2 15621370 SHA256 6e396aca621a95b9f5f7292a79ebe6ce892e36c7f7021814e1bd94bcfc6c31e7 SHA512 80fbb62734ac20a500ef9f0a307543011a376c3162304cd8996cba3ea4aba32681dfa556ba06450bdc400971efb65cc9ce2635844950e4f6f31badaa93fe25a4 WHIRLPOOL 1cc8953beb9cc0cf8461147a7c4fa1b5312293625375568240e25ebcefe95334c1e4192df412a7ae8f5d018ded57478763b0921e62602c17c7b3ef81db688e65
|
||||
DIST postgresql-9.1.7.tar.bz2 15688516 SHA256 df19eaa98e6065034401b312f476ab4d3c27d67e0ae5063400eae8b00d333c82 SHA512 bac35312d7869f8b1668c2cd1aa08edfc8803ac0dcc03146295ce394ed83fb7c8666a55668bff1f8388b1f3257bdf545625f9df9bf79ce9b9573edfd6e23be5f WHIRLPOOL f9fb4b986c90ba0eebc52284a9a0926bd740b45be3c9cb5dccf74f994a7477f8a615d70ca0d7f33c72e02ee3e06c2a6a56d6658cde3a07de089cb0733e282b0c
|
||||
DIST postgresql-9.1.8.tar.bz2 15815313 SHA256 1d88f9dda24062dbfcc09aca9a316981f2aa93322613b853cf32d7a431b44c6d SHA512 7e4dc17fda40dcc8117d750866aa52e950e52c5d50f7b10c2f01fb4a5fd6f09ec5000d0977a0636e047185cf0de3f6f5e41eb61ac6e20a6ac39bdeae452de4af WHIRLPOOL 6c00342733ec8ff0d82874184235a0be08bda4e624afa25c81e183ade8a5555b782361d8d914a018b9549c29807b5e67d8c806d7136ab299cd3ea20c302f530d
|
||||
DIST postgresql-9.2.1.tar.bz2 16113737 SHA256 db61d498105a7d5fe46185e67ac830c878cdd7dc1f82a87f06b842217924c461 SHA512 37e5c193006c548d0b1e200e9dca18ca918a0fe7d5dcea1615ce6240b7f13d9ea30913ef3b309abac3a4c15f65202aa1e72b1a3cc0b22321854fd6187dbac8d0 WHIRLPOOL 97872b8354ed0efd0aa7bd2afa5c127e9aecfce5d44d8a10e02d62050321bf4a948e7d3a4ab7f830afa4f8c2257adc96408c09bd09c8dade8d9c32ea5181f8c1
|
||||
DIST postgresql-9.2.2.tar.bz2 16222148 SHA256 e1a7a854a98896cb7fcd1696a76fca6f3bcac94d75e68a6154ffe2b69184f7f3 SHA512 147690b168838b7d45cc805882cb6ef628cbf656ff115d32ab76c4ad38b06aa00223f728bf0e5befcdd27cc4e27a917493d857f1f29006952f0ff07da6615808 WHIRLPOOL f67b8ba8170f3a03ca5ee050286f6e830cbd086f6ee15095d5ec0e0cc48a342b9db263759451a63cdd9f669b0d55cbb3689ca781dd9f42f1cdb9e57c67ddb0c9
|
||||
DIST postgresql-9.2.3.tar.bz2 16371616 SHA256 c4f5a63290c0c32d8d9899edee8188d0c8ab124a7199b154fac75e62eec35f7f SHA512 e2520ae03f3cac3effed6e8e45900f6718a944c9a3c90d856819caaeeb6ba9b2324744c18a37b8e9bc5d7e63abab5b84f20259b797fd81ace0040a578f87aad8 WHIRLPOOL 28d948285392586f89dd39f757560413289c78e2a0929c3104608936b64a3488df85a8ffc38e516253185a36738ae308ee44eb9e08d2b0d8196e94488112ba82
|
||||
DIST postgresql-patches-8.3-r2.tbz2 5501 SHA256 adae4c048745de04fd44f0408e8ab85aa5cae283cb3ddc2962e0379905cca73f SHA512 6f7f3f3e7bb22da3fad237b2f14e2723004b818d6555031054dc3d03fb51d922eefdee90d053673a8e0ceefe06868d9a6427046a4da80d44a439aa3114c54819 WHIRLPOOL dd25124acfbcc717f0e908787c690f35f905adc4fdee5349d09924371f66bad281a89be60d90be98a2824608c105c7767e5f2b75d95587bd346cc2869366e140
|
||||
DIST postgresql-patches-8.3-r3.tbz2 5490 SHA256 5c791bd4ddea564341f4c2766dec6749756938c5da9c289e35ed92e98a3c2bef SHA512 fa70d615df28b82159aa6d120f6fffc5700902b6b7a2c36d023a0ab4c113b7fbe5ca9dbc391ee6f1e934e3582c61d6b2e6cd73121f9dbb403d32c56d585e2140 WHIRLPOOL e126798b28496ceb6be2979c39cf9036ea4c5cbee19cdad65f5ff0a6072f417be8b332e16ca5f358f57326afd577a4145ac964d5abef9b069cf32f84692f9e9c
|
||||
DIST postgresql-patches-8.4-r2.tbz2 4822 SHA256 9920097ff5243df28788a6f3bdf6cdad38e6c42885f38da84b0f2c8c242954d7 SHA512 e074509ea8246ac74deae98507d29c30e0def6b88cb0c578294ef58f165681f4c2927d8e6392e34f57751ddb21e3c50852da3d3f5ca40f95a8ce89d65412e1f9 WHIRLPOOL 225336ce3e4323e9a9c16892def1065556d4c324e14a48553e3bb9a4ad6048d16731088adf4bc4b29ce3d692bd0e900afa1440ab2ae0a2710034422941a9e14b
|
||||
DIST postgresql-patches-8.4-r3.tbz2 4821 SHA256 f2c47ff5cf6af20020c87bc34362615af66675d7d44dd020ccfae425880e1ace SHA512 149434a1a55f130b91b87591ac6bbbd263893e90facfdc47418320561a91cb818dea6367af5b8afbb6c9cccea6053692ee3008c62cbe40e8819c7cac04389334 WHIRLPOOL 30d5945bd65e07f114d8ee27bcbc1dc7ae136a2b5a1f62ec44aad325208dc8387ae11f58c21ebf1447822b35fe35b79d64c86cf763e146dc9c2b5da7dc883d47
|
||||
DIST postgresql-patches-9.0-r3.tbz2 4503 SHA256 2d454575423f0e56f23d540fbc865309d0bee3f80e5e05a7e1d793a7e70763cf SHA512 1a4e2c2d7ffe91cc7847ac42b2e83d708b38a93addb17d8a7234a159aa06bd125b2e915d3e78f7732d4e4ea94b897899ed832f4099b9260418fb1f1ecf265d38 WHIRLPOOL f20a030fe3244879ccddfcbf816bc7caf22231bf68c816eb5552968217c5adb7ff9ddaf5cea45ff576b6e7d2fbb9ac1276ffad3b319a4facf93a4ee409edf435
|
||||
DIST postgresql-patches-9.0-r4.tbz2 4525 SHA256 96f9af00dea1c33f9c77754e8ee37334012b8098361c321bd3f562ca9c32f6b8 SHA512 1e792eaf1e194e7a109a860216de98929bc12e6905846524e795fed7e8506f8f0e2e7349ead4fd9ba196c8eb6af2f5b143d0eecdb4cb7061253257acbce37873 WHIRLPOOL 8a32c0cd7f6b845496df8d1f6a0b2497625c0da36c5af1d651be086e9cd4faec48b56b04dca894a0e43e91309868db3014213d9989da5fd1d52d5b3775f8c1ad
|
||||
DIST postgresql-patches-9.1-r1.tbz2 4547 SHA256 50cefff4a6f6e1fd38b99dde4793dc5f153b9691ff5c59fbb2b97864f1f7d727 SHA512 d6baafb0b6980b860157cd8b557a2d1f696e0a4b1f34ad46185fd0204df1fc66972398f9f8f47a49b6623cec2f790d98adcd45bf59329d126c45f07ee15b3542 WHIRLPOOL 12cb3a028e204c6da3e44e9c9c6388d5650a42fc35c9d25cf18f928bbc896d854ddabd9012b76c84fe74d3f6ccbd94742a3dc53e5a1101f536a5c9a31ec04a35
|
||||
DIST postgresql-patches-9.1-r2.tbz2 4552 SHA256 e33a684be93d2bf70566245601da5ea3f831f4ed4b2ff1fa91f8083be3d3bc21 SHA512 3154616884615fea9e826f347e32b89bbddf18256875b3a23b1b6b5d9c0a1bf6159230ab0c6c6245782987d12156ecaa8e51ab1d25a27b5bae7f72cd565784af WHIRLPOOL 8820ea3a96b31baf3b3294c56ed95c9d2d916fdf9584fef38a0b6299b292883af6dda93e4818af09d1ab4b4d66dde258beb56ab2121bb48adbd806f7038b5b82
|
||||
DIST postgresql-patches-9.2.tbz2 4431 SHA256 8ce635671d5af4d2c8d9a0fc741b26f82f1fda16bb6a36726a32dae47021a632 SHA512 4c971bd3f4ae86a48f5e21a1e4ab087865d41f2445f5a9ddfcd7d11f1abab7be8968e5a1bcfbe4a1f7799e7ca1728604aa01641883c47746ebfab658c189f6e5 WHIRLPOOL 712fae68cdf5b06e05f98e23760d896c7361fe0b548839082b8b0c488597bd0f38b80585677d380f8ccb7ded39e759ee42fa9eff838439468b5ac3a501004e8d
|
||||
DIST postgresql-patches-9.2beta2.tbz2 4466 SHA256 7033657bf66255fda3881ee6797ad0aa920e1910619228206b174065e5e348d2 SHA512 64150e055aabe04e1a298170a992c607313299d3990c05ac4146c05e6bb2a55e29999d45cf29d7111df5fda0f135980665c4c6c6c83d3f1df26c27334daf17bb WHIRLPOOL f67a99b39e99ab26e8d1125886493b53a3589908433618e7601281735dee4d2e54fdaed84e4608961264723cf27284e9ead798087f9b896a5ada8bdc70c51f9d
|
||||
DIST postgresql-patches-9.2beta3.tbz2 4466 SHA256 7033657bf66255fda3881ee6797ad0aa920e1910619228206b174065e5e348d2 SHA512 64150e055aabe04e1a298170a992c607313299d3990c05ac4146c05e6bb2a55e29999d45cf29d7111df5fda0f135980665c4c6c6c83d3f1df26c27334daf17bb WHIRLPOOL f67a99b39e99ab26e8d1125886493b53a3589908433618e7601281735dee4d2e54fdaed84e4608961264723cf27284e9ead798087f9b896a5ada8bdc70c51f9d
|
||||
|
|
|
@ -1,154 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.3.20.ebuild,v 1.7 2012/09/20 18:06:32 blueness Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg-intdatetime readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.10
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( >=sys-libs/readline-4.1 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( >=sys-libs/zlib-1.1.3 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
>=sys-devel/bison-1.875
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch" "${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/relax_ssl_perms.patch" "${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-docdir \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
--without-tcl \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable pg-intdatetime integer-datetimes ) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
dodir /usr/share/postgresql-${SLOT}/man/man1
|
||||
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{initdb,ipcclean,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,154 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.3.21.ebuild,v 1.5 2012/12/01 19:10:30 armin76 Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg-intdatetime readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.10
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( >=sys-libs/readline-4.1 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( >=sys-libs/zlib-1.1.3 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
>=sys-devel/bison-1.875
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch" "${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/relax_ssl_perms.patch" "${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-docdir \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
--without-tcl \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable pg-intdatetime integer-datetimes ) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
dodir /usr/share/postgresql-${SLOT}/man/man1
|
||||
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{initdb,ipcclean,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,157 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.3.22-r1.ebuild,v 1.1 2013/01/12 19:08:18 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg-intdatetime readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.10
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( >=sys-libs/readline-4.1 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( >=sys-libs/zlib-1.1.3 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
>=sys-devel/bison-1.875
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch" "${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/relax_ssl_perms.patch" "${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-docdir \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
--without-tcl \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable pg-intdatetime integer-datetimes ) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
dodir /usr/share/postgresql-${SLOT}/man/man1
|
||||
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{initdb,ipcclean,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
insinto /usr/share/doc/postgresql-${SLOT}
|
||||
doins README HISTORY doc/{FAQ*,README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,154 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.3.22.ebuild,v 1.1 2012/12/10 06:01:02 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg-intdatetime readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.10
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( >=sys-libs/readline-4.1 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( >=sys-libs/zlib-1.1.3 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
>=sys-devel/bison-1.875
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch" "${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/relax_ssl_perms.patch" "${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-docdir \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
--without-tcl \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable pg-intdatetime integer-datetimes ) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
dodir /usr/share/postgresql-${SLOT}/man/man1
|
||||
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{initdb,ipcclean,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.3.23.ebuild,v 1.11 2013/02/11 18:20:12 ago Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.3.23.ebuild,v 1.12 2013/02/26 18:51:12 ago Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
|
@ -10,7 +10,7 @@ inherit autotools eutils multilib prefix versionator
|
|||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
|
|
@ -1,154 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.4.13.ebuild,v 1.7 2012/09/20 18:06:32 blueness Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.7
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( >=sys-libs/readline-4.1 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( >=sys-libs/zlib-1.1.3 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
>=sys-devel/bison-1.875
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch" "${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes ) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
rm -r "${ED}/usr/share/doc/postgresql-${SLOT}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,154 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.4.14.ebuild,v 1.5 2012/12/01 19:10:30 armin76 Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.7
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( >=sys-libs/readline-4.1 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( >=sys-libs/zlib-1.1.3 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
>=sys-devel/bison-1.875
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch" "${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes ) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
rm -r "${ED}/usr/share/doc/postgresql-${SLOT}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,157 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.4.15-r1.ebuild,v 1.1 2013/01/12 19:08:18 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.7
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( >=sys-libs/readline-4.1 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( >=sys-libs/zlib-1.1.3 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
>=sys-devel/bison-1.875
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch" "${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes ) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
rm -r "${ED}/usr/share/doc/postgresql-${SLOT}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
insinto /usr/share/doc/postgresql-${SLOT}
|
||||
doins README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,154 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.4.15.ebuild,v 1.1 2012/12/10 06:01:02 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.7
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( >=sys-libs/readline-4.1 )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( >=sys-libs/zlib-1.1.3 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
>=sys-devel/bison-1.875
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch" "${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes ) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
rm -r "${ED}/usr/share/doc/postgresql-${SLOT}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.4.16.ebuild,v 1.11 2013/02/11 18:20:12 ago Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.4.16.ebuild,v 1.12 2013/02/26 18:51:12 ago Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
|
@ -10,7 +10,7 @@ inherit autotools eutils multilib prefix versionator
|
|||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
|
|
@ -1,160 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.0.10.ebuild,v 1.5 2012/12/01 19:10:30 armin76 Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.7
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
!!<sys-apps/sandbox-2.0
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_controldata,pg_ctl,pg_resetxlog,postgres,postmaster}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,163 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.0.11-r1.ebuild,v 1.1 2013/01/12 19:08:18 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.7
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
!!<sys-apps/sandbox-2.0
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_controldata,pg_ctl,pg_resetxlog,postgres,postmaster}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
insinto /usr/share/doc/postgresql-${SLOT}
|
||||
doins README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,160 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.0.11.ebuild,v 1.1 2012/12/10 06:01:02 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.7
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
!!<sys-apps/sandbox-2.0
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_controldata,pg_ctl,pg_resetxlog,postgres,postmaster}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.0.12.ebuild,v 1.11 2013/02/11 18:20:12 ago Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.0.12.ebuild,v 1.12 2013/02/26 18:51:12 ago Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
|
@ -10,7 +10,7 @@ inherit autotools eutils flag-o-matic multilib prefix versionator
|
|||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
|
|
@ -1,160 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.0.9.ebuild,v 1.7 2012/09/20 18:06:32 blueness Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND=">=app-admin/eselect-postgresql-1.0.7
|
||||
virtual/libintl
|
||||
!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
!!<sys-apps/sandbox-2.0
|
||||
nls? ( sys-devel/gettext )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
local PO="${EPREFIX%/}"
|
||||
econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
$(use_with ldap) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with readline) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_controldata,pg_ctl,pg_resetxlog,postgres,postmaster}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,164 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.1.5.ebuild,v 1.7 2012/09/20 18:06:32 blueness Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
>=app-admin/eselect-postgresql-1.0.10
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with readline) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib) \
|
||||
$(use_with ldap)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,164 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.1.6.ebuild,v 1.5 2012/12/01 19:10:30 armin76 Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
>=app-admin/eselect-postgresql-1.0.10
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with readline) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib) \
|
||||
$(use_with ldap)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,168 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.1.7-r1.ebuild,v 1.1 2013/01/12 19:08:18 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
>=app-admin/eselect-postgresql-1.0.10
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with readline) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib) \
|
||||
$(use_with ldap)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
insinto /usr/share/doc/postgresql-${SLOT}
|
||||
doins README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,164 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.1.7.ebuild,v 1.1 2012/12/10 06:01:02 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
>=app-admin/eselect-postgresql-1.0.10
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with readline) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib) \
|
||||
$(use_with ldap)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
einfo
|
||||
einfo "If this is your first install of PostgreSQL, you 'll want to:"
|
||||
einfo " source /etc/profile"
|
||||
einfo "In your open terminal sessions."
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.1.8.ebuild,v 1.11 2013/02/11 18:20:12 ago Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.1.8.ebuild,v 1.12 2013/02/26 18:51:12 ago Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
|
@ -8,7 +8,7 @@ WANT_AUTOMAKE="none"
|
|||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
|
|
@ -1,170 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.2.1.ebuild,v 1.5 2012/12/01 19:10:30 armin76 Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# Comment the following five lines when not a beta or rc.
|
||||
#MY_PV="${PV//_}"
|
||||
#MY_FILE_PV="${SLOT}$(get_version_component_range 4)"
|
||||
#S="${WORKDIR}/postgresql-${MY_FILE_PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${MY_FILE_PV}/postgresql-${MY_FILE_PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}beta3.tbz2"
|
||||
|
||||
# Comment the following three lines when a beta or rc.
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}beta3.tbz2"
|
||||
|
||||
LICENSE="POSTGRESQL"
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
sys-apps/less
|
||||
>=app-admin/eselect-postgresql-1.0.10
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with readline) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib) \
|
||||
$(use_with ldap)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,174 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.2.2-r1.ebuild,v 1.1 2013/01/12 19:08:18 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# Comment the following five lines when not a beta or rc.
|
||||
#MY_PV="${PV//_}"
|
||||
#MY_FILE_PV="${SLOT}$(get_version_component_range 4)"
|
||||
#S="${WORKDIR}/postgresql-${MY_FILE_PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${MY_FILE_PV}/postgresql-${MY_FILE_PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}beta3.tbz2"
|
||||
|
||||
# Comment the following three lines when a beta or rc.
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}beta3.tbz2"
|
||||
|
||||
LICENSE="POSTGRESQL"
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
sys-apps/less
|
||||
>=app-admin/eselect-postgresql-1.0.10
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with readline) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib) \
|
||||
$(use_with ldap)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
insinto /usr/share/doc/postgresql-${SLOT}
|
||||
doins README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,170 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.2.2.ebuild,v 1.1 2012/12/10 06:01:02 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# Comment the following five lines when not a beta or rc.
|
||||
#MY_PV="${PV//_}"
|
||||
#MY_FILE_PV="${SLOT}$(get_version_component_range 4)"
|
||||
#S="${WORKDIR}/postgresql-${MY_FILE_PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${MY_FILE_PV}/postgresql-${MY_FILE_PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}beta3.tbz2"
|
||||
|
||||
# Comment the following three lines when a beta or rc.
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-${SLOT}beta3.tbz2"
|
||||
|
||||
LICENSE="POSTGRESQL"
|
||||
DESCRIPTION="PostgreSQL libraries and clients"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
# No tests to be done for clients and libraries
|
||||
RESTRICT="test"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="!!dev-db/libpq
|
||||
!!dev-db/postgresql
|
||||
!!dev-db/postgresql-client
|
||||
!!dev-db/postgresql-libs
|
||||
sys-apps/less
|
||||
>=app-admin/eselect-postgresql-1.0.10
|
||||
virtual/libintl
|
||||
kerberos? ( virtual/krb5 )
|
||||
ldap? ( net-nds/openldap )
|
||||
pam? ( virtual/pam )
|
||||
readline? ( sys-libs/readline )
|
||||
ssl? ( >=dev-libs/openssl-0.9.6-r1 )
|
||||
zlib? ( sys-libs/zlib )
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
!!<sys-apps/sandbox-2.0
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/base.patch" \
|
||||
"${WORKDIR}/bool.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
# to avoid collision - it only should be installed by server
|
||||
rm "${S}/src/backend/nls.mk"
|
||||
|
||||
# because psql/help.c includes the file
|
||||
ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h || \
|
||||
die "RUNDIR sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
export LDFLAGS_SL="${LDFLAGS}"
|
||||
export LDFLAGS_EX="${LDFLAGS}"
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
econf \
|
||||
--prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
|
||||
--datadir="${PO}/usr/share/postgresql-${SLOT}" \
|
||||
--docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
|
||||
--sysconfdir="${PO}/etc/postgresql-${SLOT}" \
|
||||
--includedir="${PO}/usr/include/postgresql-${SLOT}" \
|
||||
--mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
|
||||
--without-tcl \
|
||||
--without-perl \
|
||||
--without-python \
|
||||
$(use_with readline) \
|
||||
$(use_with kerberos krb5) \
|
||||
$(use_with kerberos gssapi) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")" \
|
||||
$(use_with pam) \
|
||||
$(use_enable !pg_legacytimestamp integer-datetimes) \
|
||||
$(use_with ssl openssl) \
|
||||
$(use_enable threads thread-safety) \
|
||||
$(use_with zlib) \
|
||||
$(use_with ldap)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
insinto /usr/include/postgresql-${SLOT}/postmaster
|
||||
doins "${S}"/src/include/postmaster/*.h
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/
|
||||
cp -r "${S}"/doc/src/sgml/man{1,7} "${ED}"/usr/share/postgresql-${SLOT}/man/ || die
|
||||
rm "${ED}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
cd "${S}/contrib"
|
||||
emake DESTDIR="${D}" install
|
||||
cd "${S}"
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
|
||||
|
||||
keepdir /etc/postgresql-${SLOT}
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "If you need a global psqlrc-file, you can place it in:"
|
||||
elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.2.3-r1.ebuild,v 1.11 2013/02/11 18:20:12 ago Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.2.3-r1.ebuild,v 1.12 2013/02/26 18:51:12 ago Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
|
@ -8,7 +8,7 @@ WANT_AUTOMAKE="none"
|
|||
|
||||
inherit autotools eutils flag-o-matic multilib prefix versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
|
|
|
@ -1,19 +1,5 @@
|
|||
DIST postgresql-8.3.20.tar.bz2 14624435 SHA256 922b6165dc21739356e22ba4d53e08f3b26cd38d8fb9569d5f8fa6d239611163 SHA512 e709632db165f543e510334adfa191ecff6fbe5ae6726578cbb5e4858de62fda53e67b19171c302492361c580bf6894af84dc97ee81e1146a04aec2984d4f91f WHIRLPOOL beee4643d4c2212d9d49390bf1f3ff279f54f2d3c90743610ee59d7e8b93a1e61136654a1f5abe5d49a7826afdea8166ae047f7f2eb2f461c543bf3111f294d5
|
||||
DIST postgresql-8.3.21.tar.bz2 14626010 SHA256 a64b6de9f8067b803f2ed46a025bfd2a16a5ae270db60e440a698f2c07e234f8 SHA512 6da6fab655412fb2cc59ba6228596d6d3caff1a0c6bbd574b61c807bc18941b8d3db6824ffb7da1ad78d89c61d4407402bdb0904bf7b60c49959f40cb2bf3191 WHIRLPOOL 1bb3afefa2610537a35d148ccf2b65d6fe2915774aa61e92afeaadb3c6e923bf1771be7a5828c8ac67d2a0dac94f8bad3330cb38fa2f3b6993ebe493998f11a0
|
||||
DIST postgresql-8.3.22.tar.bz2 14630723 SHA256 17b8f3709c0442e25329e41743f980b10a3149940cee921c28e0bb5b51fef0c6 SHA512 bdcde0659062f5045c6596cd5bb7e90e7e99cf6316896d211c5125ce11f52f2ffdc911aa960556ef06c5fb62a5f2e6efc3555eca060df7eb8bebcdc805d73bee WHIRLPOOL 093dceec2b2c25af70048e7fc49b1f3741115f362777c0f1687745a50fa3cdfd8ddd6b42be0c256b413188e17dfeb977c41aab56f0f91f3010d491278e9b36c9
|
||||
DIST postgresql-8.3.23.tar.bz2 14684669 SHA256 17a46617ddbeb16f37d79b43f4e72301b051e6ef888a2eac960375bf579018d9 SHA512 fa8e01c615298e4e4c77e0c0bf26913a96572d4c578c48c77fd9197ab20fe5c43ed1e72b9552ed266ff272d859014da0c8c8d11a120b6c01bf561c7d0f77fdc1 WHIRLPOOL 25d737bcac9e77529e3cf07741acfb156e3991f6bc6f154d7007ee879b5c510261eab96b7147c2cc485506c28cfc6692b0165a6d370a50e6de0dbdf7900c0b50
|
||||
DIST postgresql-8.4.13.tar.bz2 14666613 SHA256 20dd3442a3fa3a4fb1813b58f969ce4bbc54d73194fd4fe20d6f1313edc48cb9 SHA512 c6294846bf9adf39d5d57d2df26023ed4aa83464a773789eaaf5823a6dd6005eeb756f3835caaffde72729edd5b1f0ab300309417a4f9b570d6110b62096f1e4 WHIRLPOOL 1a9cbbdf1d651e49d85b7edee5da70fcadcef20a10fbc4340bd43679144662c68bede5c68b38933aaed8cc1a9a4db8c0b48e2a183140f901e07f09055e958e96
|
||||
DIST postgresql-8.4.14.tar.bz2 14679559 SHA256 1172e7735beea8a933eab0a4c01f9ad49fe872d8786af12a7fe596346b1d133a SHA512 bf9ddb393de08bbff92708b83697b907fbf34229a2ce66e1bf97c1deb9630c37c9a363f9305889e1f6ce4671d116a2c267302b7681281bb0482575ac81d6f28e WHIRLPOOL 8fe681ce8d263116fb2d3554adb2f45c1b21f7d6b840396fee532f7f200809dacc5127df7102b97be88193cd39148b40c81d781ec73ffc508e4908b0af2426bf
|
||||
DIST postgresql-8.4.15.tar.bz2 14701182 SHA256 6a83771bbbdf1ad9c1dd900da3fbfdf6ef75857db8e012f7129a1f865279bc4d SHA512 a1019c9324db9fb582cb554536c06d8f89a7dd92649e890206ea6c9d3e99127f37ff6598341505ce9bc1b095190583a53bdccc18773422097c33da98c17cb25d WHIRLPOOL 242bbb44a6042a40ad7a55a7b98422c21cdcf77cc778ab5f4a3e29553dc83a182ce2d7415df430545fdd9d8f3e53a21d09377f1f049269bc323c5f749cccc19f
|
||||
DIST postgresql-8.4.16.tar.bz2 14784029 SHA256 8d03d94d3957019227066f427ccb11232a823f2558e2f57e1ea2bc9ba004612f SHA512 05fd72b61eb478c3e6682956ec7a1216490c9b5e430f82baeba2a75cb78723e622b0e513153d64373919747c9e12647fc58aafe8a7aa2b5789baa577597e8c62 WHIRLPOOL 58b3c3a15478cbcb17e2447e30b21a16b1846c9188919ab11e4fe5ea5933803872eb5f6154630b9e8a053d636eef8d8f8fda5dd755a54ec978dcab3a93abf5b5
|
||||
DIST postgresql-9.0.10.tar.bz2 15015826 SHA256 4394184b0099e8c86a482f7d62930aa31b50fb23e7dfb8fe9e1d93eb828dc729 SHA512 93a6d63d89800f9fc2eeef694c55afcdb8b8a255a2952a69b1816a31b831d0f86ed8b8fc88ad68cbc27f322eb1aba24e2cc9d891a5487217753b3f196fa5b754 WHIRLPOOL e5161e09c636f6a48d72de4befb967575a94b429129e72e4eb6013dc074bfe4f8ad43e4a15c40ec7e00b64d790cdd8da0eeb8a0555db44ce59fb336b0153799e
|
||||
DIST postgresql-9.0.11.tar.bz2 15044657 SHA256 a6dcdc8dc5cea5feb4522b0638646173e5a6680bd1e9b7ab72a8981e54e07b2c SHA512 54622307b1a2f27d1dca919e1ad1e098b64e9e9fcbbf7a8b17cd8266af9c6712028cdb24a41c7c77a55c61c9445b872909f84db349117f58dd36d8cb450667a0 WHIRLPOOL 2d1a3f3faa7b3658c0ea011641903df71b8fcf0f1220cfcbde7c8228176cc9eca5b5a38c8eee2b4b64132a0f5844b5b3ac25ba9d4e979f3e2f7ac27a96716720
|
||||
DIST postgresql-9.0.12.tar.bz2 15122949 SHA256 80f06873cbdc8789abe6806dc52a708d9a7f4ac5432ffea4c069cbc33b2b1524 SHA512 e5259b0ee64d1f7d0a7662279433c782cf3a68cd5713b296f4e1225323b951b7d8512057be823b40d7c32487f5a508770aadd732c9c1ceeaa835e661bc8e010e WHIRLPOOL 12fadc8037825216533062c0ee7a5ae55e80771acdce6ad072e45f3432af00808cb94439a68294308b0585135e2118c36a7c9686d57f2d77b1d87a83d3dad514
|
||||
DIST postgresql-9.0.9.tar.bz2 15008401 SHA256 87417d181a0f534fa96ba1d315a62b721f5bc22b7bb70af3f674bc1a68a5da8a SHA512 1d0c1f38f7872402b3011a624c7fb11cae79d165432c2134e37d078bfcbf836e5d55f2e9c92770d0a4c7db1680b2287ca55d981b8cffc0dc8b1a291c4ec4877b WHIRLPOOL 4d8c3e987ea1c07e4550d8b79eaee8cce2fec4cf39aab70bb69f364796c3ff472f5e0e953bddf3f1dc3878b4db458c2ca14073df8925e57b614974496476c921
|
||||
DIST postgresql-9.1.5.tar.bz2 15602594 SHA256 0b889c132426fc68d8c2eb1bf112bf99cc653e9c95b5f4bbebc55cd9a8d6ce44 SHA512 63998808c8a5ad7a4712d6639a7d77d01bfdfee1ea41a40e7db1c4c469e3ecdf3af78a0451907aaf856f2e76e5166de15fb9009143fca8b4d36c964291402930 WHIRLPOOL 1d89227d7801e7d45465130e90c6f1ede8cca459e3879a9f641c5d90a6ffbd8a77cd6f8b489d7a8273246ef9d51c7c5218f611b9816351a7f4562bf7ac0112d2
|
||||
DIST postgresql-9.1.6.tar.bz2 15621370 SHA256 6e396aca621a95b9f5f7292a79ebe6ce892e36c7f7021814e1bd94bcfc6c31e7 SHA512 80fbb62734ac20a500ef9f0a307543011a376c3162304cd8996cba3ea4aba32681dfa556ba06450bdc400971efb65cc9ce2635844950e4f6f31badaa93fe25a4 WHIRLPOOL 1cc8953beb9cc0cf8461147a7c4fa1b5312293625375568240e25ebcefe95334c1e4192df412a7ae8f5d018ded57478763b0921e62602c17c7b3ef81db688e65
|
||||
DIST postgresql-9.1.7.tar.bz2 15688516 SHA256 df19eaa98e6065034401b312f476ab4d3c27d67e0ae5063400eae8b00d333c82 SHA512 bac35312d7869f8b1668c2cd1aa08edfc8803ac0dcc03146295ce394ed83fb7c8666a55668bff1f8388b1f3257bdf545625f9df9bf79ce9b9573edfd6e23be5f WHIRLPOOL f9fb4b986c90ba0eebc52284a9a0926bd740b45be3c9cb5dccf74f994a7477f8a615d70ca0d7f33c72e02ee3e06c2a6a56d6658cde3a07de089cb0733e282b0c
|
||||
DIST postgresql-9.1.8.tar.bz2 15815313 SHA256 1d88f9dda24062dbfcc09aca9a316981f2aa93322613b853cf32d7a431b44c6d SHA512 7e4dc17fda40dcc8117d750866aa52e950e52c5d50f7b10c2f01fb4a5fd6f09ec5000d0977a0636e047185cf0de3f6f5e41eb61ac6e20a6ac39bdeae452de4af WHIRLPOOL 6c00342733ec8ff0d82874184235a0be08bda4e624afa25c81e183ade8a5555b782361d8d914a018b9549c29807b5e67d8c806d7136ab299cd3ea20c302f530d
|
||||
DIST postgresql-9.2.1.tar.bz2 16113737 SHA256 db61d498105a7d5fe46185e67ac830c878cdd7dc1f82a87f06b842217924c461 SHA512 37e5c193006c548d0b1e200e9dca18ca918a0fe7d5dcea1615ce6240b7f13d9ea30913ef3b309abac3a4c15f65202aa1e72b1a3cc0b22321854fd6187dbac8d0 WHIRLPOOL 97872b8354ed0efd0aa7bd2afa5c127e9aecfce5d44d8a10e02d62050321bf4a948e7d3a4ab7f830afa4f8c2257adc96408c09bd09c8dade8d9c32ea5181f8c1
|
||||
DIST postgresql-9.2.2.tar.bz2 16222148 SHA256 e1a7a854a98896cb7fcd1696a76fca6f3bcac94d75e68a6154ffe2b69184f7f3 SHA512 147690b168838b7d45cc805882cb6ef628cbf656ff115d32ab76c4ad38b06aa00223f728bf0e5befcdd27cc4e27a917493d857f1f29006952f0ff07da6615808 WHIRLPOOL f67b8ba8170f3a03ca5ee050286f6e830cbd086f6ee15095d5ec0e0cc48a342b9db263759451a63cdd9f669b0d55cbb3689ca781dd9f42f1cdb9e57c67ddb0c9
|
||||
DIST postgresql-9.2.3.tar.bz2 16371616 SHA256 c4f5a63290c0c32d8d9899edee8188d0c8ab124a7199b154fac75e62eec35f7f SHA512 e2520ae03f3cac3effed6e8e45900f6718a944c9a3c90d856819caaeeb6ba9b2324744c18a37b8e9bc5d7e63abab5b84f20259b797fd81ace0040a578f87aad8 WHIRLPOOL 28d948285392586f89dd39f757560413289c78e2a0929c3104608936b64a3488df85a8ffc38e516253185a36738ae308ee44eb9e08d2b0d8196e94488112ba82
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.3.20.ebuild,v 1.7 2012/09/20 18:04:13 blueness Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
# Nothing to test here per 232157
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/doc"
|
||||
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
tar -zxf "postgres.tar.gz" -C "${ED}/usr/share/doc/${PF}/html"
|
||||
fowners root:0 -R /usr/share/doc/${PF}/html
|
||||
|
||||
docinto FAQ_html
|
||||
dodoc src/FAQ/*
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto TODO.detail
|
||||
dodoc TODO.detail/*
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.3.21.ebuild,v 1.5 2012/12/01 19:02:59 armin76 Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
# Nothing to test here per 232157
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/doc"
|
||||
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
tar -zxf "postgres.tar.gz" -C "${ED}/usr/share/doc/${PF}/html"
|
||||
fowners root:0 -R /usr/share/doc/${PF}/html
|
||||
|
||||
docinto FAQ_html
|
||||
dodoc src/FAQ/*
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto TODO.detail
|
||||
dodoc TODO.detail/*
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.3.22-r1.ebuild,v 1.1 2013/01/12 18:59:35 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
local mypath=/usr/share/doc/postgresql-${SLOT}
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
dodir ${mypath}/html
|
||||
tar -zxf "postgres.tar.gz" -C "${ED}${mypath}/html" || die
|
||||
|
||||
insinto ${mypath}/FAQ_html
|
||||
doins src/FAQ/*
|
||||
|
||||
insinto ${mypath}/sgml
|
||||
doins src/sgml/*.{sgml,dsl}
|
||||
|
||||
insinto ${mypath}/sgml/ref
|
||||
doins src/sgml/ref/*.sgml
|
||||
|
||||
insinto ${mypath}/TODO.detail
|
||||
doins TODO.detail/*
|
||||
|
||||
fowners root:0 -R ${mypath}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.3.22.ebuild,v 1.1 2012/12/10 06:02:52 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
# Nothing to test here per 232157
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/doc"
|
||||
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
tar -zxf "postgres.tar.gz" -C "${ED}/usr/share/doc/${PF}/html"
|
||||
fowners root:0 -R /usr/share/doc/${PF}/html
|
||||
|
||||
docinto FAQ_html
|
||||
dodoc src/FAQ/*
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto TODO.detail
|
||||
dodoc TODO.detail/*
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.3.23.ebuild,v 1.11 2013/02/11 18:19:34 ago Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.3.23.ebuild,v 1.12 2013/02/26 18:50:21 ago Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.4.13.ebuild,v 1.7 2012/09/20 18:04:13 blueness Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
# Nothing to test here per 232157
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/doc"
|
||||
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
tar -zxf "postgres.tar.gz" -C "${ED}/usr/share/doc/${PF}/html"
|
||||
fowners root:0 -R /usr/share/doc/${PF}/html
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto
|
||||
dodoc TODO
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.4.14.ebuild,v 1.5 2012/12/01 19:02:59 armin76 Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
# Nothing to test here per 232157
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/doc"
|
||||
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
tar -zxf "postgres.tar.gz" -C "${ED}/usr/share/doc/${PF}/html"
|
||||
fowners root:0 -R /usr/share/doc/${PF}/html
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto
|
||||
dodoc TODO
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.4.15-r1.ebuild,v 1.1 2013/01/12 18:59:35 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
local mypath=/usr/share/doc/postgresql-${SLOT}
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
dodir ${mypath}/html
|
||||
tar -zxf "postgres.tar.gz" -C "${ED}${mypath}/html" || die
|
||||
|
||||
insinto ${mypath}/sgml
|
||||
doins src/sgml/*.{sgml,dsl}
|
||||
|
||||
insinto ${mypath}/sgml/ref
|
||||
doins src/sgml/ref/*.sgml
|
||||
|
||||
fowners root:0 -R ${mypath}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.4.15.ebuild,v 1.1 2012/12/10 06:02:52 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
# Nothing to test here per 232157
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${S}/doc"
|
||||
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
tar -zxf "postgres.tar.gz" -C "${ED}/usr/share/doc/${PF}/html"
|
||||
fowners root:0 -R /usr/share/doc/${PF}/html
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto
|
||||
dodoc TODO
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.4.16.ebuild,v 1.11 2013/02/11 18:19:34 ago Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-8.4.16.ebuild,v 1.12 2013/02/26 18:50:21 ago Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.0.10.ebuild,v 1.5 2012/12/01 19:02:59 armin76 Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto html
|
||||
dodoc src/sgml/html/*.html
|
||||
dodoc src/sgml/html/stylesheet.css
|
||||
|
||||
docinto
|
||||
dodoc TODO
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.0.11-r1.ebuild,v 1.1 2013/01/12 18:59:35 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
local mypath=/usr/share/doc/postgresql-${SLOT}
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
insinto ${mypath}/html
|
||||
doins src/sgml/html/*
|
||||
|
||||
insinto ${mypath}/sgml
|
||||
doins src/sgml/*.{sgml,dsl}
|
||||
|
||||
insinto ${mypath}/sgml/ref
|
||||
doins src/sgml/ref/*.sgml
|
||||
|
||||
fowners root:0 -R ${mypath}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.0.11.ebuild,v 1.1 2012/12/10 06:02:52 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto html
|
||||
dodoc src/sgml/html/*.html
|
||||
dodoc src/sgml/html/stylesheet.css
|
||||
|
||||
docinto
|
||||
dodoc TODO
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.0.12.ebuild,v 1.11 2013/02/11 18:19:34 ago Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.0.12.ebuild,v 1.12 2013/02/26 18:50:21 ago Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.0.9.ebuild,v 1.7 2012/09/20 18:04:13 blueness Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
S=${WORKDIR}/postgresql-${PV}
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto html
|
||||
dodoc src/sgml/html/*.html
|
||||
dodoc src/sgml/html/stylesheet.css
|
||||
|
||||
docinto
|
||||
dodoc TODO
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.1.5.ebuild,v 1.7 2012/09/20 18:04:13 blueness Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto html
|
||||
dodoc src/sgml/html/*.html
|
||||
dodoc src/sgml/html/stylesheet.css
|
||||
|
||||
docinto
|
||||
dodoc TODO
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.1.6.ebuild,v 1.5 2012/12/01 19:02:59 armin76 Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto html
|
||||
dodoc src/sgml/html/*.html
|
||||
dodoc src/sgml/html/stylesheet.css
|
||||
|
||||
docinto
|
||||
dodoc TODO
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.1.7-r1.ebuild,v 1.1 2013/01/12 18:59:35 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
local mypath=/usr/share/doc/postgresql-${SLOT}
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
insinto ${mypath}/html
|
||||
doins src/sgml/html/*
|
||||
|
||||
insinto ${mypath}/sgml
|
||||
doins src/sgml/*.{sgml,dsl}
|
||||
|
||||
insinto ${mypath}/sgml/ref
|
||||
doins src/sgml/ref/*.sgml
|
||||
|
||||
fowners root:0 -R ${mypath}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.1.7.ebuild,v 1.1 2012/12/10 06:02:52 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto html
|
||||
dodoc src/sgml/html/*.html
|
||||
dodoc src/sgml/html/stylesheet.css
|
||||
|
||||
docinto
|
||||
dodoc TODO
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.1.8.ebuild,v 1.11 2013/02/11 18:19:34 ago Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.1.8.ebuild,v 1.12 2013/02/26 18:50:21 ago Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.2.1.ebuild,v 1.5 2012/12/01 19:02:59 armin76 Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# Comment the following four lines when not a beta or rc.
|
||||
#MY_PV="${PV//_}"
|
||||
#MY_FILE_PV="${SLOT}$(get_version_component_range 4)"
|
||||
#S="${WORKDIR}/postgresql-${MY_FILE_PV}"
|
||||
#SRC_URI="mirror://postgresql/source/v${MY_FILE_PV}/postgresql-${MY_FILE_PV}.tar.bz2"
|
||||
|
||||
# Comment the following two lines when a beta or rc.
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL"
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto html
|
||||
dodoc src/sgml/html/*.html
|
||||
dodoc src/sgml/html/stylesheet.css
|
||||
|
||||
docinto
|
||||
dodoc TODO
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.2.2-r1.ebuild,v 1.1 2013/01/12 18:59:35 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
LICENSE="POSTGRESQL"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# Comment the following four lines when not a beta or rc.
|
||||
#MY_PV="${PV//_}"
|
||||
#MY_FILE_PV="${SLOT}$(get_version_component_range 4)"
|
||||
#S="${WORKDIR}/postgresql-${MY_FILE_PV}"
|
||||
#SRC_URI="mirror://postgresql/source/v${MY_FILE_PV}/postgresql-${MY_FILE_PV}.tar.bz2"
|
||||
|
||||
# Comment the following two lines when a beta or rc.
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Don't use ${PF} here as three packages
|
||||
# (dev-db/postgresql-{docs,base,server}) have the same set of docs.
|
||||
local mypath=/usr/share/doc/postgresql-${SLOT}
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
insinto ${mypath}/html
|
||||
doins src/sgml/html/*
|
||||
|
||||
insinto ${mypath}/sgml
|
||||
doins src/sgml/*.{sgml,dsl}
|
||||
|
||||
insinto ${mypath}/sgml/ref
|
||||
doins src/sgml/ref/*.sgml
|
||||
|
||||
fowners root:0 -R ${mypath}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.2.2.ebuild,v 1.1 2012/12/10 06:02:52 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
# Comment the following four lines when not a beta or rc.
|
||||
#MY_PV="${PV//_}"
|
||||
#MY_FILE_PV="${SLOT}$(get_version_component_range 4)"
|
||||
#S="${WORKDIR}/postgresql-${MY_FILE_PV}"
|
||||
#SRC_URI="mirror://postgresql/source/v${MY_FILE_PV}/postgresql-${MY_FILE_PV}.tar.bz2"
|
||||
|
||||
# Comment the following two lines when a beta or rc.
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="POSTGRESQL"
|
||||
DESCRIPTION="PostgreSQL documentation"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=""
|
||||
|
||||
src_unpack() {
|
||||
tar xjf "${DISTDIR}/${A}" -C "${WORKDIR}" "${A%.tar.bz2}/doc"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
dodir /usr/share/doc/${PF}/html
|
||||
|
||||
cd "${S}/doc"
|
||||
|
||||
docinto sgml
|
||||
dodoc src/sgml/*.{sgml,dsl}
|
||||
|
||||
docinto sgml/ref
|
||||
dodoc src/sgml/ref/*.sgml
|
||||
|
||||
docinto html
|
||||
dodoc src/sgml/html/*.html
|
||||
dodoc src/sgml/html/stylesheet.css
|
||||
|
||||
docinto
|
||||
dodoc TODO
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/docs"
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.2.3.ebuild,v 1.11 2013/02/11 18:19:34 ago Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-docs/postgresql-docs-9.2.3.ebuild,v 1.12 2013/02/26 18:50:21 ago Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
inherit versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
|
|
|
@ -1,34 +1,13 @@
|
|||
DIST postgresql-8.3.20.tar.bz2 14624435 SHA256 922b6165dc21739356e22ba4d53e08f3b26cd38d8fb9569d5f8fa6d239611163 SHA512 e709632db165f543e510334adfa191ecff6fbe5ae6726578cbb5e4858de62fda53e67b19171c302492361c580bf6894af84dc97ee81e1146a04aec2984d4f91f WHIRLPOOL beee4643d4c2212d9d49390bf1f3ff279f54f2d3c90743610ee59d7e8b93a1e61136654a1f5abe5d49a7826afdea8166ae047f7f2eb2f461c543bf3111f294d5
|
||||
DIST postgresql-8.3.21.tar.bz2 14626010 SHA256 a64b6de9f8067b803f2ed46a025bfd2a16a5ae270db60e440a698f2c07e234f8 SHA512 6da6fab655412fb2cc59ba6228596d6d3caff1a0c6bbd574b61c807bc18941b8d3db6824ffb7da1ad78d89c61d4407402bdb0904bf7b60c49959f40cb2bf3191 WHIRLPOOL 1bb3afefa2610537a35d148ccf2b65d6fe2915774aa61e92afeaadb3c6e923bf1771be7a5828c8ac67d2a0dac94f8bad3330cb38fa2f3b6993ebe493998f11a0
|
||||
DIST postgresql-8.3.22.tar.bz2 14630723 SHA256 17b8f3709c0442e25329e41743f980b10a3149940cee921c28e0bb5b51fef0c6 SHA512 bdcde0659062f5045c6596cd5bb7e90e7e99cf6316896d211c5125ce11f52f2ffdc911aa960556ef06c5fb62a5f2e6efc3555eca060df7eb8bebcdc805d73bee WHIRLPOOL 093dceec2b2c25af70048e7fc49b1f3741115f362777c0f1687745a50fa3cdfd8ddd6b42be0c256b413188e17dfeb977c41aab56f0f91f3010d491278e9b36c9
|
||||
DIST postgresql-8.3.23.tar.bz2 14684669 SHA256 17a46617ddbeb16f37d79b43f4e72301b051e6ef888a2eac960375bf579018d9 SHA512 fa8e01c615298e4e4c77e0c0bf26913a96572d4c578c48c77fd9197ab20fe5c43ed1e72b9552ed266ff272d859014da0c8c8d11a120b6c01bf561c7d0f77fdc1 WHIRLPOOL 25d737bcac9e77529e3cf07741acfb156e3991f6bc6f154d7007ee879b5c510261eab96b7147c2cc485506c28cfc6692b0165a6d370a50e6de0dbdf7900c0b50
|
||||
DIST postgresql-8.4.13.tar.bz2 14666613 SHA256 20dd3442a3fa3a4fb1813b58f969ce4bbc54d73194fd4fe20d6f1313edc48cb9 SHA512 c6294846bf9adf39d5d57d2df26023ed4aa83464a773789eaaf5823a6dd6005eeb756f3835caaffde72729edd5b1f0ab300309417a4f9b570d6110b62096f1e4 WHIRLPOOL 1a9cbbdf1d651e49d85b7edee5da70fcadcef20a10fbc4340bd43679144662c68bede5c68b38933aaed8cc1a9a4db8c0b48e2a183140f901e07f09055e958e96
|
||||
DIST postgresql-8.4.14.tar.bz2 14679559 SHA256 1172e7735beea8a933eab0a4c01f9ad49fe872d8786af12a7fe596346b1d133a SHA512 bf9ddb393de08bbff92708b83697b907fbf34229a2ce66e1bf97c1deb9630c37c9a363f9305889e1f6ce4671d116a2c267302b7681281bb0482575ac81d6f28e WHIRLPOOL 8fe681ce8d263116fb2d3554adb2f45c1b21f7d6b840396fee532f7f200809dacc5127df7102b97be88193cd39148b40c81d781ec73ffc508e4908b0af2426bf
|
||||
DIST postgresql-8.4.15.tar.bz2 14701182 SHA256 6a83771bbbdf1ad9c1dd900da3fbfdf6ef75857db8e012f7129a1f865279bc4d SHA512 a1019c9324db9fb582cb554536c06d8f89a7dd92649e890206ea6c9d3e99127f37ff6598341505ce9bc1b095190583a53bdccc18773422097c33da98c17cb25d WHIRLPOOL 242bbb44a6042a40ad7a55a7b98422c21cdcf77cc778ab5f4a3e29553dc83a182ce2d7415df430545fdd9d8f3e53a21d09377f1f049269bc323c5f749cccc19f
|
||||
DIST postgresql-8.4.16.tar.bz2 14784029 SHA256 8d03d94d3957019227066f427ccb11232a823f2558e2f57e1ea2bc9ba004612f SHA512 05fd72b61eb478c3e6682956ec7a1216490c9b5e430f82baeba2a75cb78723e622b0e513153d64373919747c9e12647fc58aafe8a7aa2b5789baa577597e8c62 WHIRLPOOL 58b3c3a15478cbcb17e2447e30b21a16b1846c9188919ab11e4fe5ea5933803872eb5f6154630b9e8a053d636eef8d8f8fda5dd755a54ec978dcab3a93abf5b5
|
||||
DIST postgresql-9.0.10.tar.bz2 15015826 SHA256 4394184b0099e8c86a482f7d62930aa31b50fb23e7dfb8fe9e1d93eb828dc729 SHA512 93a6d63d89800f9fc2eeef694c55afcdb8b8a255a2952a69b1816a31b831d0f86ed8b8fc88ad68cbc27f322eb1aba24e2cc9d891a5487217753b3f196fa5b754 WHIRLPOOL e5161e09c636f6a48d72de4befb967575a94b429129e72e4eb6013dc074bfe4f8ad43e4a15c40ec7e00b64d790cdd8da0eeb8a0555db44ce59fb336b0153799e
|
||||
DIST postgresql-9.0.11.tar.bz2 15044657 SHA256 a6dcdc8dc5cea5feb4522b0638646173e5a6680bd1e9b7ab72a8981e54e07b2c SHA512 54622307b1a2f27d1dca919e1ad1e098b64e9e9fcbbf7a8b17cd8266af9c6712028cdb24a41c7c77a55c61c9445b872909f84db349117f58dd36d8cb450667a0 WHIRLPOOL 2d1a3f3faa7b3658c0ea011641903df71b8fcf0f1220cfcbde7c8228176cc9eca5b5a38c8eee2b4b64132a0f5844b5b3ac25ba9d4e979f3e2f7ac27a96716720
|
||||
DIST postgresql-9.0.12.tar.bz2 15122949 SHA256 80f06873cbdc8789abe6806dc52a708d9a7f4ac5432ffea4c069cbc33b2b1524 SHA512 e5259b0ee64d1f7d0a7662279433c782cf3a68cd5713b296f4e1225323b951b7d8512057be823b40d7c32487f5a508770aadd732c9c1ceeaa835e661bc8e010e WHIRLPOOL 12fadc8037825216533062c0ee7a5ae55e80771acdce6ad072e45f3432af00808cb94439a68294308b0585135e2118c36a7c9686d57f2d77b1d87a83d3dad514
|
||||
DIST postgresql-9.0.9.tar.bz2 15008401 SHA256 87417d181a0f534fa96ba1d315a62b721f5bc22b7bb70af3f674bc1a68a5da8a SHA512 1d0c1f38f7872402b3011a624c7fb11cae79d165432c2134e37d078bfcbf836e5d55f2e9c92770d0a4c7db1680b2287ca55d981b8cffc0dc8b1a291c4ec4877b WHIRLPOOL 4d8c3e987ea1c07e4550d8b79eaee8cce2fec4cf39aab70bb69f364796c3ff472f5e0e953bddf3f1dc3878b4db458c2ca14073df8925e57b614974496476c921
|
||||
DIST postgresql-9.1.5.tar.bz2 15602594 SHA256 0b889c132426fc68d8c2eb1bf112bf99cc653e9c95b5f4bbebc55cd9a8d6ce44 SHA512 63998808c8a5ad7a4712d6639a7d77d01bfdfee1ea41a40e7db1c4c469e3ecdf3af78a0451907aaf856f2e76e5166de15fb9009143fca8b4d36c964291402930 WHIRLPOOL 1d89227d7801e7d45465130e90c6f1ede8cca459e3879a9f641c5d90a6ffbd8a77cd6f8b489d7a8273246ef9d51c7c5218f611b9816351a7f4562bf7ac0112d2
|
||||
DIST postgresql-9.1.6.tar.bz2 15621370 SHA256 6e396aca621a95b9f5f7292a79ebe6ce892e36c7f7021814e1bd94bcfc6c31e7 SHA512 80fbb62734ac20a500ef9f0a307543011a376c3162304cd8996cba3ea4aba32681dfa556ba06450bdc400971efb65cc9ce2635844950e4f6f31badaa93fe25a4 WHIRLPOOL 1cc8953beb9cc0cf8461147a7c4fa1b5312293625375568240e25ebcefe95334c1e4192df412a7ae8f5d018ded57478763b0921e62602c17c7b3ef81db688e65
|
||||
DIST postgresql-9.1.7.tar.bz2 15688516 SHA256 df19eaa98e6065034401b312f476ab4d3c27d67e0ae5063400eae8b00d333c82 SHA512 bac35312d7869f8b1668c2cd1aa08edfc8803ac0dcc03146295ce394ed83fb7c8666a55668bff1f8388b1f3257bdf545625f9df9bf79ce9b9573edfd6e23be5f WHIRLPOOL f9fb4b986c90ba0eebc52284a9a0926bd740b45be3c9cb5dccf74f994a7477f8a615d70ca0d7f33c72e02ee3e06c2a6a56d6658cde3a07de089cb0733e282b0c
|
||||
DIST postgresql-9.1.8.tar.bz2 15815313 SHA256 1d88f9dda24062dbfcc09aca9a316981f2aa93322613b853cf32d7a431b44c6d SHA512 7e4dc17fda40dcc8117d750866aa52e950e52c5d50f7b10c2f01fb4a5fd6f09ec5000d0977a0636e047185cf0de3f6f5e41eb61ac6e20a6ac39bdeae452de4af WHIRLPOOL 6c00342733ec8ff0d82874184235a0be08bda4e624afa25c81e183ade8a5555b782361d8d914a018b9549c29807b5e67d8c806d7136ab299cd3ea20c302f530d
|
||||
DIST postgresql-9.2.1.tar.bz2 16113737 SHA256 db61d498105a7d5fe46185e67ac830c878cdd7dc1f82a87f06b842217924c461 SHA512 37e5c193006c548d0b1e200e9dca18ca918a0fe7d5dcea1615ce6240b7f13d9ea30913ef3b309abac3a4c15f65202aa1e72b1a3cc0b22321854fd6187dbac8d0 WHIRLPOOL 97872b8354ed0efd0aa7bd2afa5c127e9aecfce5d44d8a10e02d62050321bf4a948e7d3a4ab7f830afa4f8c2257adc96408c09bd09c8dade8d9c32ea5181f8c1
|
||||
DIST postgresql-9.2.2.tar.bz2 16222148 SHA256 e1a7a854a98896cb7fcd1696a76fca6f3bcac94d75e68a6154ffe2b69184f7f3 SHA512 147690b168838b7d45cc805882cb6ef628cbf656ff115d32ab76c4ad38b06aa00223f728bf0e5befcdd27cc4e27a917493d857f1f29006952f0ff07da6615808 WHIRLPOOL f67b8ba8170f3a03ca5ee050286f6e830cbd086f6ee15095d5ec0e0cc48a342b9db263759451a63cdd9f669b0d55cbb3689ca781dd9f42f1cdb9e57c67ddb0c9
|
||||
DIST postgresql-9.2.3.tar.bz2 16371616 SHA256 c4f5a63290c0c32d8d9899edee8188d0c8ab124a7199b154fac75e62eec35f7f SHA512 e2520ae03f3cac3effed6e8e45900f6718a944c9a3c90d856819caaeeb6ba9b2324744c18a37b8e9bc5d7e63abab5b84f20259b797fd81ace0040a578f87aad8 WHIRLPOOL 28d948285392586f89dd39f757560413289c78e2a0929c3104608936b64a3488df85a8ffc38e516253185a36738ae308ee44eb9e08d2b0d8196e94488112ba82
|
||||
DIST postgresql-initscript-2.1.1.tbz2 2604 SHA256 e7e9f18a48272a6210ef3b433bb910e3ffeffe92f798aaf1ea503ce1fc1f5dfb SHA512 002d2121ffd15a327e573a53d2abd460321718dcca1e58bfce87100ee44bd19ed376b84b14f93696ac7998ee7699e04a4797a6a4db0520ee6bfa9ff53ab41975 WHIRLPOOL 891bd0602cf1470179a5683e4a3fea657dec7e924c7919f8f1964b395b0b08cf13d4462e37dcce05ad5f547d3ec18ff83e50f9f29ca87ca7fb8eaca65e5ddf9f
|
||||
DIST postgresql-initscript-2.3.tbz2 2611 SHA256 72a2805048c3027996c41b9d3342ccf56406393bab7086af745d87b5b5edd4a7 SHA512 0803a833507c91e5c76a5804a787c159b3a00f7f9761a9e5c3bc7c721b14f5c6e9587027c102c430feb6e72a0bb011a0bf4903a136b7e648488a45adf2a99275 WHIRLPOOL e56b1e6e2f4cc27641411f26896508df6566f19f197f811f426995d86ae6ac97737b4f60cf5d6f763c8306a3043d31c59d3da89291fdbf837a4c9bf38b4ba5d2
|
||||
DIST postgresql-initscript-2.4.tbz2 2604 SHA256 4f17a2a26ec078b7f73d2b5fa7338402829fe195676d6c3f2cda6cd75c3d1e23 SHA512 2e92bb4f2ddbdfbafa9a6451ebf8be121cf66b7731c42c61f9978a4a896e7d8987fc3b2e5c6feef22a5f7b5759c3456c91e1869ba30019f71ed6b6088adf955e WHIRLPOOL 6df5d827a9fc2d78084d5c300fefa767f87af4a6918abefeea99396ecdace8966ee2c2b4f2276454a3f77df64ec7522aeb2cc1fcac8e321d091f60cc1071a13f
|
||||
DIST postgresql-initscript-pre92-2.4.tbz2 2598 SHA256 a7a432e04b5346794b088ef92a35b46db31de85408e0029dae6b502af572aedc SHA512 3ab35b8cc392e3cd86874525edf664c8445cae19ac2338ef52808ee78aff5e4f9147b0e61caf89b732c103ff73875fb1db4dd0cb214587a58607db6529358a27 WHIRLPOOL f3ab508236d391821e4ddaa7a2224681aff60fc5453a3659f7994e45d8278eee02b8aa71dcfd446628b6ca1d212c7221b40212f45ac955821f1b78a97cdce703
|
||||
DIST postgresql-patches-8.3-r2.tbz2 5501 SHA256 adae4c048745de04fd44f0408e8ab85aa5cae283cb3ddc2962e0379905cca73f SHA512 6f7f3f3e7bb22da3fad237b2f14e2723004b818d6555031054dc3d03fb51d922eefdee90d053673a8e0ceefe06868d9a6427046a4da80d44a439aa3114c54819 WHIRLPOOL dd25124acfbcc717f0e908787c690f35f905adc4fdee5349d09924371f66bad281a89be60d90be98a2824608c105c7767e5f2b75d95587bd346cc2869366e140
|
||||
DIST postgresql-patches-8.3-r3.tbz2 5490 SHA256 5c791bd4ddea564341f4c2766dec6749756938c5da9c289e35ed92e98a3c2bef SHA512 fa70d615df28b82159aa6d120f6fffc5700902b6b7a2c36d023a0ab4c113b7fbe5ca9dbc391ee6f1e934e3582c61d6b2e6cd73121f9dbb403d32c56d585e2140 WHIRLPOOL e126798b28496ceb6be2979c39cf9036ea4c5cbee19cdad65f5ff0a6072f417be8b332e16ca5f358f57326afd577a4145ac964d5abef9b069cf32f84692f9e9c
|
||||
DIST postgresql-patches-8.4-r2.tbz2 4822 SHA256 9920097ff5243df28788a6f3bdf6cdad38e6c42885f38da84b0f2c8c242954d7 SHA512 e074509ea8246ac74deae98507d29c30e0def6b88cb0c578294ef58f165681f4c2927d8e6392e34f57751ddb21e3c50852da3d3f5ca40f95a8ce89d65412e1f9 WHIRLPOOL 225336ce3e4323e9a9c16892def1065556d4c324e14a48553e3bb9a4ad6048d16731088adf4bc4b29ce3d692bd0e900afa1440ab2ae0a2710034422941a9e14b
|
||||
DIST postgresql-patches-8.4-r3.tbz2 4821 SHA256 f2c47ff5cf6af20020c87bc34362615af66675d7d44dd020ccfae425880e1ace SHA512 149434a1a55f130b91b87591ac6bbbd263893e90facfdc47418320561a91cb818dea6367af5b8afbb6c9cccea6053692ee3008c62cbe40e8819c7cac04389334 WHIRLPOOL 30d5945bd65e07f114d8ee27bcbc1dc7ae136a2b5a1f62ec44aad325208dc8387ae11f58c21ebf1447822b35fe35b79d64c86cf763e146dc9c2b5da7dc883d47
|
||||
DIST postgresql-patches-9.0-r3.tbz2 4503 SHA256 2d454575423f0e56f23d540fbc865309d0bee3f80e5e05a7e1d793a7e70763cf SHA512 1a4e2c2d7ffe91cc7847ac42b2e83d708b38a93addb17d8a7234a159aa06bd125b2e915d3e78f7732d4e4ea94b897899ed832f4099b9260418fb1f1ecf265d38 WHIRLPOOL f20a030fe3244879ccddfcbf816bc7caf22231bf68c816eb5552968217c5adb7ff9ddaf5cea45ff576b6e7d2fbb9ac1276ffad3b319a4facf93a4ee409edf435
|
||||
DIST postgresql-patches-9.0-r4.tbz2 4525 SHA256 96f9af00dea1c33f9c77754e8ee37334012b8098361c321bd3f562ca9c32f6b8 SHA512 1e792eaf1e194e7a109a860216de98929bc12e6905846524e795fed7e8506f8f0e2e7349ead4fd9ba196c8eb6af2f5b143d0eecdb4cb7061253257acbce37873 WHIRLPOOL 8a32c0cd7f6b845496df8d1f6a0b2497625c0da36c5af1d651be086e9cd4faec48b56b04dca894a0e43e91309868db3014213d9989da5fd1d52d5b3775f8c1ad
|
||||
DIST postgresql-patches-9.1-r1.tbz2 4547 SHA256 50cefff4a6f6e1fd38b99dde4793dc5f153b9691ff5c59fbb2b97864f1f7d727 SHA512 d6baafb0b6980b860157cd8b557a2d1f696e0a4b1f34ad46185fd0204df1fc66972398f9f8f47a49b6623cec2f790d98adcd45bf59329d126c45f07ee15b3542 WHIRLPOOL 12cb3a028e204c6da3e44e9c9c6388d5650a42fc35c9d25cf18f928bbc896d854ddabd9012b76c84fe74d3f6ccbd94742a3dc53e5a1101f536a5c9a31ec04a35
|
||||
DIST postgresql-patches-9.1-r2.tbz2 4552 SHA256 e33a684be93d2bf70566245601da5ea3f831f4ed4b2ff1fa91f8083be3d3bc21 SHA512 3154616884615fea9e826f347e32b89bbddf18256875b3a23b1b6b5d9c0a1bf6159230ab0c6c6245782987d12156ecaa8e51ab1d25a27b5bae7f72cd565784af WHIRLPOOL 8820ea3a96b31baf3b3294c56ed95c9d2d916fdf9584fef38a0b6299b292883af6dda93e4818af09d1ab4b4d66dde258beb56ab2121bb48adbd806f7038b5b82
|
||||
DIST postgresql-patches-9.2.tbz2 4431 SHA256 8ce635671d5af4d2c8d9a0fc741b26f82f1fda16bb6a36726a32dae47021a632 SHA512 4c971bd3f4ae86a48f5e21a1e4ab087865d41f2445f5a9ddfcd7d11f1abab7be8968e5a1bcfbe4a1f7799e7ca1728604aa01641883c47746ebfab658c189f6e5 WHIRLPOOL 712fae68cdf5b06e05f98e23760d896c7361fe0b548839082b8b0c488597bd0f38b80585677d380f8ccb7ded39e759ee42fa9eff838439468b5ac3a501004e8d
|
||||
DIST postgresql-patches-9.2beta2.tbz2 4466 SHA256 7033657bf66255fda3881ee6797ad0aa920e1910619228206b174065e5e348d2 SHA512 64150e055aabe04e1a298170a992c607313299d3990c05ac4146c05e6bb2a55e29999d45cf29d7111df5fda0f135980665c4c6c6c83d3f1df26c27334daf17bb WHIRLPOOL f67a99b39e99ab26e8d1125886493b53a3589908433618e7601281735dee4d2e54fdaed84e4608961264723cf27284e9ead798087f9b896a5ada8bdc70c51f9d
|
||||
DIST postgresql-patches-9.2beta3.tbz2 4466 SHA256 7033657bf66255fda3881ee6797ad0aa920e1910619228206b174065e5e348d2 SHA512 64150e055aabe04e1a298170a992c607313299d3990c05ac4146c05e6bb2a55e29999d45cf29d7111df5fda0f135980665c4c6c6c83d3f1df26c27334daf17bb WHIRLPOOL f67a99b39e99ab26e8d1125886493b53a3589908433618e7601281735dee4d2e54fdaed84e4608961264723cf27284e9ead798087f9b896a5ada8bdc70c51f9d
|
||||
|
|
|
@ -1,339 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.3.20.ebuild,v 1.8 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \
|
||||
NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF}
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" \
|
||||
> "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" \
|
||||
PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF}
|
||||
done
|
||||
|
||||
rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \
|
||||
"${ED}/usr/share/doc/${PF}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man1
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT}
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT}
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source ${EROOT%/}/etc/env.d/02locale
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z ${PG_INITDB_OPTS} ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized."
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo "Tests not supported on this OS (yet)."
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
ebegin "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections"
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
eend
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS is set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1. You can enable it in the clusters"
|
||||
einfo "postgresql.conf."
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/:${PATH}" \
|
||||
emake check \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
NO_PGXS=0 USE_PGXS=1 SLOT=${SLOT}
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.3.21.ebuild,v 1.6 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \
|
||||
NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF}
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" \
|
||||
> "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" \
|
||||
PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF}
|
||||
done
|
||||
|
||||
rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \
|
||||
"${ED}/usr/share/doc/${PF}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man1
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT}
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT}
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source ${EROOT%/}/etc/env.d/02locale
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z ${PG_INITDB_OPTS} ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized."
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo "Tests not supported on this OS (yet)."
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
ebegin "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections"
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
eend
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS is set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1. You can enable it in the clusters"
|
||||
einfo "postgresql.conf."
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/:${PATH}" \
|
||||
emake check \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
NO_PGXS=0 USE_PGXS=1 SLOT=${SLOT}
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,348 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.3.22-r1.ebuild,v 1.2 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \
|
||||
NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF}
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" \
|
||||
> "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" \
|
||||
PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF}
|
||||
done
|
||||
|
||||
rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \
|
||||
"${ED}/usr/share/doc/${PF}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man1
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT}
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT}
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttp://www.gentoo.org/doc/en/postgres-howto.xml#doc_chap5"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds. Control-C to cancel"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source ${EROOT%/}/etc/env.d/02locale
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z ${PG_INITDB_OPTS} ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized."
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo "Tests not supported on this OS (yet)."
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
ebegin "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections"
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
eend
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS is set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1. You can enable it in the clusters"
|
||||
einfo "postgresql.conf."
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/:${PATH}" \
|
||||
emake check \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
NO_PGXS=0 USE_PGXS=1 SLOT=${SLOT}
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,339 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.3.22.ebuild,v 1.2 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.3-r2.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \
|
||||
NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF}
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" \
|
||||
> "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" \
|
||||
PGXS_IN_SERVER=1 PGXS_WITH_SERVER="${S}/src/backend/postgres" \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
NO_PGXS=0 USE_PGXS=1 docdir=${EROOT%/}/usr/share/doc/${PF}
|
||||
done
|
||||
|
||||
rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \
|
||||
"${ED}/usr/share/doc/${PF}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1
|
||||
docompress /usr/share/postgresql-${SLOT}/man/man1
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT}
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT}
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source ${EROOT%/}/etc/env.d/02locale
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z ${PG_INITDB_OPTS} ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized."
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo "Tests not supported on this OS (yet)."
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
ebegin "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections"
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
eend
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS is set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1. You can enable it in the clusters"
|
||||
einfo "postgresql.conf."
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/:${PATH}" \
|
||||
emake check \
|
||||
PGXS=$(${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --pgxs) \
|
||||
NO_PGXS=0 USE_PGXS=1 SLOT=${SLOT}
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.3.23-r1.ebuild,v 1.1 2013/02/12 18:22:24 titanofold Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.3.23-r1.ebuild,v 1.2 2013/02/26 18:52:02 ago Exp $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
|
@ -11,7 +11,7 @@ inherit autotools eutils multilib pam prefix python-single-r1 user versionator
|
|||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~x86-fbsd"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
|
|
@ -1,348 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.4.13.ebuild,v 1.8 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix python user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/ldflags.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" \
|
||||
> "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" \
|
||||
|| die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \
|
||||
"${ED}/usr/share/doc/postgresql-${SLOT}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}"/postgresql.confd postgresql-${SLOT} \
|
||||
|| die "Inserting conf.d file failed"
|
||||
|
||||
newinitd "${WORKDIR}"/postgresql.init postgresql-${SLOT} \
|
||||
|| die "Inserting init.d file failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "The time stamp format is 64 bit integers now. If you upgrade from older"
|
||||
elog "databases, this may force you to either do a dump and reload of enable"
|
||||
elog "pg_legacytimestamp until you find time to do so. If the database can't start"
|
||||
elog "please try enabling pg_legacytimestamp and rebuild."
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z ${PG_INITDB_OPTS} ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled by"
|
||||
einfo "default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
emake check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,348 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.4.14.ebuild,v 1.6 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix python user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/ldflags.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" \
|
||||
> "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" \
|
||||
|| die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \
|
||||
"${ED}/usr/share/doc/postgresql-${SLOT}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}"/postgresql.confd postgresql-${SLOT} \
|
||||
|| die "Inserting conf.d file failed"
|
||||
|
||||
newinitd "${WORKDIR}"/postgresql.init postgresql-${SLOT} \
|
||||
|| die "Inserting init.d file failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "The time stamp format is 64 bit integers now. If you upgrade from older"
|
||||
elog "databases, this may force you to either do a dump and reload of enable"
|
||||
elog "pg_legacytimestamp until you find time to do so. If the database can't start"
|
||||
elog "please try enabling pg_legacytimestamp and rebuild."
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z ${PG_INITDB_OPTS} ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled by"
|
||||
einfo "default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
emake check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,346 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.4.15-r1.ebuild,v 1.1 2013/01/12 19:10:13 titanofold Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix python user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/ldflags.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" \
|
||||
> "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" \
|
||||
|| die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \
|
||||
"${ED}/usr/share/doc/postgresql-${SLOT}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}"/postgresql.confd postgresql-${SLOT} \
|
||||
|| die "Inserting conf.d file failed"
|
||||
|
||||
newinitd "${WORKDIR}"/postgresql.init postgresql-${SLOT} \
|
||||
|| die "Inserting init.d file failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "The time stamp format is 64 bit integers now. If you upgrade from older"
|
||||
elog "databases, this may force you to either do a dump and reload of enable"
|
||||
elog "pg_legacytimestamp until you find time to do so. If the database can't start"
|
||||
elog "please try enabling pg_legacytimestamp and rebuild."
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z ${PG_INITDB_OPTS} ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled by"
|
||||
einfo "default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
emake check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,348 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.4.15.ebuild,v 1.2 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix python user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/darwin.patch" \
|
||||
"${WORKDIR}/ldflags.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch" \
|
||||
"${WORKDIR}/SuperH.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(has_version ~dev-db/postgresql-base-${PV}[nls] && use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" \
|
||||
> "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" \
|
||||
|| die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
rm -r "${ED}/usr/share/postgresql-${SLOT}/man/man7/" \
|
||||
"${ED}/usr/share/doc/postgresql-${SLOT}/html"
|
||||
rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{clusterdb,create{db,lang,user},drop{db,lang,user},ecpg,pg_{config,dump,dumpall,restore},psql,reindexdb,vacuumdb}.1
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}"/postgresql.confd postgresql-${SLOT} \
|
||||
|| die "Inserting conf.d file failed"
|
||||
|
||||
newinitd "${WORKDIR}"/postgresql.init postgresql-${SLOT} \
|
||||
|| die "Inserting init.d file failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "The time stamp format is 64 bit integers now. If you upgrade from older"
|
||||
elog "databases, this may force you to either do a dump and reload of enable"
|
||||
elog "pg_legacytimestamp until you find time to do so. If the database can't start"
|
||||
elog "please try enabling pg_legacytimestamp and rebuild."
|
||||
elog
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z ${PG_INITDB_OPTS} ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled by"
|
||||
einfo "default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
emake check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.4.16-r1.ebuild,v 1.1 2013/02/12 18:22:24 titanofold Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-8.4.16-r1.ebuild,v 1.2 2013/02/26 18:52:02 ago Exp $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
|
@ -11,7 +11,7 @@ inherit autotools eutils multilib pam prefix python-single-r1 user versionator
|
|||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~x86-fbsd"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
|
|
@ -1,342 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.0.10.ebuild,v 1.6 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix python user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" || die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/man1/
|
||||
cp "${S}"/doc/src/sgml/man1/{initdb,pg_controldata,pg_ctl,pg_resetxlog,post{gres,master}}.1 \
|
||||
"${ED}"/usr/share/postgresql-${SLOT}/man/man1/ || die
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} \
|
||||
|| die "Inserting conf.d file failed"
|
||||
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} \
|
||||
|| die "Inserting init.d file failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres \
|
||||
-c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D '${DATA_DIR}' -L '${EROOT%/}/usr/share/postgresql-${SLOT}/' ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb \
|
||||
-U postgres -D "${DATA_DIR}" \
|
||||
-L "${EROOT%/}/usr/share/postgresql-${SLOT}/" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
emake check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,351 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.0.11-r1.ebuild,v 1.2 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix python user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" || die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/man1/
|
||||
cp "${S}"/doc/src/sgml/man1/{initdb,pg_controldata,pg_ctl,pg_resetxlog,post{gres,master}}.1 \
|
||||
"${ED}"/usr/share/postgresql-${SLOT}/man/man1/ || die
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} \
|
||||
|| die "Inserting conf.d file failed"
|
||||
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} \
|
||||
|| die "Inserting init.d file failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttp://www.gentoo.org/doc/en/postgres-howto.xml#doc_chap5"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds. Control-C to cancel"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres \
|
||||
-c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D '${DATA_DIR}' -L '${EROOT%/}/usr/share/postgresql-${SLOT}/' ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb \
|
||||
-U postgres -D "${DATA_DIR}" \
|
||||
-L "${EROOT%/}/usr/share/postgresql-${SLOT}/" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
emake check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,342 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.0.11.ebuild,v 1.2 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix python user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" || die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/man1/
|
||||
cp "${S}"/doc/src/sgml/man1/{initdb,pg_controldata,pg_ctl,pg_resetxlog,post{gres,master}}.1 \
|
||||
"${ED}"/usr/share/postgresql-${SLOT}/man/man1/ || die
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} \
|
||||
|| die "Inserting conf.d file failed"
|
||||
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} \
|
||||
|| die "Inserting init.d file failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres \
|
||||
-c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D '${DATA_DIR}' -L '${EROOT%/}/usr/share/postgresql-${SLOT}/' ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb \
|
||||
-U postgres -D "${DATA_DIR}" \
|
||||
-L "${EROOT%/}/usr/share/postgresql-${SLOT}/" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
emake check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.0.12-r1.ebuild,v 1.1 2013/02/12 18:22:24 titanofold Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.0.12-r1.ebuild,v 1.2 2013/02/26 18:52:02 ago Exp $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
|
@ -11,7 +11,7 @@ inherit autotools eutils multilib pam prefix python-single-r1 user versionator
|
|||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
|
|
|
@ -1,342 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.0.9.ebuild,v 1.8 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils multilib pam prefix python user versionator
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.0-r3.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
--with-includes="${EPREFIX%/}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${EPREFIX%/}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
--with-system-tzdata="${EPREFIX%/}/usr/share/zoneinfo" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd -j1 || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd -j1 DESTDIR="${D}" || die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
dodir /usr/share/postgresql-${SLOT}/man/man1/
|
||||
cp "${S}"/doc/src/sgml/man1/{initdb,pg_controldata,pg_ctl,pg_resetxlog,post{gres,master}}.1 \
|
||||
"${ED}"/usr/share/postgresql-${SLOT}/man/man1/ || die
|
||||
|
||||
dodoc README HISTORY doc/{README.*,TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
|
||||
> "${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} \
|
||||
|| die "Inserting conf.d file failed"
|
||||
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} \
|
||||
|| die "Inserting init.d file failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f ${EROOT%/}/etc/conf.d/postgresql-${SLOT} ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z ${PGDATA} ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z ${DATA_DIR} ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [[ -f ${EROOT%/}/etc/env.d/02locale ]] ; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[[ -n ${LANG} ]] && export LANG
|
||||
[[ -n ${LC_CTYPE} ]] && export LC_CTYPE
|
||||
[[ -n ${LC_NUMERIC} ]] && export LC_NUMERIC
|
||||
[[ -n ${LC_TIME} ]] && export LC_TIME
|
||||
[[ -n ${LC_COLLATE} ]] && export LC_COLLATE
|
||||
[[ -n ${LC_MONETARY} ]] && export LC_MONETARY
|
||||
[[ -n ${LC_MESSAGES} ]] && export LC_MESSAGES
|
||||
[[ -n ${LC_ALL} ]] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [[ $correct != "true" ]] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ]] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[[ -z ${PG_MAX_CONNECTIONS} ]] && PG_MAX_CONNECTIONS=128
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [[ -z ${SKIP_SYSTEM_TESTS} ]] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [[ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ]] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
einfo "Creating the data directory ..."
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres \
|
||||
-c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D '${DATA_DIR}' -L '${EROOT%/}/usr/share/postgresql-${SLOT}/' ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb \
|
||||
-U postgres -D "${DATA_DIR}" \
|
||||
-L "${EROOT%/}/usr/share/postgresql-${SLOT}/" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo " mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [[ ${UID} != 0 ]] ; then
|
||||
emake check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,348 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.1.5.ebuild,v 1.8 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils flag-o-matic multilib pam prefix python user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${PO}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
--with-includes="${PO}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${PO}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd DESTDIR="${D}" || die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} || \
|
||||
die "Inserting conf failed"
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} || \
|
||||
die "Inserting conf failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttp://www.gentoo.org/doc/en/postgres-howto.xml#doc_chap5"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds. Control-C to cancel"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128"
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [ -z ${SKIP_SYSTEM_TESTS} ] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [ ${UID} -ne 0 ] ; then
|
||||
emake -j1 check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,348 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.1.6.ebuild,v 1.6 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils flag-o-matic multilib pam prefix python user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${PO}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
--with-includes="${PO}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${PO}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd DESTDIR="${D}" || die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} || \
|
||||
die "Inserting conf failed"
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} || \
|
||||
die "Inserting conf failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttp://www.gentoo.org/doc/en/postgres-howto.xml#doc_chap5"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds. Control-C to cancel"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128"
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [ -z ${SKIP_SYSTEM_TESTS} ] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [ ${UID} -ne 0 ] ; then
|
||||
emake -j1 check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,346 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.1.7-r1.ebuild,v 1.2 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils flag-o-matic multilib pam prefix python user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${PO}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
--with-includes="${PO}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${PO}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd DESTDIR="${D}" || die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} || \
|
||||
die "Inserting conf failed"
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} || \
|
||||
die "Inserting conf failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttp://www.gentoo.org/doc/en/postgres-howto.xml#doc_chap5"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds. Control-C to cancel"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128"
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [ -z ${SKIP_SYSTEM_TESTS} ] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [ ${UID} -ne 0 ] ; then
|
||||
emake -j1 check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,348 +0,0 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.1.7.ebuild,v 1.2 2013/01/29 10:09:22 patrick Exp $
|
||||
|
||||
EAPI="4"
|
||||
PYTHON_DEPEND="python? 2"
|
||||
|
||||
WANT_AUTOMAKE="none"
|
||||
inherit autotools eutils flag-o-matic multilib pam prefix python user versionator
|
||||
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
||||
DESCRIPTION="PostgreSQL server"
|
||||
HOMEPAGE="http://www.postgresql.org/"
|
||||
SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-patches-9.1-r1.tbz2
|
||||
http://dev.gentoo.org/~titanofold/postgresql-initscript-2.1.1.tbz2"
|
||||
LICENSE="POSTGRESQL GPL-2"
|
||||
|
||||
LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
|
||||
IUSE="doc kernel_linux nls pam perl -pg_legacytimestamp python selinux tcl uuid xml"
|
||||
|
||||
for lingua in ${LINGUAS}; do
|
||||
IUSE+=" linguas_${lingua}"
|
||||
done
|
||||
|
||||
wanted_languages() {
|
||||
local enable_langs
|
||||
|
||||
for lingua in ${LINGUAS} ; do
|
||||
use linguas_${lingua} && enable_langs+="${lingua} "
|
||||
done
|
||||
|
||||
echo -n ${enable_langs}
|
||||
}
|
||||
|
||||
RDEPEND="~dev-db/postgresql-base-${PV}:${SLOT}[pam?,pg_legacytimestamp=,nls=]
|
||||
perl? ( >=dev-lang/perl-5.8 )
|
||||
selinux? ( sec-policy/selinux-postgresql )
|
||||
tcl? ( >=dev-lang/tcl-8 )
|
||||
uuid? ( dev-libs/ossp-uuid )
|
||||
xml? ( dev-libs/libxml2 dev-libs/libxslt )"
|
||||
DEPEND="${RDEPEND}
|
||||
sys-devel/flex
|
||||
xml? ( virtual/pkgconfig )"
|
||||
PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
|
||||
|
||||
# Support /var/run or /run for the socket directory
|
||||
[[ ! -d /run ]] && RUNDIR=/var
|
||||
|
||||
pkg_setup() {
|
||||
enewgroup postgres 70
|
||||
enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
|
||||
|
||||
use python && python_set_active_version 2
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
epatch "${WORKDIR}/autoconf.patch" \
|
||||
"${WORKDIR}/bool.patch" \
|
||||
"${WORKDIR}/pg_ctl-exit-status.patch" \
|
||||
"${WORKDIR}/server.patch"
|
||||
|
||||
eprefixify src/include/pg_config_manual.h
|
||||
|
||||
if use test ; then
|
||||
epatch "${WORKDIR}/regress.patch"
|
||||
sed -e "s|@SOCKETDIR@|${T}|g" -i src/test/regress/pg_regress{,_main}.c
|
||||
sed -e "s|/no/such/location|${S}/src/test/regress/tmp_check/no/such/location|g" \
|
||||
-i src/test/regress/{input,output}/tablespace.source
|
||||
else
|
||||
echo "all install:" > "${S}/src/test/regress/GNUmakefile"
|
||||
fi
|
||||
|
||||
sed -e "s|@RUNDIR@|${RUNDIR}|g" \
|
||||
-i src/include/pg_config_manual.h "${WORKDIR}/postgresql.init" || \
|
||||
die "RUNDIR sed failed"
|
||||
sed -e "s|@SLOT@|${SLOT}|g" \
|
||||
-i "${WORKDIR}/postgresql.init" "${WORKDIR}/postgresql.confd" || \
|
||||
die "SLOT sed failed"
|
||||
|
||||
eautoconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
case ${CHOST} in
|
||||
*-darwin*|*-solaris*)
|
||||
use nls && append-libs intl
|
||||
;;
|
||||
esac
|
||||
|
||||
local PO="${EPREFIX%/}"
|
||||
|
||||
# eval is needed to get along with pg_config quotation of space-rich entities.
|
||||
eval econf "$(${PO}/usr/$(get_libdir)/postgresql-${SLOT}/bin/pg_config --configure)" \
|
||||
$(use_with perl) \
|
||||
$(use_with python) \
|
||||
$(use_with tcl) \
|
||||
$(use_with xml libxml) \
|
||||
$(use_with xml libxslt) \
|
||||
$(use_with uuid ossp-uuid) \
|
||||
--with-system-tzdata="${PO}/usr/share/zoneinfo" \
|
||||
--with-includes="${PO}/usr/include/postgresql-${SLOT}/" \
|
||||
--with-libraries="${PO}/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)" \
|
||||
"$(use_enable nls nls "$(wanted_languages)")"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2); do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake -C $bd || die "emake in $bd failed"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use perl ; then
|
||||
mv -f "${S}/src/pl/plperl/GNUmakefile" "${S}/src/pl/plperl/GNUmakefile_orig"
|
||||
sed -e "s:\$(DESTDIR)\$(plperl_installdir):\$(plperl_installdir):" \
|
||||
"${S}/src/pl/plperl/GNUmakefile_orig" > "${S}/src/pl/plperl/GNUmakefile"
|
||||
fi
|
||||
|
||||
local bd
|
||||
for bd in . contrib $(use xml && echo contrib/xml2) ; do
|
||||
PATH="${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin:${PATH}" \
|
||||
emake install -C $bd DESTDIR="${D}" || die "emake install in $bd failed"
|
||||
done
|
||||
|
||||
dodoc README HISTORY doc/{TODO,bug.template}
|
||||
|
||||
dodir /etc/eselect/postgresql/slots/${SLOT}
|
||||
echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \
|
||||
"${ED}/etc/eselect/postgresql/slots/${SLOT}/server"
|
||||
|
||||
newconfd "${WORKDIR}/postgresql.confd" postgresql-${SLOT} || \
|
||||
die "Inserting conf failed"
|
||||
newinitd "${WORKDIR}/postgresql.init" postgresql-${SLOT} || \
|
||||
die "Inserting conf failed"
|
||||
|
||||
use pam && pamd_mimic system-auth postgresql auth account session
|
||||
|
||||
if use prefix ; then
|
||||
keepdir ${RUNDIR}/run/postgresql
|
||||
fperms 0770 ${RUNDIR}/run/postgresql
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
postgresql-config update
|
||||
|
||||
elog "Gentoo specific documentation:"
|
||||
elog "http://www.gentoo.org/doc/en/postgres-howto.xml"
|
||||
elog
|
||||
elog "Official documentation:"
|
||||
elog "http://www.postgresql.org/docs/${SLOT}/static/index.html"
|
||||
elog
|
||||
elog "The default location of the Unix-domain socket is:"
|
||||
elog " ${EROOT%/}${RUNDIR}/run/postgresql/"
|
||||
elog
|
||||
elog "If you have users and/or services that you would like to utilize the"
|
||||
elog "socket, you must add them to the 'postgres' system group:"
|
||||
elog " usermod -a -G postgres <user>"
|
||||
elog
|
||||
elog "Before initializing the database, you may want to edit PG_INITDB_OPTS"
|
||||
elog "so that it contains your preferred locale in:"
|
||||
elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
elog
|
||||
elog "Then, execute the following command to setup the initial database"
|
||||
elog "environment:"
|
||||
elog " emerge --config =${CATEGORY}/${PF}"
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
if [[ -z ${REPLACED_BY_VERSION} ]] ; then
|
||||
ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?"
|
||||
ewarn "\thttp://www.gentoo.org/doc/en/postgres-howto.xml#doc_chap5"
|
||||
|
||||
ebegin "Resuming removal in 10 seconds. Control-C to cancel"
|
||||
sleep 10
|
||||
eend 0
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
postgresql-config update
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
[[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
[[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/"
|
||||
[[ -z "${DATA_DIR}" ]] && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data"
|
||||
|
||||
# environment.bz2 may not contain the same locale as the current system
|
||||
# locale. Unset and source from the current system locale.
|
||||
if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then
|
||||
unset LANG
|
||||
unset LC_CTYPE
|
||||
unset LC_NUMERIC
|
||||
unset LC_TIME
|
||||
unset LC_COLLATE
|
||||
unset LC_MONETARY
|
||||
unset LC_MESSAGES
|
||||
unset LC_ALL
|
||||
source "${EROOT%/}/etc/env.d/02locale"
|
||||
[ -n "${LANG}" ] && export LANG
|
||||
[ -n "${LC_CTYPE}" ] && export LC_CTYPE
|
||||
[ -n "${LC_NUMERIC}" ] && export LC_NUMERIC
|
||||
[ -n "${LC_TIME}" ] && export LC_TIME
|
||||
[ -n "${LC_COLLATE}" ] && export LC_COLLATE
|
||||
[ -n "${LC_MONETARY}" ] && export LC_MONETARY
|
||||
[ -n "${LC_MESSAGES}" ] && export LC_MESSAGES
|
||||
[ -n "${LC_ALL}" ] && export LC_ALL
|
||||
fi
|
||||
|
||||
einfo "You can modify the paths and options passed to initdb by editing:"
|
||||
einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}"
|
||||
einfo
|
||||
einfo "Information on options that can be passed to initdb are found at:"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html"
|
||||
einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html"
|
||||
einfo
|
||||
einfo "PG_INITDB_OPTS is currently set to:"
|
||||
if [[ -z "${PG_INITDB_OPTS}" ]] ; then
|
||||
einfo " (none)"
|
||||
else
|
||||
einfo " ${PG_INITDB_OPTS}"
|
||||
fi
|
||||
einfo
|
||||
einfo "Configuration files will be installed to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo
|
||||
einfo "The database cluster will be created in:"
|
||||
einfo " ${DATA_DIR}"
|
||||
einfo
|
||||
while [ "$correct" != "true" ] ; do
|
||||
einfo "Are you ready to continue? (y/n)"
|
||||
read answer
|
||||
if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then
|
||||
correct="true"
|
||||
elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then
|
||||
die "Aborting initialization."
|
||||
else
|
||||
echo "Answer not recognized"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then
|
||||
eerror "The given directory, '${DATA_DIR}', is not empty."
|
||||
eerror "Modify DATA_DIR to point to an empty directory."
|
||||
die "${DATA_DIR} is not empty."
|
||||
fi
|
||||
|
||||
[ -z "${PG_MAX_CONNECTIONS}" ] && PG_MAX_CONNECTIONS="128"
|
||||
einfo "Checking system parameters..."
|
||||
|
||||
if ! use kernel_linux ; then
|
||||
einfo "Skipped."
|
||||
einfo " Tests not supported on this OS (yet)"
|
||||
else
|
||||
if [ -z ${SKIP_SYSTEM_TESTS} ] ; then
|
||||
einfo "Checking whether your system supports at least ${PG_MAX_CONNECTIONS} connections..."
|
||||
|
||||
local SEMMSL=$(sysctl -n kernel.sem | cut -f1)
|
||||
local SEMMNS=$(sysctl -n kernel.sem | cut -f2)
|
||||
local SEMMNI=$(sysctl -n kernel.sem | cut -f4)
|
||||
local SHMMAX=$(sysctl -n kernel.shmmax)
|
||||
|
||||
local SEMMSL_MIN=17
|
||||
local SEMMNS_MIN=$(( ( ${PG_MAX_CONNECTIONS}/16 ) * 17 ))
|
||||
local SEMMNI_MIN=$(( ( ${PG_MAX_CONNECTIONS}+15 ) / 16 ))
|
||||
local SHMMAX_MIN=$(( 500000 + ( 30600 * ${PG_MAX_CONNECTIONS} ) ))
|
||||
|
||||
for p in SEMMSL SEMMNS SEMMNI SHMMAX ; do
|
||||
if [ $(eval echo \$$p) -lt $(eval echo \$${p}_MIN) ] ; then
|
||||
eerror "The value for ${p} $(eval echo \$$p) is below the recommended value $(eval echo \$${p}_MIN)"
|
||||
eerror "You have now several options:"
|
||||
eerror " - Change the mentioned system parameter"
|
||||
eerror " - Lower the number of max.connections by setting PG_MAX_CONNECTIONS to a"
|
||||
eerror " value lower than ${PG_MAX_CONNECTIONS}"
|
||||
eerror " - Set SKIP_SYSTEM_TESTS in case you want to ignore this test completely"
|
||||
eerror "More information can be found here:"
|
||||
eerror " http://www.postgresql.org/docs/${SLOT}/static/kernel-resources.html"
|
||||
die "System test failed."
|
||||
fi
|
||||
done
|
||||
einfo "Passed."
|
||||
else
|
||||
ewarn "SKIP_SYSTEM_TESTS set, so skipping."
|
||||
fi
|
||||
fi
|
||||
|
||||
einfo "Creating the data directory ..."
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
mkdir -p "${DATA_DIR}"
|
||||
chown -Rf postgres:postgres "${DATA_DIR}"
|
||||
chmod 0700 "${DATA_DIR}"
|
||||
fi
|
||||
|
||||
einfo "Initializing the database ..."
|
||||
|
||||
if [[ ${EUID} == 0 ]] ; then
|
||||
su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}"
|
||||
else
|
||||
"${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS}
|
||||
fi
|
||||
|
||||
mv "${DATA_DIR%/}"/*.conf "${PGDATA}"
|
||||
|
||||
einfo "The autovacuum function, which was in contrib, has been moved to the main"
|
||||
einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled"
|
||||
einfo "by default. You can disable it in the cluster's:"
|
||||
einfo " ${PGDATA%/}/postgresql.conf"
|
||||
einfo
|
||||
einfo "The PostgreSQL server, by default, will log events to:"
|
||||
einfo " ${DATA_DIR%/}/postmaster.log"
|
||||
einfo
|
||||
if use prefix ; then
|
||||
einfo "The location of the configuration files have moved to:"
|
||||
einfo " ${PGDATA}"
|
||||
einfo "To start the server:"
|
||||
einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'"
|
||||
einfo "To stop:"
|
||||
einfo " pg_ctl stop -D ${DATA_DIR}"
|
||||
einfo
|
||||
einfo "Or move the configuration files back:"
|
||||
einfo "mv ${PGDATA}*.conf ${DATA_DIR}"
|
||||
else
|
||||
einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL"
|
||||
einfo "instead of 'pg_ctl'."
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
einfo ">>> Test phase [check]: ${CATEGORY}/${PF}"
|
||||
|
||||
if [ ${UID} -ne 0 ] ; then
|
||||
emake -j1 check || die "Make check failed. See above for details."
|
||||
|
||||
einfo "If you think other tests besides the regression tests are necessary, please"
|
||||
einfo "submit a bug including a patch for this ebuild to enable them."
|
||||
else
|
||||
ewarn "Tests cannot be run as root. Skipping."
|
||||
ewarn "HINT: FEATURES=\"userpriv\""
|
||||
fi
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# Copyright 1999-2013 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.1.8-r1.ebuild,v 1.1 2013/02/12 18:22:24 titanofold Exp $
|
||||
# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-server/postgresql-server-9.1.8-r1.ebuild,v 1.2 2013/02/26 18:52:02 ago Exp $
|
||||
|
||||
EAPI="5"
|
||||
|
||||
|
@ -9,7 +9,7 @@ WANT_AUTOMAKE="none"
|
|||
|
||||
inherit autotools eutils flag-o-matic multilib pam prefix python-single-r1 user versionator
|
||||
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris"
|
||||
|
||||
SLOT="$(get_version_component_range 1-2)"
|
||||
S="${WORKDIR}/postgresql-${PV}"
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue