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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

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

1 titanofold 1.4 # Copyright 1999-2014 Gentoo Foundation
2 patrick 1.1 # Distributed under the terms of the GNU General Public License v2
3 patrick 1.6 # $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/pgpool2-3.2.3.ebuild,v 1.5 2014/12/28 15:10:55 titanofold Exp $
4 patrick 1.1
5     EAPI=4
6    
7 titanofold 1.2 MY_P="${PN/2/-II}-${PV}"
8 patrick 1.1
9 patrick 1.3 inherit base user
10 patrick 1.1
11     DESCRIPTION="Connection pool server for PostgreSQL"
12     HOMEPAGE="http://www.pgpool.net/"
13 titanofold 1.2 SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz"
14 patrick 1.1 LICENSE="BSD"
15     SLOT="0"
16    
17     KEYWORDS="~amd64 ~x86"
18    
19     IUSE="memcached pam ssl static-libs"
20    
21     RDEPEND="
22 titanofold 1.5 dev-db/postgresql
23 patrick 1.1 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 titanofold 1.2 emake -C sql
77 patrick 1.1 }
78    
79     src_install() {
80     emake DESTDIR="${D}" install
81    
82 titanofold 1.2 emake DESTDIR="${D}" -C sql install
83 patrick 1.1 cd "${S}"
84    
85     # `contrib' moved to `extension' with PostgreSQL 9.1
86     local pgslot=$(postgresql-config show)
87     if [[ ${pgslot//.} > 90 ]] ; then
88     cd "${ED%/}$(pg_config --sharedir)"
89     mv contrib extension || die
90     cd "${S}"
91     fi
92    
93     newinitd "${FILESDIR}/${PN}.initd" ${PN}
94     newconfd "${FILESDIR}/${PN}.confd" ${PN}
95    
96     # Documentation
97     dodoc NEWS TODO doc/where_to_send_queries.{pdf,odg}
98     dohtml -r doc
99    
100     # Examples and extras
101     insinto "/usr/share/${PN}"
102     doins doc/{pgpool_remote_start,basebackup.sh,recovery.conf.sample}
103     mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die
104    
105     # One more thing: Evil la files!
106     find "${ED}" -name '*.la' -exec rm -f {} +
107     }

  ViewVC Help
Powered by ViewVC 1.1.20