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