annotate dev-db/postgresql-base/postgresql-base-9.0.2.ebuild @ 278:4053ff69911f

bump maven to 3.0.3
author holger
date Fri, 04 Mar 2011 12:17:45 +0100
parents c982d5c6f5eb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
269
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
1 # Copyright 1999-2010 Gentoo Foundation
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
3 # $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql-base/postgresql-base-9.0.1.ebuild,v 1.1 2010/10/06 14:57:13 patrick Exp $
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
4
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
5 EAPI="2"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
6
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
7 WANT_AUTOMAKE="none"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
8
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
9 inherit eutils multilib versionator autotools
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
10
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
11 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
12
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
13 DESCRIPTION="PostgreSQL libraries and clients"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
14 HOMEPAGE="http://www.postgresql.org/"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
15
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
16 MY_PV=${PV/_/}
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
17 SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
18 S=${WORKDIR}/postgresql-${MY_PV}
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
19
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
20 LICENSE="POSTGRESQL"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
21 SLOT="$(get_version_component_range 1-2)"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
22 LINGUAS="af cs de es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
23 IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
24
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
25 for lingua in ${LINGUAS}; do
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
26 IUSE+=" linguas_${lingua}"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
27 done
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
28
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
29 RESTRICT="test"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
30
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
31 wanted_languages() {
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
32 local enable_langs
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
33
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
34 for lingua in ${LINGUAS} ; do
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
35 use linguas_${lingua} && enable_langs+="${lingua} "
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
36 done
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
37
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
38 echo -n ${enable_langs}
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
39 }
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
40
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
41 RDEPEND="!!dev-db/postgresql-libs
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
42 !!dev-db/postgresql-client
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
43 !!dev-db/libpq
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
44 !!dev-db/postgresql
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
45 >=app-admin/eselect-postgresql-0.3
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
46 virtual/libintl
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
47 kerberos? ( virtual/krb5 )
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
48 ldap? ( net-nds/openldap )
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
49 pam? ( virtual/pam )
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
50 readline? ( sys-libs/readline )
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
51 ssl? ( >=dev-libs/openssl-0.9.6-r1 )
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
52 zlib? ( sys-libs/zlib )"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
53 DEPEND="${RDEPEND}
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
54 sys-devel/bison
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
55 sys-devel/flex
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
56 nls? ( sys-devel/gettext )"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
57 PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
58
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
59 src_prepare() {
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
60 epatch "${FILESDIR}/postgresql-9.0-common.3.patch" \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
61 "${FILESDIR}/postgresql-${SLOT}-base.3.patch"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
62
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
63 # to avoid collision - it only should be installed by server
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
64 rm "${S}/src/backend/nls.mk"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
65
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
66 # because psql/help.c includes the file
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
67 ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
68
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
69 eautoconf
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
70 }
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
71
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
72 src_configure() {
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
73 export LDFLAGS_SL="${LDFLAGS}"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
74 econf \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
75 --prefix=/usr/$(get_libdir)/postgresql-${SLOT} \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
76 --datadir=/usr/share/postgresql-${SLOT} \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
77 --docdir=/usr/share/doc/postgresql-${SLOT} \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
78 --sysconfdir=/etc/postgresql-${SLOT} \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
79 --includedir=/usr/include/postgresql-${SLOT} \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
80 --mandir=/usr/share/postgresql-${SLOT}/man \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
81 --enable-depend \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
82 --without-tcl \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
83 --without-perl \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
84 --without-python \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
85 $(use_with readline) \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
86 $(use_with kerberos krb5) \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
87 $(use_with kerberos gssapi) \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
88 "$(use_enable nls nls "$(wanted_languages)")" \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
89 $(use_with pam) \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
90 $(use_enable !pg_legacytimestamp integer-datetimes) \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
91 $(use_with ssl openssl) \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
92 $(use_enable threads thread-safety) \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
93 $(use_with zlib) \
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
94 $(use_with ldap)
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
95 }
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
96
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
97 src_compile() {
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
98 emake || die "emake failed"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
99
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
100 cd "${S}/contrib"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
101 emake || die "emake failed"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
102 }
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
103
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
104 src_install() {
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
105 emake DESTDIR="${D}" install || die "emake install failed"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
106 insinto /usr/include/postgresql-${SLOT}/postmaster
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
107 doins "${S}"/src/include/postmaster/*.h || die
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
108
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
109 dodir /usr/share/postgresql-${SLOT}/man/man1/ || die
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
110 cp "${S}"/doc/src/sgml/man1/* "${D}"/usr/share/postgresql-${SLOT}/man/man1/ || die
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
111
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
112 rm "${D}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,ipcclean,pg_controldata,pg_ctl,pg_resetxlog,pg_restore,postgres,postmaster}.1
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
113 dodoc README HISTORY doc/{README.*,TODO,bug.template} || die
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
114
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
115 cd "${S}/contrib"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
116 emake DESTDIR="${D}" install || die "emake install failed"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
117 cd "${S}"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
118
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
119 dodir /etc/eselect/postgresql/slots/${SLOT} || die
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
120
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
121 IDIR="/usr/include/postgresql-${SLOT}"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
122 cat > "${D}/etc/eselect/postgresql/slots/${SLOT}/base" <<-__EOF__
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
123 postgres_ebuilds="\${postgres_ebuilds} ${PF}"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
124 postgres_prefix=/usr/$(get_libdir)/postgresql-${SLOT}
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
125 postgres_datadir=/usr/share/postgresql-${SLOT}
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
126 postgres_bindir=/usr/$(get_libdir)/postgresql-${SLOT}/bin
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
127 postgres_symlinks=(
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
128 ${IDIR} /usr/include/postgresql
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
129 ${IDIR}/libpq-fe.h /usr/include/libpq-fe.h
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
130 ${IDIR}/pg_config_manual.h /usr/include/pg_config_manual.h
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
131 ${IDIR}/libpq /usr/include/libpq
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
132 ${IDIR}/postgres_ext.h /usr/include/postgres_ext.h
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
133 )
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
134 __EOF__
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
135
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
136 cat >"${T}/50postgresql-94-${SLOT}" <<-__EOF__
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
137 LDPATH=/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir)
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
138 MANPATH=/usr/share/postgresql-${SLOT}/man
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
139 __EOF__
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
140 doenvd "${T}/50postgresql-94-${SLOT}" || die
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
141
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
142 keepdir /etc/postgresql-${SLOT} || die
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
143 }
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
144
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
145 pkg_postinst() {
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
146 eselect postgresql update
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
147 [[ "$(eselect postgresql show)" = "(none)" ]] && eselect postgresql set ${SLOT}
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
148 elog "If you need a global psqlrc-file, you can place it in:"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
149 elog " '${ROOT}/etc/postgresql-${SLOT}/'"
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
150 elog
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
151 }
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
152
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
153 pkg_postrm() {
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
154 eselect postgresql update
c982d5c6f5eb bump postgres to 9.0.2
holger
parents:
diff changeset
155 }