annotate dev-db/postgresql-base/postgresql-base-8.4.0.ebuild @ 156:11ab44c3209a

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