annotate dev-db/postgresql-base/postgresql-base-8.3.6.ebuild @ 107:72f3700549ac

noflushd is in portage
author holger@hoho.dyndns.org
date Tue, 03 Mar 2009 23:13:27 +0100
parents 17d134ab73d6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
103
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
1 # Copyright 1999-2008 Gentoo Foundation
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
3 # $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-8.3.5.ebuild,v 1.1 2008/12/03 19:21:50 caleb Exp $
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
4
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
5 EAPI="1"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
6
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
7 WANT_AUTOCONF="latest"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
8 WANT_AUTOMAKE="none"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
9
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
10 inherit eutils multilib toolchain-funcs versionator autotools
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
11
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
12 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
13
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
14 DESCRIPTION="PostgreSQL libraries and clients"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
15 HOMEPAGE="http://www.postgresql.org/"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
16 SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
17 LICENSE="POSTGRESQL"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
18 SLOT="$(get_version_component_range 1-2)"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
19 IUSE_LINGUAS="
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
20 linguas_af linguas_cs linguas_de linguas_es linguas_fa linguas_fr
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
21 linguas_hr linguas_hu linguas_it linguas_ko linguas_nb linguas_pl
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
22 linguas_pt_BR linguas_ro linguas_ru linguas_sk linguas_sl linguas_sv
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
23 linguas_tr linguas_zh_CN linguas_zh_TW"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
24 IUSE="doc kerberos nls pam pg-intdatetime readline ssl threads zlib ldap ${IUSE_LINGUAS}"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
25 RESTRICT="test"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
26
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
27 wanted_languages() {
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
28 for u in ${IUSE_LINGUAS} ; do
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
29 use $u && echo -n "${u#linguas_} "
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
30 done
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
31 }
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
32
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
33 RDEPEND="kerberos? ( virtual/krb5 )
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
34 pam? ( virtual/pam )
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
35 readline? ( >=sys-libs/readline-4.1 )
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
36 ssl? ( >=dev-libs/openssl-0.9.6-r1 )
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
37 zlib? ( >=sys-libs/zlib-1.1.3 )
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
38 >=app-admin/eselect-postgresql-0.3
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
39 !dev-db/postgresql-libs
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
40 !dev-db/postgresql-client
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
41 !dev-db/libpq
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
42 !dev-db/postgresql
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
43 ldap? ( net-nds/openldap )"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
44 DEPEND="${RDEPEND}
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
45 sys-devel/flex
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
46 >=sys-devel/bison-1.875
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
47 nls? ( sys-devel/gettext )"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
48 PDEPEND="doc? ( dev-db/postgresql-docs:${SLOT} )"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
49
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
50 S="${WORKDIR}/postgresql-${PV}"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
51
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
52 src_unpack() {
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
53 unpack ${A}
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
54 cd "${S}"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
55
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
56 epatch "${FILESDIR}/postgresql-${SLOT}-common.patch" \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
57 "${FILESDIR}/postgresql-${SLOT}-base.patch" \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
58 "${FILESDIR}/postgresql-8.x-relax_ssl_perms.patch"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
59
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
60 # to avoid collision - it only should be installed by server
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
61 rm "${S}/src/backend/nls.mk"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
62
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
63 # because psql/help.c includes the file
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
64 ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
65
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
66 eautoconf
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
67 }
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
68
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
69 src_compile() {
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
70 econf --prefix=/usr/$(get_libdir)/postgresql-${SLOT} \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
71 --datadir=/usr/share/postgresql-${SLOT} \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
72 --sysconfdir=/etc/postgresql-${SLOT} \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
73 --includedir=/usr/include/postgresql-${SLOT} \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
74 --with-locale-dir=/usr/share/postgresql-${SLOT}/locale \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
75 --mandir=/usr/share/postgresql-${SLOT}/man \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
76 --without-docdir \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
77 --enable-depend \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
78 --without-tcl \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
79 --without-perl \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
80 --without-python \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
81 $(use_with readline) \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
82 $(use_with kerberos krb5) \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
83 $(use_with kerberos gssapi) \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
84 "$(use_enable nls nls "$(wanted_languages)")" \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
85 $(use_with pam) \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
86 $(use_enable pg-intdatetime integer-datetimes ) \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
87 $(use_with ssl openssl) \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
88 $(use_enable threads thread-safety) \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
89 $(use_enable threads thread-safety-force) \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
90 $(use_with zlib) \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
91 $(use_with ldap) \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
92 ${myconf} \
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
93 || die "configure failed"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
94
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
95 emake LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "emake failed"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
96
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
97 cd "${S}/contrib"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
98 emake LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "emake failed"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
99 }
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
100
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
101 src_install() {
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
102 emake DESTDIR="${D}" install || die "emake install failed"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
103 insinto /usr/include/postgresql-${SLOT}/postmaster
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
104 doins "${S}"/src/include/postmaster/*.h
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
105 dodir /usr/share/postgresql-${SLOT}/man/man1
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
106 tar -zxf "${S}/doc/man.tar.gz" -C "${D}"/usr/share/postgresql-${SLOT}/man man1/{ecpg,pg_config}.1
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
107
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
108 rm "${D}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,ipcclean,pg_controldata,pg_ctl,pg_resetxlog,pg_restore,postgres,postmaster}.1
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
109 dodoc README HISTORY doc/{README.*,TODO,bug.template}
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
110
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
111 cd "${S}/contrib"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
112 emake DESTDIR="${D}" install || die "emake install failed"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
113 cd "${S}"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
114
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
115 dodir /etc/eselect/postgresql/slots/${SLOT}
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
116
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
117 IDIR="/usr/include/postgresql-${SLOT}"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
118 cat > "${D}/etc/eselect/postgresql/slots/${SLOT}/base" <<-__EOF__
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
119 postgres_ebuilds="\${postgres_ebuilds} ${PF}"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
120 postgres_prefix=/usr/$(get_libdir)/postgresql-${SLOT}
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
121 postgres_datadir=/usr/share/postgresql-${SLOT}
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
122 postgres_bindir=/usr/$(get_libdir)/postgresql-${SLOT}/bin
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
123 postgres_symlinks=(
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
124 ${IDIR} /usr/include/postgresql
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
125 ${IDIR}/libpq-fe.h /usr/include/libpq-fe.h
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
126 ${IDIR}/libpq /usr/include/libpq
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
127 ${IDIR}/postgres_ext.h /usr/include/postgres_ext.h
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
128 )
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
129 __EOF__
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
130
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
131 cat >"${T}/50postgresql-94-${SLOT}" <<-__EOF__
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
132 LDPATH=/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
133 MANPATH=/usr/share/postgresql-${SLOT}/man
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
134 __EOF__
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
135 doenvd "${T}/50postgresql-94-${SLOT}"
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
136
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
137 keepdir /etc/postgresql-${SLOT}
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
138 }
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
139
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
140 pkg_postinst() {
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
141 eselect postgresql update
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
142 [[ "$(eselect postgresql show)" = "(none)" ]] && eselect postgresql set ${SLOT}
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
143 elog "If you need a global psqlrc-file, you can place it in '${ROOT}/etc/postgresql-${SLOT}/'."
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
144 }
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
145
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
146 pkg_postrm() {
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
147 eselect postgresql update
17d134ab73d6 bump postgres to 8.3.6
holger@hoho.dyndns.org
parents:
diff changeset
148 }