/[gentoo-x86]/dev-db/postgresql-base/postgresql-base-8.4.11.ebuild
Gentoo

Contents of /dev-db/postgresql-base/postgresql-base-8.4.11.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Tue Sep 25 16:11:35 2012 UTC (22 months ago) by titanofold
Branch: MAIN
CVS Tags: HEAD
Changes since 1.9: +1 -1 lines
FILE REMOVED
Cleaning out insecure versions.

(Portage version: 2.1.11.9/cvs/Linux x86_64)

1 # Copyright 1999-2012 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.4.11.ebuild,v 1.9 2012/04/08 14:48:23 armin76 Exp $
4
5 EAPI="4"
6
7 WANT_AUTOMAKE="none"
8
9 inherit autotools eutils multilib prefix versionator
10
11 SLOT="$(get_version_component_range 1-2)"
12
13 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
14
15 DESCRIPTION="PostgreSQL libraries and clients"
16 HOMEPAGE="http://www.postgresql.org/"
17 SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2
18 http://dev.gentoo.org/~titanofold/postgresql-patches-8.4-r2.tbz2"
19 LICENSE="POSTGRESQL"
20
21 S="${WORKDIR}/postgresql-${PV}"
22
23 # No tests to be done for clients and libraries
24 RESTRICT="test"
25
26 LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr zh_CN zh_TW"
27 IUSE="doc kerberos ldap nls pam pg_legacytimestamp readline ssl threads zlib"
28
29 for lingua in ${LINGUAS} ; do
30 IUSE+=" linguas_${lingua}"
31 done
32
33 wanted_languages() {
34 local enable_langs
35
36 for lingua in ${LINGUAS} ; do
37 use linguas_${lingua} && enable_langs+="${lingua} "
38 done
39
40 echo -n ${enable_langs}
41 }
42
43 RDEPEND=">=app-admin/eselect-postgresql-1.0.7
44 virtual/libintl
45 !!dev-db/libpq
46 !!dev-db/postgresql
47 !!dev-db/postgresql-client
48 !!dev-db/postgresql-libs
49 kerberos? ( virtual/krb5 )
50 ldap? ( net-nds/openldap )
51 pam? ( virtual/pam )
52 readline? ( >=sys-libs/readline-4.1 )
53 ssl? ( >=dev-libs/openssl-0.9.6-r1 )
54 zlib? ( >=sys-libs/zlib-1.1.3 )"
55
56 DEPEND="${RDEPEND}
57 !!<sys-apps/sandbox-2.0
58 >=sys-devel/bison-1.875
59 sys-devel/flex
60 nls? ( sys-devel/gettext )"
61
62 PDEPEND="doc? ( ~dev-db/postgresql-docs-${PV} )"
63
64 # Support /var/run or /run for the socket directory
65 [[ ! -d /run ]] && RUNDIR=/var
66
67 src_prepare() {
68 epatch "${WORKDIR}/autoconf.patch" "${WORKDIR}/base.patch" \
69 "${WORKDIR}/bool.patch" "${WORKDIR}/darwin.patch" \
70 "${WORKDIR}/SuperH.patch"
71
72 eprefixify src/include/pg_config_manual.h
73
74 # to avoid collision - it only should be installed by server
75 rm "${S}/src/backend/nls.mk"
76
77 # because psql/help.c includes the file
78 ln -s "${S}/src/include/libpq/pqsignal.h" "${S}/src/bin/psql/" || die
79
80 sed -e "s|@RUNDIR@|${RUNDIR}|g" \
81 -i src/include/pg_config_manual.h || \
82 die "RUNDIR sed failed"
83
84 eautoconf
85 }
86
87 src_configure() {
88 export LDFLAGS_SL="${LDFLAGS}"
89 local PO="${EPREFIX%/}"
90 econf --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \
91 --datadir="${PO}/usr/share/postgresql-${SLOT}" \
92 --docdir="${PO}/usr/share/doc/postgresql-${SLOT}" \
93 --includedir="${PO}/usr/include/postgresql-${SLOT}" \
94 --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \
95 --sysconfdir="${PO}/etc/postgresql-${SLOT}" \
96 --without-tcl \
97 --without-perl \
98 --without-python \
99 $(use_with kerberos krb5) \
100 $(use_with kerberos gssapi) \
101 $(use_with ldap) \
102 "$(use_enable nls nls "$(wanted_languages)")" \
103 $(use_with pam) \
104 $(use_enable !pg_legacytimestamp integer-datetimes ) \
105 $(use_with readline) \
106 $(use_with ssl openssl) \
107 $(use_enable threads thread-safety) \
108 $(use_with zlib)
109 }
110
111 src_compile() {
112 emake
113
114 cd "${S}/contrib"
115 emake
116 }
117
118 src_install() {
119 emake DESTDIR="${D}" install
120 insinto /usr/include/postgresql-${SLOT}/postmaster
121 doins "${S}"/src/include/postmaster/*.h
122
123 rm -r "${ED}/usr/share/doc/postgresql-${SLOT}/html"
124 rm "${ED}"/usr/share/postgresql-${SLOT}/man/man1/{initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}.1
125 docompress /usr/share/postgresql-${SLOT}/man/man{1,7}
126
127 dodoc README HISTORY doc/{README.*,TODO,bug.template}
128
129 cd "${S}/contrib"
130 emake DESTDIR="${D}" install
131 cd "${S}"
132
133 dodir /etc/eselect/postgresql/slots/${SLOT}
134
135 echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" \
136 > "${ED}/etc/eselect/postgresql/slots/${SLOT}/base"
137
138 keepdir /etc/postgresql-${SLOT}
139 }
140
141 pkg_postinst() {
142 postgresql-config update
143
144 elog "If you need a global psqlrc-file, you can place it in:"
145 elog " ${EROOT%/}/etc/postgresql-${SLOT}/"
146 }
147
148 pkg_postrm() {
149 postgresql-config update
150 }

  ViewVC Help
Powered by ViewVC 1.1.20