/[gentoo-x86]/dev-db/pgpool2/pgpool2-3.3.5.ebuild
Gentoo

Contents of /dev-db/pgpool2/pgpool2-3.3.5.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations) (download)
Mon Jul 27 09:13:52 2015 UTC (5 years ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Bump, remove old

(Portage version: 2.2.20/cvs/Linux x86_64, unsigned Manifest commit)

1 patrick 1.1 # Copyright 1999-2015 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 patrick 1.2 # $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/pgpool2-3.3.5.ebuild,v 1.1 2015/02/15 08:40:03 patrick Exp $
4 patrick 1.1
5     EAPI=5
6    
7     MY_P="${PN/2/-II}-${PV}"
8    
9     inherit base user
10    
11     DESCRIPTION="Connection pool server for PostgreSQL"
12     HOMEPAGE="http://www.pgpool.net/"
13     SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
14     LICENSE="BSD"
15     SLOT="0"
16    
17     KEYWORDS="~amd64 ~x86"
18    
19     IUSE="memcached pam ssl static-libs"
20    
21     RDEPEND="
22     dev-db/postgresql
23     memcached? ( dev-libs/libmemcached )
24     pam? ( sys-auth/pambase )
25     ssl? ( dev-libs/openssl )
26     "
27     DEPEND="${RDEPEND}
28     sys-devel/bison
29     !!dev-db/pgpool
30     "
31    
32     S=${WORKDIR}/${MY_P}
33    
34     pkg_setup() {
35     enewgroup postgres 70
36     enewuser pgpool -1 -1 -1 postgres
37    
38     # We need the postgres user as well so we can set the proper
39     # permissions on the sockets without getting into fights with
40     # PostgreSQL's initialization scripts.
41     enewuser postgres 70 /bin/bash /var/lib/postgresql postgres
42     }
43    
44     src_prepare() {
45     epatch "${FILESDIR}/pgpool_run_paths.patch"
46    
47     local pg_config_manual="$(pg_config --includedir)/pg_config_manual.h"
48     local pgsql_socket_dir=$(grep DEFAULT_PGSOCKET_DIR "${pg_config_manual}" | \
49     sed 's|.*\"\(.*\)\"|\1|g')
50     local pgpool_socket_dir="$(dirname $pgsql_socket_dir)/pgpool"
51    
52     sed "s|@PGSQL_SOCKETDIR@|${pgsql_socket_dir}|g" \
53     -i *.conf.sample* pool.h || die
54    
55     sed "s|@PGPOOL_SOCKETDIR@|${pgpool_socket_dir}|g" \
56     -i *.conf.sample* pool.h || die
57     }
58    
59     src_configure() {
60     local myconf
61     use memcached && \
62     myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\""
63     use pam && myconf+=' --with-pam'
64    
65     econf \
66     --disable-rpath \
67     --sysconfdir="${EROOT%/}/etc/${PN}" \
68     $(use_with ssl openssl) \
69     $(use_enable static-libs static) \
70     ${myconf}
71     }
72    
73     src_compile() {
74     emake
75    
76     emake -C sql
77     }
78    
79     src_install() {
80     emake DESTDIR="${D}" install
81    
82     emake DESTDIR="${D}" -C sql install
83     cd "${S}"
84    
85     # 3.3 appears to have removed this
86     # `contrib' moved to `extension' with PostgreSQL 9.1
87     #local pgslot=$(postgresql-config show)
88     #if [[ ${pgslot//.} > 90 ]] ; then
89     # cd "${ED%/}$(pg_config --sharedir)"
90     # mv contrib extension || die
91     # cd "${S}"
92     #fi
93    
94     newinitd "${FILESDIR}/${PN}.initd" ${PN}
95     newconfd "${FILESDIR}/${PN}.confd" ${PN}
96    
97     # Documentation
98     dodoc NEWS TODO doc/where_to_send_queries.{pdf,odg}
99     dohtml -r doc
100    
101     # Examples and extras
102     insinto "/usr/share/${PN}"
103     doins doc/{pgpool_remote_start,basebackup.sh,recovery.conf.sample}
104     mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die
105    
106     # One more thing: Evil la files!
107     find "${ED}" -name '*.la' -exec rm -f {} +
108     }

  ViewVC Help
Powered by ViewVC 1.1.20