summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/postgresql
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-oe/recipes-support/postgresql
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-support/postgresql')
-rw-r--r--meta-oe/recipes-support/postgresql/files/no-ecpg-test.patch12
-rw-r--r--meta-oe/recipes-support/postgresql/files/postgresql-bashprofile4
-rw-r--r--meta-oe/recipes-support/postgresql/files/postgresql.init241
-rw-r--r--meta-oe/recipes-support/postgresql/files/postgresql.pam4
-rw-r--r--meta-oe/recipes-support/postgresql/postgresql-9.2.4/ecpg-parallel-make-fix.patch31
-rw-r--r--meta-oe/recipes-support/postgresql/postgresql-9.2.4/remove.autoconf.version.check.patch15
-rw-r--r--meta-oe/recipes-support/postgresql/postgresql.inc365
-rw-r--r--meta-oe/recipes-support/postgresql/postgresql_9.2.4.bb13
8 files changed, 685 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/postgresql/files/no-ecpg-test.patch b/meta-oe/recipes-support/postgresql/files/no-ecpg-test.patch
new file mode 100644
index 0000000000..c0f28f4258
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/files/no-ecpg-test.patch
@@ -0,0 +1,12 @@
1diff --git a/src/interfaces/ecpg/Makefile b/src/interfaces/ecpg/Makefile
2index dcd578f..1428423 100644
3--- a/src/interfaces/ecpg/Makefile
4+++ b/src/interfaces/ecpg/Makefile
5@@ -8,7 +8,6 @@ all install installdirs uninstall dep depend distprep:
6 $(MAKE) -C ecpglib $@
7 $(MAKE) -C compatlib $@
8 $(MAKE) -C preproc $@
9- $(MAKE) -C test $@
10
11 clean distclean maintainer-clean:
12 -$(MAKE) -C include $@
diff --git a/meta-oe/recipes-support/postgresql/files/postgresql-bashprofile b/meta-oe/recipes-support/postgresql/files/postgresql-bashprofile
new file mode 100644
index 0000000000..1c931f37fd
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/files/postgresql-bashprofile
@@ -0,0 +1,4 @@
1[ -f /etc/profile ] && source /etc/profile
2
3PGDATA=/var/lib/postgresql/data
4export PGDATA
diff --git a/meta-oe/recipes-support/postgresql/files/postgresql.init b/meta-oe/recipes-support/postgresql/files/postgresql.init
new file mode 100644
index 0000000000..ab46477606
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/files/postgresql.init
@@ -0,0 +1,241 @@
1#!/bin/sh
2#
3# postgresql This is the init script for starting up the PostgreSQL
4# server.
5#
6# chkconfig: - 64 36
7# description: PostgreSQL database server.
8# processname: postmaster
9# pidfile: /var/run/postmaster.PORT.pid
10
11# This script is slightly unusual in that the name of the daemon (postmaster)
12# is not the same as the name of the subsystem (postgresql)
13
14# PGVERSION is the full package version, e.g., 8.4.0
15# Note: the specfile inserts the correct value during package build
16PGVERSION=9.2.4
17# PGMAJORVERSION is major version, e.g., 8.4 (this should match PG_VERSION)
18PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'`
19
20# Source function library.
21. /etc/init.d/functions
22
23# Find the name of the script
24NAME=`basename $0`
25if [ ${NAME:0:1} = "S" -o ${NAME:0:1} = "K" ]
26then
27 NAME=${NAME:3}
28fi
29
30# For SELinux we need to use 'runuser' not 'su'
31if [ -x /sbin/runuser ]
32then
33 SU=runuser
34else
35 SU=su
36fi
37
38
39# Set defaults for configuration variables
40PGENGINE=/usr/bin
41PGPORT=5432
42PGDATA=/var/lib/postgresql/data
43PGLOG=/var/lib/postgresql/pgstartup.log
44# Value to set as postmaster process's oom_adj
45PG_OOM_ADJ=-17
46
47# Override defaults from /etc/sysconfig/postgresql if file is present
48[ -f /etc/default/postgresql/${NAME} ] && . /etc/default/postgresql/${NAME}
49
50export PGDATA
51export PGPORT
52
53lockfile="/var/lock/subsys/${NAME}"
54pidfile="/var/run/postmaster.${PGPORT}.pid"
55
56script_result=0
57
58start(){
59 [ -x "$PGENGINE/postmaster" ] || exit 5
60
61 PSQL_START=$"Starting ${NAME} service: "
62
63 # Make sure startup-time log file is valid
64 if [ ! -e "$PGLOG" -a ! -h "$PGLOG" ]
65 then
66 touch "$PGLOG" || exit 4
67 chown postgres:postgres "$PGLOG"
68 chmod go-rwx "$PGLOG"
69 [ -x /sbin/restorecon ] && /sbin/restorecon "$PGLOG"
70 fi
71
72 # Check for the PGDATA structure
73 if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base" ]
74 then
75 # Check version of existing PGDATA
76 if [ x`cat "$PGDATA/PG_VERSION"` != x"$PGMAJORVERSION" ]
77 then
78 SYSDOCDIR="(Your System's documentation directory)"
79 if [ -d "/usr/doc/postgresql-$PGVERSION" ]
80 then
81 SYSDOCDIR=/usr/doc
82 fi
83 if [ -d "/usr/share/doc/postgresql-$PGVERSION" ]
84 then
85 SYSDOCDIR=/usr/share/doc
86 fi
87 if [ -d "/usr/doc/packages/postgresql-$PGVERSION" ]
88 then
89 SYSDOCDIR=/usr/doc/packages
90 fi
91 if [ -d "/usr/share/doc/packages/postgresql-$PGVERSION" ]
92 then
93 SYSDOCDIR=/usr/share/doc/packages
94 fi
95 echo
96 echo $"An old version of the database format was found."
97 echo $"You need to upgrade the data format before using PostgreSQL."
98 echo $"See $SYSDOCDIR/postgresql-$PGVERSION/README.rpm-dist for more information."
99 exit 1
100 fi
101 else
102 # No existing PGDATA! Warn the user to initdb it.
103 echo
104 echo "$PGDATA is missing. Use \"service postgresql initdb\" to initialize the cluster first."
105 echo -n " [FAILED] "
106 echo
107 exit 1
108 fi
109
110 echo -n "$PSQL_START"
111 test x"$PG_OOM_ADJ" != x && echo "$PG_OOM_ADJ" > /proc/self/oom_score_adj
112 $SU -l postgres -c "$PGENGINE/postmaster -p '$PGPORT' -D '$PGDATA' ${PGOPTS} &" >> "$PGLOG" 2>&1 < /dev/null
113 sleep 2
114 pid=`head -n 1 "$PGDATA/postmaster.pid" 2>/dev/null`
115 if [ "x$pid" != x ]
116 then
117 echo -n " [ OK ]"
118 touch "$lockfile"
119 echo $pid > "$pidfile"
120 echo
121 else
122 echo -n " [FAILED]"
123 echo
124 script_result=1
125 fi
126}
127
128stop(){
129 echo -n $"Stopping ${NAME} service: "
130 if [ -e "$lockfile" ]
131 then
132 $SU -l postgres -c "$PGENGINE/pg_ctl stop -D '$PGDATA' -s -m fast" > /dev/null 2>&1 < /dev/null
133 ret=$?
134 if [ $ret -eq 0 ]
135 then
136 echo -n " [ OK ] "
137 rm -f "$pidfile"
138 rm -f "$lockfile"
139 else
140 echo -n " [FAILED] "
141 script_result=1
142 fi
143 else
144 # not running; per LSB standards this is "ok"
145 echo -n " [ OK ] "
146 fi
147 echo
148}
149
150restart(){
151 stop
152 start
153}
154
155condrestart(){
156 [ -e "$lockfile" ] && restart || :
157}
158
159reload(){
160 $SU -l postgres -c "$PGENGINE/pg_ctl reload -D '$PGDATA' -s" > /dev/null 2>&1 < /dev/null
161}
162
163initdb(){
164 if [ -f "$PGDATA/PG_VERSION" ]
165 then
166 echo -n "Data directory is not empty!"
167 echo -n " [FAILED] "
168 echo
169 script_result=1
170 else
171 echo -n $"Initializing database: "
172 if [ ! -e "$PGDATA" -a ! -h "$PGDATA" ]
173 then
174 mkdir -p "$PGDATA" || exit 1
175 chown postgres:postgres "$PGDATA"
176 chmod go-rwx "$PGDATA"
177 fi
178 # Clean up SELinux tagging for PGDATA
179 [ -x /sbin/restorecon ] && /sbin/restorecon "$PGDATA"
180
181 # Make sure the startup-time log file is OK, too
182 if [ ! -e "$PGLOG" -a ! -h "$PGLOG" ]
183 then
184 touch "$PGLOG" || exit 1
185 chown postgres:postgres "$PGLOG"
186 chmod go-rwx "$PGLOG"
187 [ -x /sbin/restorecon ] && /sbin/restorecon "$PGLOG"
188 fi
189
190 # Initialize the database
191 $SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident'" >> "$PGLOG" 2>&1 < /dev/null
192
193 # Create directory for postmaster log
194 mkdir "$PGDATA/pg_log"
195 chown postgres:postgres "$PGDATA/pg_log"
196 chmod go-rwx "$PGDATA/pg_log"
197
198 if [ -f "$PGDATA/PG_VERSION" ]
199 then
200 echo -n " [ OK ] "
201 else
202 echo -n " [FAILED] "
203 script_result=1
204 fi
205 echo
206 fi
207}
208
209# See how we were called.
210case "$1" in
211 start)
212 start
213 ;;
214 stop)
215 stop
216 ;;
217 status)
218 status postmaster
219 script_result=$?
220 ;;
221 restart)
222 restart
223 ;;
224 condrestart|try-restart)
225 condrestart
226 ;;
227 reload)
228 reload
229 ;;
230 force-reload)
231 restart
232 ;;
233 initdb)
234 initdb
235 ;;
236 *)
237 echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|initdb}"
238 exit 2
239esac
240
241exit $script_result
diff --git a/meta-oe/recipes-support/postgresql/files/postgresql.pam b/meta-oe/recipes-support/postgresql/files/postgresql.pam
new file mode 100644
index 0000000000..0b6fdc5f26
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/files/postgresql.pam
@@ -0,0 +1,4 @@
1#%PAM-1.0
2auth include common-auth
3account include common-account
4password include common-password
diff --git a/meta-oe/recipes-support/postgresql/postgresql-9.2.4/ecpg-parallel-make-fix.patch b/meta-oe/recipes-support/postgresql/postgresql-9.2.4/ecpg-parallel-make-fix.patch
new file mode 100644
index 0000000000..63615cd517
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/postgresql-9.2.4/ecpg-parallel-make-fix.patch
@@ -0,0 +1,31 @@
1Upstream-status: backport
2
3From 602070f9cce790debd8d1469254e7726ab499ae7 Mon Sep 17 00:00:00 2001
4From: Peter Eisentraut <peter_e@gmx.net>
5Date: Fri, 29 Mar 2013 21:39:55 -0400
6Subject: [PATCH] ecpg: Parallel make fix
7
8In some parallel make situations, the install-headers target could be
9called before the installation directories are created by installdirs,
10causing the installation to fail. Fix that by making install-headers
11depend on installdirs.
12---
13 src/interfaces/ecpg/include/Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/interfaces/ecpg/include/Makefile b/src/interfaces/ecpg/include/Makefile
17index eab833b..e92e56f 100644
18--- a/src/interfaces/ecpg/include/Makefile
19+++ b/src/interfaces/ecpg/include/Makefile
20@@ -18,7 +18,7 @@ ecpg_headers = ecpgerrno.h ecpglib.h ecpgtype.h sqlca.h sql3types.h ecpg_informi
21 sqlda.h sqlda-compat.h sqlda-native.h
22 informix_headers = datetime.h decimal.h sqltypes.h
23
24-install-headers: $(ecpg_headers) $(informix_headers)
25+install-headers: $(ecpg_headers) $(informix_headers) installdirs
26 $(INSTALL_DATA) $(addprefix $(srcdir)/,$(ecpg_headers)) '$(DESTDIR)$(includedir)/'
27 $(INSTALL_DATA) $(addprefix $(srcdir)/,$(informix_headers)) '$(DESTDIR)$(informix_esql_dir)/'
28 $(INSTALL_DATA) $(ecpg_config_h) '$(DESTDIR)$(includedir)'
29--
301.8.3.4
31
diff --git a/meta-oe/recipes-support/postgresql/postgresql-9.2.4/remove.autoconf.version.check.patch b/meta-oe/recipes-support/postgresql/postgresql-9.2.4/remove.autoconf.version.check.patch
new file mode 100644
index 0000000000..022aa3d760
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/postgresql-9.2.4/remove.autoconf.version.check.patch
@@ -0,0 +1,15 @@
1Index: postgresql-9.2.4/configure.in
2===================================================================
3--- postgresql-9.2.4.orig/configure.in
4+++ postgresql-9.2.4/configure.in
5@@ -19,10 +19,6 @@ m4_pattern_forbid(^PGAC_)dnl to catch un
6
7 AC_INIT([PostgreSQL], [9.2.4], [pgsql-bugs@postgresql.org])
8
9-m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.63], [], [m4_fatal([Autoconf version 2.63 is required.
10-Untested combinations of 'autoconf' and PostgreSQL versions are not
11-recommended. You can remove the check from 'configure.in' but it is then
12-your responsibility whether the result works or not.])])
13 AC_COPYRIGHT([Copyright (c) 1996-2012, PostgreSQL Global Development Group])
14 AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
15 AC_CONFIG_AUX_DIR(config)
diff --git a/meta-oe/recipes-support/postgresql/postgresql.inc b/meta-oe/recipes-support/postgresql/postgresql.inc
new file mode 100644
index 0000000000..e1374fb75f
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/postgresql.inc
@@ -0,0 +1,365 @@
1SUMMARY = "PostgreSQL is a powerful, open source relational database system."
2DESCRIPTION = "\
3 PostgreSQL is an advanced Object-Relational database management system \
4 (DBMS) that supports almost all SQL constructs (including \
5 transactions, subselects and user-defined types and functions). The \
6 postgresql package includes the client programs and libraries that \
7 you'll need to access a PostgreSQL DBMS server. These PostgreSQL \
8 client programs are programs that directly manipulate the internal \
9 structure of PostgreSQL databases on a PostgreSQL server. These client \
10 programs can be located on the same machine with the PostgreSQL \
11 server, or may be on a remote machine which accesses a PostgreSQL \
12 server over a network connection. This package contains the docs \
13 in HTML for the whole package, as well as command-line utilities for \
14 managing PostgreSQL databases on a PostgreSQL server. \
15 \
16 If you want to manipulate a PostgreSQL database on a local or remote \
17 PostgreSQL server, you need this package. You also need to install \
18 this package if you're installing the postgresql-server package. \
19 "
20HOMEPAGE = "http://www.postgresql.com"
21LICENSE = "BSD"
22DEPENDS = "zlib readline tzcode-native"
23INC_PR = "r0"
24
25ARM_INSTRUCTION_SET = "arm"
26
27SRC_URI = "http://ftp.postgresql.org/pub/source/v${PV}/${P}.tar.bz2 \
28 file://postgresql.init \
29 file://postgresql-bashprofile \
30 file://postgresql.pam \
31"
32
33LEAD_SONAME = "libpq.so"
34
35# LDFLAGS for shared libraries
36export LDFLAGS_SL = "${LDFLAGS}"
37
38inherit autotools pkgconfig perlnative pythonnative useradd update-rc.d
39
40enable_pam = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
41PACKAGECONFIG ??= "${enable_pam} openssl python uuid libxml tcl nls libxml perl"
42PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
43PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl,"
44PACKAGECONFIG[python] = "--with-python,--wsithout-python,python,python"
45PACKAGECONFIG[uuid] = "--with-ossp-uuid,--without-ossp-uuid,ossp-uuid,"
46# when tcl native package is fixed change WORKDIR to STAGING_BINDIR_CROSS
47PACKAGECONFIG[tcl] = \
48 "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl,"
49PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,,"
50PACKAGECONFIG[libxml] = "--with-libxml,--without-libxml,libxml2,libxml2"
51PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl"
52
53EXTRA_OECONF += "--enable-thread-safety --disable-rpath \
54 --datadir=${datadir}/${BPN} \
55 --sysconfdir=${sysconfdir}/${BPN} \
56 --without-krb5 \
57"
58EXTRA_OECONF_sh4 += "--disable-spinlocks"
59EXTRA_OECONF_aarch64 += "--disable-spinlocks"
60
61PACKAGES_DYNAMIC += "^${PN}-plperl ^${PN}-plperl-dbg \
62 ^${PN}-pltcl ^${PN}-pltcl-dbg \
63 ^${PN}-plpython ^${PN}-plpython-dbg \
64"
65
66python populate_packages_prepend() {
67
68 def fill_more(name, dbg=True):
69 if name is None or name.strip() == "":
70 return
71
72 fpack=d.getVar('PACKAGES') or ""
73 fpack="${PN}-" + name + " " + fpack
74 if dbg:
75 fpack="${PN}-" + name + "-dbg" + " " + fpack
76 d.setVar('PACKAGES', fpack)
77
78 conf=(d.getVar('PACKAGECONFIG', True) or "").split()
79 pack=d.getVar('PACKAGES') or ""
80 bb.debug(1, "PACKAGECONFIG=%s" % conf)
81 bb.debug(1, "PACKAGES1=%s" % pack )
82
83 if "perl" in conf :
84 fill_more("plperl")
85
86 if "tcl" in conf:
87 fill_more("pltcl")
88
89 if "python" in conf:
90 fill_more("plpython")
91
92 pack=d.getVar('PACKAGES', True) or ""
93 bb.debug(1, "PACKAGES2=%s" % pack)
94
95}
96
97do_configure() {
98 # do_configure_prepend
99 # make sure configure finds python includdirs with these envs
100 export BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \
101 STAGING_INCDIR=${STAGING_INCDIR} \
102 STAGING_LIBDIR=${STAGING_LIBDIR}
103
104 # do_configure
105 autotools_do_configure
106
107 # do_configure_append
108 # workaround perl package related bugs
109 sed -i -e "s:-L/usr/local/lib:-L=/usr/local/lib:g" \
110 ${S}/src/Makefile.global
111 LIBPNA="\${STAGING_LIBDIR_NATIVE}/perl-native"
112 LIBNA="\${STAGING_LIBDIR_NATIVE}"
113 BLIBNA="\${STAGING_BASE_LIBDIR_NATIVE}"
114 sed -i -e "/^perl_archlibexp/s:${LIBPNA}:${STAGING_LIBDIR}:g" \
115 ${S}/src/Makefile.global
116 sed -i -e "/^perl_privlibexp/s:${LIBPNA}:${STAGING_LIBDIR}:g" \
117 ${S}/src/Makefile.global
118 # remove the rpath, replace with correct lib path
119 sed -i \
120 -e "/^perl_embed_ldflags/s:-Wl,-rpath,${LIBNA}::g" \
121 -e "/^perl_embed_ldflags/s:-Wl,-rpath,${BLIBNA}::g" \
122 -e "/^perl_embed_ldflags/s:-Wl,-rpath-link,${LIBNA}::g" \
123 -e "/^perl_embed_ldflags/s:-Wl,-rpath-link,${BLIBNA}::g" \
124 -e "/^perl_embed_ldflags/s:${LIBPNA}:${STAGING_LIBDIR}:g" \
125 -e "/^perl_embed_ldflags/s:${LIBNA}:${STAGING_LIBDIR}:g" \
126 -e "/^perl_embed_ldflags/s:${BLIBNA}:${STAGING_BASELIBDIR}:g" \
127 ${S}/src/Makefile.global
128
129 # workaround perl package's libperl.so problem
130 # we are using perlnative so this perl should have same version
131 perl_version=`perl -v 2>/dev/null | \
132 sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
133 if [ ! -h "${STAGING_LIBDIR}/perl/$perl_version/CORE/libperl.so" -a \
134 ! -h "${STAGING_LIBDIR}/libperl.so" ]; then
135 ln -sf ../../../libperl.so.5 \
136 ${STAGING_LIBDIR}/perl/$perl_version/CORE/libperl.so
137 fi
138}
139
140do_compile_append() {
141 oe_runmake -C contrib all
142}
143
144# server needs to configure user and group
145usernum = "28"
146groupnum = "28"
147USERADD_PACKAGES = "${PN}"
148USERADD_PARAM_${PN} = "-M -g postgres -o -r -d ${localstatedir}/lib/${BPN} \
149 -s /bin/bash -c 'PostgreSQL Server' -u ${usernum} postgres"
150GROUPADD_PARAM_${PN} = "-g ${groupnum} -o -r postgres"
151
152INITSCRIPT_PACKAGES = "${PN}"
153INITSCRIPT_NAME = "${BPN}-server"
154INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ."
155
156do_install_append() {
157 # install contrib
158 oe_runmake DESTDIR=${D} -C contrib install
159 # install tutorial
160 install -d -m 0755 ${D}${libdir}/${BPN}/tutorial
161 install ${S}/src/tutorial/* ${D}${libdir}/${BPN}/tutorial
162
163 # install COPYRIGHT README HISTORY
164 install -d -m 0755 ${D}${docdir}/${BPN}
165 for i in ${S}/{COPYRIGHT,README,HISTORY} ${S}/doc/{KNOWN_BUGS,MISSING_FEATURES,README*,bug.template}; do
166 [ -f $i ] && install $i ${D}${docdir}/${BPN}
167 done
168
169 # install dirs and server init
170 install -d ${D}${sysconfdir}/init.d
171 install -m 0755 ${WORKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server
172 sed -i -e "s/^PGVERSION=.*$/PGVERSION=${PV}/g" ${D}${sysconfdir}/init.d/${BPN}-server
173 install -d -m 700 ${D}${localstatedir}/lib/${BPN}/data
174 install -d -m 700 ${D}${localstatedir}/lib/${BPN}/backups
175 install -m 644 ${WORKDIR}/${BPN}-bashprofile ${D}${localstatedir}/lib/${BPN}/.bash_profile
176 chown -R postgres:postgres ${D}${localstatedir}/lib/${BPN}
177 # multiple server config directory
178 install -d -m 700 ${D}${sysconfdir}/default/${BPN}
179
180 if [ "${@d.getVar('enable_pam', True)}" = "pam" ]; then
181 install -d ${D}${sysconfdir}/pam.d
182 install -m 644 ${WORKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql
183 fi
184}
185
186SSTATE_SCAN_FILES += "Makefile.global"
187
188PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \
189 libecpg-compat-dbg libecpg-compat libecpg-compat-dev \
190 libecpg-dbg libecpg libecpg-dev libecpg-staticdev libecpg-doc \
191 libpq-dbg libpq libpq-dev libpq-staticdev \
192 libpgtypes-dbg libpgtypes libpgtypes-staticdev libpgtypes-dev \
193 ${PN}-contrib ${PN}-contrib-dbg \
194"
195
196FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \
197 ${localstatedir}/lib/${BPN}/data ${localstatedir}/lib/${BPN}/backups \
198 ${localstatedir}/lib/${BPN}/.bash_profile ${sysconfdir}/default/${BPN} \
199 ${libdir}/${BPN}/dict_snowball.so ${libdir}/${BPN}/plpgsql.so \
200 ${libdir}/${BPN}/euc2004_sjis2004.so \
201 ${libdir}/${BPN}/libpqwalreceiver.so \
202 ${libdir}/${BPN}/*_and_*.so \
203 ${@'${sysconfdir}/pam.d/postgresql' \
204 if 'pam' == d.getVar('enable_pam', True) \
205 else ''} \
206"
207
208FILES_${PN}-dbg += " ${libdir}/${BPN}/.debug/dict_snowball.so \
209 ${libdir}/${BPN}/.debug/plpgsql.so \
210 ${libdir}/${BPN}/.debug/euc2004_sjis2004.so \
211 ${libdir}/${BPN}/.debug/libpqwalreceiver.so \
212 ${libdir}/${BPN}/.debug/*_and_*.so \
213"
214
215FILES_${PN}-client = "${bindir}/clusterdb \
216 ${bindir}/createdb \
217 ${bindir}/createlang \
218 ${bindir}/createuser \
219 ${bindir}/dropdb \
220 ${bindir}/droplang \
221 ${bindir}/dropuser \
222 ${bindir}/pg_dump \
223 ${bindir}/pg_dumpall \
224 ${bindir}/pg_restore \
225 ${bindir}/psql \
226 ${bindir}/reindexdb \
227 ${bindir}/vacuumdb \
228 ${bindir}/vacuumlo \
229 ${datadir}/${BPN}/psqlrc.sample"
230
231FILES_${PN}-client-doc = "${mandir}/man1/clusterdb.* \
232 ${mandir}/man1/createdb.* ${mandir}/man1/createlang.* \
233 ${mandir}/man1/createuser.* ${mandir}/man1/dropdb.* \
234 ${mandir}/man1/droplang.* ${mandir}/man1/dropuser.* \
235 ${mandir}/man1/pg_dump.* ${mandir}/man1/pg_dumpall.* \
236 ${mandir}/man1/pg_restore.* ${mandir}/man1/psql.* \
237 ${mandir}/man1/reindexdb.* ${mandir}/man1/vacuumdb.* \
238 ${mandir}/man7/* \
239"
240
241FILES_${PN}-doc += "${docdir}/${BPN}/html ${libdir}/${BPN}/tutorial/ \
242 ${mandir}/man1/initdb.* ${mandir}/man1/pg_controldata.* \
243 ${mandir}/man1/pg_ctl.* ${mandir}/man1/pg_resetxlog.* \
244 ${mandir}/man1/postgres.* ${mandir}/man1/postmaster.* \
245"
246
247FILES_${PN}-timezone = "${datadir}/${BPN}/timezone \
248 ${datadir}/${BPN}/timezonesets \
249"
250RDEPENDS_${PN} += "${PN}-timezone"
251FILES_${PN}-server-dev = "${includedir}/${BPN}/server"
252
253FILES_libecpg = "${libdir}/libecpg*${SOLIBS}"
254FILES_libecpg-dbg = "${libdir}/.debug/libecpg*"
255FILES_libecpg-dev = "${libdir}/libecpg*${SOLIBSDEV} \
256 ${libdir}/libpgtypes*${SOLIBSDEV} \
257 ${includedir}/ecpg*.h ${includedir}/${BPN}/ecpg*.h \
258 ${includedir}/pgtypes*.h ${includedir}/${BPN}/informix \
259 ${includedir}/sql3types.h ${includedir}/sqlca.h"
260FILES_libecpg-doc = "${mandir}/man1/ecpg.*"
261FILES_libecpg-staticdev = "${libdir}/libecpg*.a"
262SECTION_libecpg-staticdev = "devel"
263RDEPENDS_libecpg-staticdev = "libecpg-dev (= ${EXTENDPKGV})"
264
265FILES_libpq = "${libdir}/libpq*${SOLIBS}"
266FILES_libpq-dbg = "${libdir}/.debug/libpq* ${libdir}/${BPN}/pgxs/src/test/regress/.debug/*"
267FILES_libpq-dev = "${libdir}/libpq*${SOLIBSDEV} \
268 ${includedir}"
269FILES_libpq-staticdev = "${libdir}/libpq*.a ${libdir}/libpgport.a"
270SECTION_libpq-staticdev = "devel"
271RDEPENDS_libpq-staticdev = "libpq-dev (= ${EXTENDPKGV})"
272
273FILES_libecpg-compat = "${libdir}/libecpg_compat*${SOLIBS}"
274FILES_libecpg-compat-dbg = "${libdir}/.debug/libecpg_compat*"
275FILES_libecpg-compat-dev = "${libdir}/libecpg_compat*${SOLIBS}"
276FILES_libpgtypes = "${libdir}/libpgtypes*${SOLIBS}"
277FILES_libpgtypes-dbg = "${libdir}/.debug/libpgtypes*"
278FILES_libpgtypes-staticdev = "${libdir}/libpgtypes*.a"
279FILES_libpgtypes-dev = "${libdir}/libpgtypes*${SOLIBS} ${includedir}/pgtypes*.h"
280
281FILES_${PN}-contrib = " ${bindir}/oid2name ${bindir}/pg_standby \
282 ${bindir}/pgbench ${bindir}/vacuumlo \
283 ${S}/contrib/spi/*.example \
284 ${libdir}/${BPN}/_int.so ${libdir}/${BPN}/adminpack.so \
285 ${libdir}/${BPN}/autoinc.so ${libdir}/${BPN}/auto_explain.so \
286 ${libdir}/${BPN}/auth_delay.so ${libdir}/${BPN}/btree_gin.so \
287 ${libdir}/${BPN}/btree_gist.so ${libdir}/${BPN}/.so \
288 ${libdir}/${BPN}/chkpass.so ${libdir}/${BPN}/citext.so \
289 ${libdir}/${BPN}/cube.so ${libdir}/${BPN}/dblink.so \
290 ${libdir}/${BPN}/dict_int.so ${libdir}/${BPN}/dict_xsyn.so \
291 ${libdir}/${BPN}/dummy_seclabel.so ${libdir}/${BPN}/earthdistance.so \
292 ${libdir}/${BPN}/file_fdw.so ${libdir}/${BPN}/fuzzystrmatch.so \
293 ${libdir}/${BPN}/hstore.so ${libdir}/${BPN}/insert_username.so \
294 ${libdir}/${BPN}/isn.so ${libdir}/${BPN}/lo.so \
295 ${libdir}/${BPN}/ltree.so ${libdir}/${BPN}/moddatetime.so \
296 ${libdir}/${BPN}/pageinspect.so ${libdir}/${BPN}/pg_buffercache.so \
297 ${libdir}/${BPN}/pg_freespacemap.so ${libdir}/${BPN}/pg_trgm.so \
298 ${libdir}/${BPN}/pgcrypto.so ${libdir}/${BPN}/pgrowlocks.so \
299 ${libdir}/${BPN}/pgstattuple.so ${libdir}/${BPN}/pg_stat_statements.so \
300 ${libdir}/${BPN}/refint.so ${libdir}/${BPN}/seg.so \
301 ${libdir}/${BPN}/sslinfo.so \
302 ${libdir}/${BPN}/tablefunc.so \
303 ${libdir}/${BPN}/test_parser.so ${libdir}/${BPN}/timetravel.so \
304 ${libdir}/${BPN}/tsearch2.so ${libdir}/${BPN}/uuid-ossp.so \
305 ${libdir}/${BPN}/pgxml.so ${libdir}/${BPN}/passwordcheck.so \
306 ${libdir}/${BPN}/pg_upgrade_support.so ${libdir}/${BPN}/.so \
307 ${libdir}/${BPN}/unaccent.so \
308"
309FILES_${PN}-contrib-dbg = " \
310 ${libdir}/${BPN}/.debug/_int.so ${libdir}/${BPN}/.debug/adminpack.so \
311 ${libdir}/${BPN}/.debug/autoinc.so ${libdir}/${BPN}/.debug/auto_explain.so \
312 ${libdir}/${BPN}/.debug/auth_delay.so ${libdir}/${BPN}/.debug/btree_gin.so \
313 ${libdir}/${BPN}/.debug/btree_gist.so ${libdir}/${BPN}/.debug/.so \
314 ${libdir}/${BPN}/.debug/chkpass.so ${libdir}/${BPN}/.debug/citext.so \
315 ${libdir}/${BPN}/.debug/cube.so ${libdir}/${BPN}/.debug/dblink.so \
316 ${libdir}/${BPN}/.debug/dict_int.so ${libdir}/${BPN}/.debug/dict_xsyn.so \
317 ${libdir}/${BPN}/.debug/dummy_seclabel.so \
318 ${libdir}/${BPN}/.debug/earthdistance.so \
319 ${libdir}/${BPN}/.debug/file_fdw.so ${libdir}/${BPN}/.debug/fuzzystrmatch.so \
320 ${libdir}/${BPN}/.debug/hstore.so ${libdir}/${BPN}/.debug/insert_username.so \
321 ${libdir}/${BPN}/.debug/isn.so ${libdir}/${BPN}/.debug/lo.so \
322 ${libdir}/${BPN}/.debug/ltree.so ${libdir}/${BPN}/.debug/moddatetime.so \
323 ${libdir}/${BPN}/.debug/pageinspect.so \
324 ${libdir}/${BPN}/.debug/pg_buffercache.so \
325 ${libdir}/${BPN}/.debug/pg_freespacemap.so \
326 ${libdir}/${BPN}/.debug/pg_trgm.so \
327 ${libdir}/${BPN}/.debug/pgcrypto.so ${libdir}/${BPN}/.debug/pgrowlocks.so \
328 ${libdir}/${BPN}/.debug/pgstattuple.so \
329 ${libdir}/${BPN}/.debug/pg_stat_statements.so \
330 ${libdir}/${BPN}/.debug/refint.so ${libdir}/${BPN}/.debug/seg.so \
331 ${libdir}/${BPN}/.debug/sslinfo.so \
332 ${libdir}/${BPN}/.debug/tablefunc.so \
333 ${libdir}/${BPN}/.debug/test_parser.so ${libdir}/${BPN}/.debug/timetravel.so \
334 ${libdir}/${BPN}/.debug/tsearch2.so ${libdir}/${BPN}/.debug/uuid-ossp.so \
335 ${libdir}/${BPN}/.debug/pgxml.so ${libdir}/${BPN}/.debug/passwordcheck.so \
336 ${libdir}/${BPN}/.debug/pg_upgrade_support.so \
337 ${libdir}/${BPN}/.debug/unaccent.so \
338"
339DESCRIPTION_${PN}-contrib = "The postgresql-contrib package contains \
340 contributed packages that are included in the PostgreSQL distribution."
341
342FILES_${PN}-pltcl = "${libdir}/${BPN}/pltcl.so ${bindir}/pltcl_delmod \
343 ${binddir}/pltcl_listmod ${bindir}/pltcl_loadmod \
344 ${datadir}/${BPN}/unknown.pltcl"
345FILES_${PN}-pltcl-dbg = "${libdir}/${BPN}/.debug/pltcl.so"
346SUMMARY_${PN}-pltcl = "The Tcl procedural language for PostgreSQL"
347DESCRIPTION_${PN}-pltcl = "PostgreSQL is an advanced Object-Relational \
348 database management system. The postgresql-pltcl package contains the PL/Tcl \
349 procedural language for the backend."
350
351FILES_${PN}-plperl = "${libdir}/${BPN}/plperl.so"
352FILES_${PN}-plperl-dbg = "${libdir}/${BPN}/.debug/plperl.so"
353SUMMARY_${PN}-plperl = "The Perl procedural language for PostgreSQL"
354DESCRIPTION_${PN}-plperl = "PostgreSQL is an advanced Object-Relational \
355 database management system. The postgresql-plperl package contains the \
356 PL/Perl procedural language for the backend."
357
358# In version 8, it will be plpython.so
359# In version 9, it might be plpython{2,3}.so depending on python2 or 3
360FILES_${PN}-plpython = "${libdir}/${BPN}/plpython*.so"
361FILES_${PN}-plpython-dbg = "${libdir}/${BPN}/.debug/plpython*.so"
362SUMMARY_${PN}-plpython = "The Python procedural language for PostgreSQL"
363DESCRIPTION_${PN}-plpython = "PostgreSQL is an advanced Object-Relational \
364 database management system. The postgresql-plpython package contains \
365 the PL/Python procedural language for the backend."
diff --git a/meta-oe/recipes-support/postgresql/postgresql_9.2.4.bb b/meta-oe/recipes-support/postgresql/postgresql_9.2.4.bb
new file mode 100644
index 0000000000..49ca53fae3
--- /dev/null
+++ b/meta-oe/recipes-support/postgresql/postgresql_9.2.4.bb
@@ -0,0 +1,13 @@
1require postgresql.inc
2
3LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=ab55a5887d3f8ba77d0fd7db787e4bab"
4
5PR = "${INC_PR}.0"
6
7SRC_URI += "\
8 file://remove.autoconf.version.check.patch \
9 file://ecpg-parallel-make-fix.patch \
10"
11
12SRC_URI[md5sum] = "6ee5bb53b97da7c6ad9cb0825d3300dd"
13SRC_URI[sha256sum] = "d97dd918a88a4449225998f46aafa85216a3f89163a3411830d6890507ffae93"