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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Tue Apr 2 01:51:48 2013 UTC (7 years, 4 months ago) by titanofold
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Version bump. Clean out old versions. Remove autotools inherit. Fixes
bug 459030.

(Portage version: 2.1.11.55/cvs/Linux x86_64, signed Manifest commit with key D1BBFDA0)

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

  ViewVC Help
Powered by ViewVC 1.1.20