Mercurial > hg > portage
annotate dev-db/postgresql-base/postgresql-base-8.4.1.ebuild @ 166:aec49d51a27b
update pgpool-II to 2.2.5 (minor ebuild fix)
author | holger |
---|---|
date | Mon, 05 Oct 2009 18:59:50 +0200 |
parents | 7ce3014adf4b |
children |
rev | line source |
---|---|
148 | 1 # Copyright 1999-2009 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.7.ebuild,v 1.2 2009/05/03 11:53:53 armin76 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 ~s390 ~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 | |
59 # to avoid collision - it only should be installed by server | |
60 rm "${S}/src/backend/nls.mk" | |
61 | |
62 # because psql/help.c includes the file | |
63 ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" | |
64 | |
65 eautoconf | |
66 } | |
67 | |
68 src_compile() { | |
69 econf --prefix=/usr/$(get_libdir)/postgresql-${SLOT} \ | |
70 --datadir=/usr/share/postgresql-${SLOT} \ | |
160
7ce3014adf4b
sync postgres ebuilds with Gentoo bug#276125, fixes misc. bugs
holger
parents:
159
diff
changeset
|
71 --docdir=/usr/share/doc/postgresql-${SLOT} \ |
148 | 72 --sysconfdir=/etc/postgresql-${SLOT} \ |
73 --includedir=/usr/include/postgresql-${SLOT} \ | |
74 --mandir=/usr/share/postgresql-${SLOT}/man \ | |
75 --enable-depend \ | |
76 --without-tcl \ | |
77 --without-perl \ | |
78 --without-python \ | |
79 $(use_with readline) \ | |
80 $(use_with kerberos krb5) \ | |
81 $(use_with kerberos gssapi) \ | |
82 "$(use_enable nls nls "$(wanted_languages)")" \ | |
83 $(use_with pam) \ | |
84 $(use_enable pg-intdatetime integer-datetimes ) \ | |
85 $(use_with ssl openssl) \ | |
86 $(use_enable threads thread-safety) \ | |
87 $(use_enable threads thread-safety-force) \ | |
88 $(use_with zlib) \ | |
89 $(use_with ldap) \ | |
90 ${myconf} \ | |
91 || die "configure failed" | |
92 | |
93 emake LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "emake failed" | |
94 | |
95 cd "${S}/contrib" | |
96 emake LD="$(tc-getLD) $(get_abi_LDFLAGS)" || die "emake failed" | |
97 } | |
98 | |
99 src_install() { | |
100 emake DESTDIR="${D}" install || die "emake install failed" | |
101 insinto /usr/include/postgresql-${SLOT}/postmaster | |
102 doins "${S}"/src/include/postmaster/*.h | |
103 dodir /usr/share/postgresql-${SLOT}/man/man1 | |
104 tar -zxf "${S}/doc/man.tar.gz" -C "${D}"/usr/share/postgresql-${SLOT}/man man1/{ecpg,pg_config}.1 | |
105 | |
160
7ce3014adf4b
sync postgres ebuilds with Gentoo bug#276125, fixes misc. bugs
holger
parents:
159
diff
changeset
|
106 rm -r "${D}/usr/share/doc/postgresql-${SLOT}/html" |
148 | 107 rm "${D}/usr/share/postgresql-${SLOT}/man/man1"/{initdb,ipcclean,pg_controldata,pg_ctl,pg_resetxlog,pg_restore,postgres,postmaster}.1 |
108 dodoc README HISTORY doc/{README.*,TODO,bug.template} | |
109 | |
110 cd "${S}/contrib" | |
111 emake DESTDIR="${D}" install || die "emake install failed" | |
112 cd "${S}" | |
113 | |
114 dodir /etc/eselect/postgresql/slots/${SLOT} | |
115 | |
116 IDIR="/usr/include/postgresql-${SLOT}" | |
117 cat > "${D}/etc/eselect/postgresql/slots/${SLOT}/base" <<-__EOF__ | |
118 postgres_ebuilds="\${postgres_ebuilds} ${PF}" | |
119 postgres_prefix=/usr/$(get_libdir)/postgresql-${SLOT} | |
120 postgres_datadir=/usr/share/postgresql-${SLOT} | |
121 postgres_bindir=/usr/$(get_libdir)/postgresql-${SLOT}/bin | |
122 postgres_symlinks=( | |
123 ${IDIR} /usr/include/postgresql | |
124 ${IDIR}/libpq-fe.h /usr/include/libpq-fe.h | |
125 ${IDIR}/libpq /usr/include/libpq | |
126 ${IDIR}/postgres_ext.h /usr/include/postgres_ext.h | |
127 ) | |
128 __EOF__ | |
129 | |
130 cat >"${T}/50postgresql-94-${SLOT}" <<-__EOF__ | |
131 LDPATH=/usr/$(get_libdir)/postgresql-${SLOT}/$(get_libdir) | |
132 MANPATH=/usr/share/postgresql-${SLOT}/man | |
133 __EOF__ | |
134 doenvd "${T}/50postgresql-94-${SLOT}" | |
135 | |
136 keepdir /etc/postgresql-${SLOT} | |
137 } | |
138 | |
139 pkg_postinst() { | |
140 eselect postgresql update | |
141 [[ "$(eselect postgresql show)" = "(none)" ]] && eselect postgresql set ${SLOT} | |
142 elog "If you need a global psqlrc-file, you can place it in '${ROOT}/etc/postgresql-${SLOT}/'." | |
143 } | |
144 | |
145 pkg_postrm() { | |
146 eselect postgresql update | |
147 } |