diff options
author | Armin Kuster <akuster808@gmail.com> | 2018-02-24 09:38:11 -0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-03-01 16:10:38 -0800 |
commit | 742404cc8ab08316b0c02310c89958972d43d22e (patch) | |
tree | 0fbbb80e1716548f3fe2b9d8383f9da8ad707abc /meta-oe/recipes-dbs | |
parent | eaff8c24ab1b88efc9340d90c268f4aea3795992 (diff) | |
download | meta-openembedded-742404cc8ab08316b0c02310c89958972d43d22e.tar.gz |
postgres: move to recipes-dbs
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-dbs')
10 files changed, 789 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch b/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch new file mode 100644 index 000000000..d08ec6af1 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/0001-Use-pkg-config-for-libxml2-detection.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From d52e330be895bb8c5f0fb3e2884766acbd942a85 Mon Sep 17 00:00:00 2001 | ||
2 | From: Philip Balister <philip@balister.org> | ||
3 | Date: Tue, 1 Jul 2014 09:40:44 -0400 | ||
4 | Subject: [PATCH] Use pkg-config for libxml2 detection. | ||
5 | |||
6 | Upstream-Status: Inappropriate [configuration] | ||
7 | |||
8 | xml2-config does not work. Use pkgconfig to set CPPFLAGS and LIBS. | ||
9 | |||
10 | Signed-off-by: Philip Balister <philip@balister.org> | ||
11 | --- | ||
12 | configure.in | 15 ++------------- | ||
13 | 1 file changed, 2 insertions(+), 13 deletions(-) | ||
14 | |||
15 | diff --git a/configure.in b/configure.in | ||
16 | index f8bf466..1f4fabf 100644 | ||
17 | --- a/configure.in | ||
18 | +++ b/configure.in | ||
19 | @@ -734,19 +734,8 @@ PGAC_ARG_BOOL(with, libxml, no, [build with XML support], | ||
20 | [AC_DEFINE([USE_LIBXML], 1, [Define to 1 to build with XML support. (--with-libxml)])]) | ||
21 | |||
22 | if test "$with_libxml" = yes ; then | ||
23 | - AC_CHECK_PROGS(XML2_CONFIG, xml2-config) | ||
24 | - if test -n "$XML2_CONFIG"; then | ||
25 | - for pgac_option in `$XML2_CONFIG --cflags`; do | ||
26 | - case $pgac_option in | ||
27 | - -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";; | ||
28 | - esac | ||
29 | - done | ||
30 | - for pgac_option in `$XML2_CONFIG --libs`; do | ||
31 | - case $pgac_option in | ||
32 | - -L*) LDFLAGS="$LDFLAGS $pgac_option";; | ||
33 | - esac | ||
34 | - done | ||
35 | - fi | ||
36 | + CPPFLAGS="$CPPFLAGS `pkg-config --short-errors --print-errors --cflags "libxml-2.0" 2>&1`" | ||
37 | + LIBS="`pkg-config --short-errors --print-errors --libs "libxml-2.0" 2>&1` $LIBS" | ||
38 | fi | ||
39 | |||
40 | AC_SUBST(with_libxml) | ||
41 | -- | ||
42 | 1.8.3.1 | ||
43 | |||
diff --git a/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch b/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch new file mode 100644 index 000000000..e199f3914 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/not-check-libperl.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | [PATCH] not check libperl under cross compiling | ||
2 | |||
3 | Upstream-Status: Inappropriate [configuration] | ||
4 | |||
5 | libperl ldflags returned by PGAC_CHECK_PERL_EMBED_LDFLAGS are native, | ||
6 | can not be used to check target library. | ||
7 | |||
8 | postpresql has the dependency on perl, so not need to check libperl | ||
9 | again, like in postgresql-9.2.4 | ||
10 | |||
11 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
12 | --- | ||
13 | configure.in | 2 +- | ||
14 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/configure.in b/configure.in | ||
17 | index ae1a5a0..9a0970d 100644 | ||
18 | --- a/configure.in | ||
19 | +++ b/configure.in | ||
20 | @@ -1877,7 +1877,7 @@ if test "$with_tcl" = yes; then | ||
21 | fi | ||
22 | |||
23 | # check for <perl.h> | ||
24 | -if test "$with_perl" = yes; then | ||
25 | +if test "$with_perl" = yes && test "$cross_compiling" = no; then | ||
26 | ac_save_CPPFLAGS=$CPPFLAGS | ||
27 | CPPFLAGS="$CPPFLAGS -I$perl_archlibexp/CORE" | ||
28 | AC_CHECK_HEADER(perl.h, [], [AC_MSG_ERROR([header file <perl.h> is required for Perl])], | ||
29 | -- | ||
30 | 1.9.1 | ||
31 | |||
diff --git a/meta-oe/recipes-dbs/postgresql/files/postgresql-bashprofile b/meta-oe/recipes-dbs/postgresql/files/postgresql-bashprofile new file mode 100644 index 000000000..1c931f37f --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/postgresql-bashprofile | |||
@@ -0,0 +1,4 @@ | |||
1 | [ -f /etc/profile ] && source /etc/profile | ||
2 | |||
3 | PGDATA=/var/lib/postgresql/data | ||
4 | export PGDATA | ||
diff --git a/meta-oe/recipes-dbs/postgresql/files/postgresql-setup b/meta-oe/recipes-dbs/postgresql/files/postgresql-setup new file mode 100644 index 000000000..75bb01e05 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/postgresql-setup | |||
@@ -0,0 +1,73 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # postgresql-setup Initialization operation for PostgreSQL | ||
4 | |||
5 | # For SELinux we need to use 'runuser' not 'su' | ||
6 | if [ -x /sbin/runuser ] | ||
7 | then | ||
8 | SU=runuser | ||
9 | else | ||
10 | SU=su | ||
11 | fi | ||
12 | |||
13 | PGENGINE=/usr/bin | ||
14 | PGDATA=/var/lib/postgresql/data | ||
15 | PGLOG=/var/lib/postgresql/pgstartup.log | ||
16 | script_result=0 | ||
17 | |||
18 | initdb(){ | ||
19 | if [ -f "$PGDATA/PG_VERSION" ] | ||
20 | then | ||
21 | echo -n "Data directory is not empty!" | ||
22 | echo -n " [FAILED] " | ||
23 | echo | ||
24 | script_result=1 | ||
25 | else | ||
26 | echo -n "Initializing database: " | ||
27 | if [ ! -e "$PGDATA" -a ! -h "$PGDATA" ] | ||
28 | then | ||
29 | mkdir -p "$PGDATA" || exit 1 | ||
30 | chown postgres:postgres "$PGDATA" | ||
31 | chmod go-rwx "$PGDATA" | ||
32 | fi | ||
33 | # Clean up SELinux tagging for PGDATA | ||
34 | [ -x /sbin/restorecon ] && /sbin/restorecon "$PGDATA" | ||
35 | |||
36 | # Make sure the startup-time log file is OK, too | ||
37 | if [ ! -e "$PGLOG" -a ! -h "$PGLOG" ] | ||
38 | then | ||
39 | touch "$PGLOG" || exit 1 | ||
40 | chown postgres:postgres "$PGLOG" | ||
41 | chmod go-rwx "$PGLOG" | ||
42 | [ -x /sbin/restorecon ] && /sbin/restorecon "$PGLOG" | ||
43 | fi | ||
44 | |||
45 | # Initialize the database | ||
46 | $SU -l postgres -c "$PGENGINE/initdb --pgdata='$PGDATA' --auth='ident'" >> "$PGLOG" 2>&1 < /dev/null | ||
47 | |||
48 | # Create directory for postmaster log | ||
49 | mkdir "$PGDATA/pg_log" | ||
50 | chown postgres:postgres "$PGDATA/pg_log" | ||
51 | chmod go-rwx "$PGDATA/pg_log" | ||
52 | |||
53 | if [ -f "$PGDATA/PG_VERSION" ] | ||
54 | then | ||
55 | echo -n " [ OK ] " | ||
56 | else | ||
57 | echo -n " [FAILED] " | ||
58 | script_result=1 | ||
59 | fi | ||
60 | echo | ||
61 | fi | ||
62 | } | ||
63 | |||
64 | case "$1" in | ||
65 | initdb) | ||
66 | initdb | ||
67 | ;; | ||
68 | *) | ||
69 | echo "Usage: $0 initdb" | ||
70 | exit 2 | ||
71 | esac | ||
72 | |||
73 | exit $script_result | ||
diff --git a/meta-oe/recipes-dbs/postgresql/files/postgresql.init b/meta-oe/recipes-dbs/postgresql/files/postgresql.init new file mode 100644 index 000000000..4a4f0cd16 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/postgresql.init | |||
@@ -0,0 +1,193 @@ | |||
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 | ||
16 | PGVERSION=9.2.4 | ||
17 | # PGMAJORVERSION is major version, e.g., 8.4 (this should match PG_VERSION) | ||
18 | PGMAJORVERSION=`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 | ||
24 | NAME=`basename $0` | ||
25 | if [ ${NAME:0:1} = "S" -o ${NAME:0:1} = "K" ] | ||
26 | then | ||
27 | NAME=${NAME:3} | ||
28 | fi | ||
29 | |||
30 | # For SELinux we need to use 'runuser' not 'su' | ||
31 | if [ -x /sbin/runuser ] | ||
32 | then | ||
33 | SU=runuser | ||
34 | else | ||
35 | SU=su | ||
36 | fi | ||
37 | |||
38 | |||
39 | # Set defaults for configuration variables | ||
40 | PGENGINE=/usr/bin | ||
41 | PGPORT=5432 | ||
42 | PGDATA=/var/lib/postgresql/data | ||
43 | PGLOG=/var/lib/postgresql/pgstartup.log | ||
44 | # Value to set as postmaster process's oom_adj | ||
45 | PG_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 | |||
50 | export PGDATA | ||
51 | export PGPORT | ||
52 | |||
53 | lockfile="/var/lock/subsys/${NAME}" | ||
54 | pidfile="/var/run/postmaster.${PGPORT}.pid" | ||
55 | |||
56 | script_result=0 | ||
57 | |||
58 | start(){ | ||
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 \"postgresql-setup 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 | |||
128 | stop(){ | ||
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 | |||
150 | restart(){ | ||
151 | stop | ||
152 | start | ||
153 | } | ||
154 | |||
155 | condrestart(){ | ||
156 | [ -e "$lockfile" ] && restart || : | ||
157 | } | ||
158 | |||
159 | reload(){ | ||
160 | $SU -l postgres -c "$PGENGINE/pg_ctl reload -D '$PGDATA' -s" > /dev/null 2>&1 < /dev/null | ||
161 | } | ||
162 | |||
163 | |||
164 | # See how we were called. | ||
165 | case "$1" in | ||
166 | start) | ||
167 | start | ||
168 | ;; | ||
169 | stop) | ||
170 | stop | ||
171 | ;; | ||
172 | status) | ||
173 | status postmaster | ||
174 | script_result=$? | ||
175 | ;; | ||
176 | restart) | ||
177 | restart | ||
178 | ;; | ||
179 | condrestart|try-restart) | ||
180 | condrestart | ||
181 | ;; | ||
182 | reload) | ||
183 | reload | ||
184 | ;; | ||
185 | force-reload) | ||
186 | restart | ||
187 | ;; | ||
188 | *) | ||
189 | echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" | ||
190 | exit 2 | ||
191 | esac | ||
192 | |||
193 | exit $script_result | ||
diff --git a/meta-oe/recipes-dbs/postgresql/files/postgresql.pam b/meta-oe/recipes-dbs/postgresql/files/postgresql.pam new file mode 100644 index 000000000..0b6fdc5f2 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/postgresql.pam | |||
@@ -0,0 +1,4 @@ | |||
1 | #%PAM-1.0 | ||
2 | auth include common-auth | ||
3 | account include common-account | ||
4 | password include common-password | ||
diff --git a/meta-oe/recipes-dbs/postgresql/files/postgresql.service b/meta-oe/recipes-dbs/postgresql/files/postgresql.service new file mode 100644 index 000000000..4ec959e84 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/postgresql.service | |||
@@ -0,0 +1,27 @@ | |||
1 | [Unit] | ||
2 | Description=PostgreSQL database server | ||
3 | After=network.target | ||
4 | |||
5 | [Service] | ||
6 | Type=forking | ||
7 | User=postgres | ||
8 | Group=postgres | ||
9 | |||
10 | # Port number for server to listen on | ||
11 | Environment=PGPORT=5432 | ||
12 | |||
13 | # Location of database directory | ||
14 | Environment=PGDATA=/var/lib/postgresql/data | ||
15 | |||
16 | # Disable OOM kill on the postmaster | ||
17 | OOMScoreAdjust=-17 | ||
18 | |||
19 | ExecStart=@BINDIR@/pg_ctl start -D ${PGDATA} -s -o "-p ${PGPORT}" -w -t 300 | ||
20 | ExecStop=@BINDIR@/pg_ctl stop -D ${PGDATA} -s -m fast | ||
21 | ExecReload=@BINDIR@/pg_ctl reload -D ${PGDATA} -s | ||
22 | |||
23 | # Give a reasonable amount of time for the server to start up/shut down | ||
24 | TimeoutSec=300 | ||
25 | |||
26 | [Install] | ||
27 | WantedBy=multi-user.target | ||
diff --git a/meta-oe/recipes-dbs/postgresql/files/remove.autoconf.version.check.patch b/meta-oe/recipes-dbs/postgresql/files/remove.autoconf.version.check.patch new file mode 100644 index 000000000..be23fd419 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/files/remove.autoconf.version.check.patch | |||
@@ -0,0 +1,16 @@ | |||
1 | Index: 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.4.2], [pgsql-bugs@postgresql.org]) | ||
8 | |||
9 | -m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 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-2014, PostgreSQL Global Development Group]) | ||
14 | AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c]) | ||
15 | AC_CONFIG_AUX_DIR(config) | ||
16 | |||
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc new file mode 100644 index 000000000..812c2aed4 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc | |||
@@ -0,0 +1,383 @@ | |||
1 | SUMMARY = "PostgreSQL is a powerful, open source relational database system." | ||
2 | DESCRIPTION = "\ | ||
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 | " | ||
20 | HOMEPAGE = "http://www.postgresql.com" | ||
21 | LICENSE = "BSD" | ||
22 | DEPENDS = "zlib readline tzcode-native" | ||
23 | |||
24 | ARM_INSTRUCTION_SET = "arm" | ||
25 | |||
26 | SRC_URI = "http://ftp.postgresql.org/pub/source/v${PV}/${BP}.tar.bz2 \ | ||
27 | file://postgresql.init \ | ||
28 | file://postgresql-bashprofile \ | ||
29 | file://postgresql.pam \ | ||
30 | file://postgresql-setup \ | ||
31 | file://postgresql.service \ | ||
32 | file://0001-Use-pkg-config-for-libxml2-detection.patch \ | ||
33 | " | ||
34 | |||
35 | LEAD_SONAME = "libpq.so" | ||
36 | |||
37 | # LDFLAGS for shared libraries | ||
38 | export LDFLAGS_SL = "${LDFLAGS}" | ||
39 | |||
40 | inherit autotools pkgconfig perlnative pythonnative useradd update-rc.d systemd gettext | ||
41 | |||
42 | CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6" | ||
43 | |||
44 | SYSTEMD_SERVICE_${PN} = "postgresql.service" | ||
45 | SYSTEMD_AUTO_ENABLE_${PN} = "disable" | ||
46 | |||
47 | DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd-systemctl-native', '', d)}" | ||
48 | pkg_postinst_${PN} () { | ||
49 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd sysvinit', 'true', 'false', d)}; then | ||
50 | if [ -n "$D" ]; then | ||
51 | OPTS="--root=$D" | ||
52 | fi | ||
53 | systemctl $OPTS mask postgresql-server.service | ||
54 | fi | ||
55 | } | ||
56 | |||
57 | enable_pam = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" | ||
58 | PACKAGECONFIG ??= "${enable_pam} openssl python uuid libxml tcl nls libxml perl" | ||
59 | PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," | ||
60 | PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl," | ||
61 | PACKAGECONFIG[python] = "--with-python,--without-python,python,python" | ||
62 | PACKAGECONFIG[uuid] = "--with-ossp-uuid,--without-ossp-uuid,ossp-uuid," | ||
63 | PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native," | ||
64 | PACKAGECONFIG[nls] = "--enable-nls,--disable-nls,," | ||
65 | PACKAGECONFIG[libxml] = "--with-libxml,--without-libxml,libxml2,libxml2" | ||
66 | PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl" | ||
67 | |||
68 | EXTRA_OECONF += "--enable-thread-safety --disable-rpath \ | ||
69 | --datadir=${datadir}/${BPN} \ | ||
70 | --sysconfdir=${sysconfdir}/${BPN} \ | ||
71 | " | ||
72 | EXTRA_OECONF_sh4 += "--disable-spinlocks" | ||
73 | EXTRA_OECONF_aarch64 += "--disable-spinlocks" | ||
74 | |||
75 | PACKAGES_DYNAMIC += "^${PN}-plperl ^${PN}-plperl-dbg \ | ||
76 | ^${PN}-pltcl ^${PN}-pltcl-dbg \ | ||
77 | ^${PN}-plpython ^${PN}-plpython-dbg \ | ||
78 | " | ||
79 | |||
80 | python populate_packages_prepend() { | ||
81 | |||
82 | def fill_more(name, dbg=True): | ||
83 | if name is None or name.strip() == "": | ||
84 | return | ||
85 | |||
86 | fpack=d.getVar('PACKAGES', False) or "" | ||
87 | fpack="${PN}-" + name + " " + fpack | ||
88 | if dbg: | ||
89 | fpack="${PN}-" + name + "-dbg" + " " + fpack | ||
90 | d.setVar('PACKAGES', fpack) | ||
91 | |||
92 | conf=(d.getVar('PACKAGECONFIG') or "").split() | ||
93 | pack=d.getVar('PACKAGES', False) or "" | ||
94 | bb.debug(1, "PACKAGECONFIG=%s" % conf) | ||
95 | bb.debug(1, "PACKAGES1=%s" % pack ) | ||
96 | |||
97 | if "perl" in conf : | ||
98 | fill_more("plperl") | ||
99 | |||
100 | if "tcl" in conf: | ||
101 | fill_more("pltcl") | ||
102 | |||
103 | if "python" in conf: | ||
104 | fill_more("plpython") | ||
105 | |||
106 | pack=d.getVar('PACKAGES') or "" | ||
107 | bb.debug(1, "PACKAGES2=%s" % pack) | ||
108 | |||
109 | } | ||
110 | |||
111 | do_configure() { | ||
112 | # do_configure | ||
113 | autotools_do_configure | ||
114 | |||
115 | # do_configure_append | ||
116 | # workaround perl package related bugs | ||
117 | sed -i -e "s:-L/usr/local/lib:-L=/usr/local/lib:g" \ | ||
118 | ${B}/src/Makefile.global | ||
119 | LIBPNA="\${STAGING_LIBDIR_NATIVE}/perl-native" | ||
120 | LIBNA="\${STAGING_LIBDIR_NATIVE}" | ||
121 | BLIBNA="\${STAGING_BASE_LIBDIR_NATIVE}" | ||
122 | sed -i -e "/^perl_archlibexp/s:${LIBPNA}:${STAGING_LIBDIR}:g" \ | ||
123 | ${B}/src/Makefile.global | ||
124 | sed -i -e "/^perl_privlibexp/s:${LIBPNA}:${STAGING_LIBDIR}:g" \ | ||
125 | ${B}/src/Makefile.global | ||
126 | # remove the rpath, replace with correct lib path | ||
127 | sed -i \ | ||
128 | -e "/^perl_embed_ldflags/s:-Wl,-rpath,${LIBNA}::g" \ | ||
129 | -e "/^perl_embed_ldflags/s:-Wl,-rpath,${BLIBNA}::g" \ | ||
130 | -e "/^perl_embed_ldflags/s:-Wl,-rpath-link,${LIBNA}::g" \ | ||
131 | -e "/^perl_embed_ldflags/s:-Wl,-rpath-link,${BLIBNA}::g" \ | ||
132 | -e "/^perl_embed_ldflags/s:${LIBPNA}:${STAGING_LIBDIR}:g" \ | ||
133 | -e "/^perl_embed_ldflags/s:${LIBNA}:${STAGING_LIBDIR}:g" \ | ||
134 | -e "/^perl_embed_ldflags/s:${BLIBNA}:${STAGING_BASELIBDIR}:g" \ | ||
135 | -e "/^TCLSH/s:=.*:= ${bindir}/tclsh:g" \ | ||
136 | ${B}/src/Makefile.global | ||
137 | |||
138 | if ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'true', 'false', d)}; then | ||
139 | # workaround perl package's libperl.so problem | ||
140 | # we are using perlnative so this perl should have same version | ||
141 | perl_version=`perl -v 2>/dev/null | \ | ||
142 | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'` | ||
143 | if [ ! -h "${STAGING_LIBDIR}/perl/$perl_version/CORE/libperl.so" -a \ | ||
144 | ! -h "${STAGING_LIBDIR}/libperl.so" ]; then | ||
145 | ln -sf ../../../libperl.so.5 \ | ||
146 | ${STAGING_LIBDIR}/perl/$perl_version/CORE/libperl.so | ||
147 | fi | ||
148 | fi | ||
149 | } | ||
150 | |||
151 | do_compile_append() { | ||
152 | oe_runmake -C contrib all | ||
153 | } | ||
154 | |||
155 | # server needs to configure user and group | ||
156 | usernum = "28" | ||
157 | groupnum = "28" | ||
158 | USERADD_PACKAGES = "${PN}" | ||
159 | USERADD_PARAM_${PN} = "-M -g postgres -o -r -d ${localstatedir}/lib/${BPN} \ | ||
160 | -s /bin/bash -c 'PostgreSQL Server' -u ${usernum} postgres" | ||
161 | GROUPADD_PARAM_${PN} = "-g ${groupnum} -o -r postgres" | ||
162 | |||
163 | INITSCRIPT_PACKAGES = "${PN}" | ||
164 | INITSCRIPT_NAME = "${BPN}-server" | ||
165 | INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ." | ||
166 | |||
167 | do_install_append() { | ||
168 | # install contrib | ||
169 | oe_runmake DESTDIR=${D} -C contrib install | ||
170 | # install tutorial | ||
171 | install -d -m 0755 ${D}${libdir}/${BPN}/tutorial | ||
172 | install ${B}/src/tutorial/* ${D}${libdir}/${BPN}/tutorial | ||
173 | |||
174 | # install COPYRIGHT README HISTORY | ||
175 | install -d -m 0755 ${D}${docdir}/${BPN} | ||
176 | for i in ${B}/COPYRIGHT ${B}/README ${B}/HISTORY ${B}/doc/KNOWN_BUGS ${B}/doc/MISSING_FEATURES ${B}/doc/README* ${B}/doc/bug.template; do | ||
177 | [ -f $i ] && install $i ${D}${docdir}/${BPN} | ||
178 | done | ||
179 | |||
180 | # install dirs and server init | ||
181 | install -d ${D}${sysconfdir}/init.d | ||
182 | install -m 0755 ${WORKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server | ||
183 | sed -i -e "s/^PGVERSION=.*$/PGVERSION=${PV}/g" ${D}${sysconfdir}/init.d/${BPN}-server | ||
184 | install -m 0755 ${WORKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup | ||
185 | install -d -m 700 ${D}${localstatedir}/lib/${BPN}/data | ||
186 | install -d -m 700 ${D}${localstatedir}/lib/${BPN}/backups | ||
187 | install -m 644 ${WORKDIR}/${BPN}-bashprofile ${D}${localstatedir}/lib/${BPN}/.bash_profile | ||
188 | chown -R postgres:postgres ${D}${localstatedir}/lib/${BPN} | ||
189 | # multiple server config directory | ||
190 | install -d -m 700 ${D}${sysconfdir}/default/${BPN} | ||
191 | |||
192 | if [ "${@d.getVar('enable_pam')}" = "pam" ]; then | ||
193 | install -d ${D}${sysconfdir}/pam.d | ||
194 | install -m 644 ${WORKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql | ||
195 | fi | ||
196 | |||
197 | # Install systemd unit files | ||
198 | install -d ${D}${systemd_unitdir}/system | ||
199 | install -m 0644 ${WORKDIR}/postgresql.service ${D}${systemd_unitdir}/system | ||
200 | sed -i -e 's,@BINDIR@,${bindir},g' \ | ||
201 | ${D}${systemd_unitdir}/system/postgresql.service | ||
202 | } | ||
203 | |||
204 | SSTATE_SCAN_FILES += "Makefile.global" | ||
205 | |||
206 | PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \ | ||
207 | libecpg-compat-dbg libecpg-compat libecpg-compat-dev \ | ||
208 | libecpg-dbg libecpg libecpg-dev libecpg-staticdev libecpg-doc \ | ||
209 | libpq-dbg libpq libpq-dev libpq-staticdev \ | ||
210 | libpgtypes-dbg libpgtypes libpgtypes-staticdev libpgtypes-dev \ | ||
211 | ${PN}-contrib ${PN}-contrib-dbg \ | ||
212 | " | ||
213 | |||
214 | FILES_${PN} += "${sysconfdir}/init.d/${BPN}-server \ | ||
215 | ${localstatedir}/lib/${BPN}/data ${localstatedir}/lib/${BPN}/backups \ | ||
216 | ${localstatedir}/lib/${BPN}/.bash_profile ${sysconfdir}/default/${BPN} \ | ||
217 | ${libdir}/${BPN}/dict_snowball.so ${libdir}/${BPN}/plpgsql.so \ | ||
218 | ${libdir}/${BPN}/euc2004_sjis2004.so \ | ||
219 | ${libdir}/${BPN}/libpqwalreceiver.so \ | ||
220 | ${libdir}/${BPN}/*_and_*.so \ | ||
221 | ${@'${sysconfdir}/pam.d/postgresql' \ | ||
222 | if 'pam' == d.getVar('enable_pam') \ | ||
223 | else ''} \ | ||
224 | " | ||
225 | |||
226 | FILES_${PN}-dbg += " ${libdir}/${BPN}/.debug/dict_snowball.so \ | ||
227 | ${libdir}/${BPN}/.debug/plpgsql.so \ | ||
228 | ${libdir}/${BPN}/.debug/euc2004_sjis2004.so \ | ||
229 | ${libdir}/${BPN}/.debug/libpqwalreceiver.so \ | ||
230 | ${libdir}/${BPN}/.debug/*_and_*.so \ | ||
231 | " | ||
232 | |||
233 | FILES_${PN}-client = "${bindir}/clusterdb \ | ||
234 | ${bindir}/createdb \ | ||
235 | ${bindir}/createlang \ | ||
236 | ${bindir}/createuser \ | ||
237 | ${bindir}/dropdb \ | ||
238 | ${bindir}/droplang \ | ||
239 | ${bindir}/dropuser \ | ||
240 | ${bindir}/pg_dump \ | ||
241 | ${bindir}/pg_dumpall \ | ||
242 | ${bindir}/pg_restore \ | ||
243 | ${bindir}/psql \ | ||
244 | ${bindir}/reindexdb \ | ||
245 | ${bindir}/vacuumdb \ | ||
246 | ${bindir}/vacuumlo \ | ||
247 | ${datadir}/${BPN}/psqlrc.sample \ | ||
248 | " | ||
249 | FILES_${PN}-client-doc = "${mandir}/man1/clusterdb.* \ | ||
250 | ${mandir}/man1/createdb.* ${mandir}/man1/createlang.* \ | ||
251 | ${mandir}/man1/createuser.* ${mandir}/man1/dropdb.* \ | ||
252 | ${mandir}/man1/droplang.* ${mandir}/man1/dropuser.* \ | ||
253 | ${mandir}/man1/pg_dump.* ${mandir}/man1/pg_dumpall.* \ | ||
254 | ${mandir}/man1/pg_restore.* ${mandir}/man1/psql.* \ | ||
255 | ${mandir}/man1/reindexdb.* ${mandir}/man1/vacuumdb.* \ | ||
256 | ${mandir}/man7/* \ | ||
257 | " | ||
258 | FILES_${PN}-doc += "${docdir}/${BPN}/html ${libdir}/${BPN}/tutorial/ \ | ||
259 | ${mandir}/man1/initdb.* ${mandir}/man1/pg_controldata.* \ | ||
260 | ${mandir}/man1/pg_ctl.* ${mandir}/man1/pg_resetxlog.* \ | ||
261 | ${mandir}/man1/postgres.* ${mandir}/man1/postmaster.* \ | ||
262 | " | ||
263 | FILES_${PN}-timezone = "${datadir}/${BPN}/timezone \ | ||
264 | ${datadir}/${BPN}/timezonesets \ | ||
265 | " | ||
266 | RDEPENDS_${PN} += "${PN}-timezone" | ||
267 | FILES_${PN}-server-dev = "${includedir}/${BPN}/server" | ||
268 | |||
269 | FILES_libecpg = "${libdir}/libecpg*${SOLIBS}" | ||
270 | FILES_libecpg-dbg = "${libdir}/.debug/libecpg*" | ||
271 | FILES_libecpg-dev = "${libdir}/libecpg*${SOLIBSDEV} \ | ||
272 | ${libdir}/libpgtypes*${SOLIBSDEV} \ | ||
273 | ${includedir}/ecpg*.h ${includedir}/${BPN}/ecpg*.h \ | ||
274 | ${includedir}/pgtypes*.h ${includedir}/${BPN}/informix \ | ||
275 | ${includedir}/sql3types.h ${includedir}/sqlca.h \ | ||
276 | " | ||
277 | FILES_libecpg-doc = "${mandir}/man1/ecpg.*" | ||
278 | FILES_libecpg-staticdev = "${libdir}/libecpg*.a" | ||
279 | SECTION_libecpg-staticdev = "devel" | ||
280 | RDEPENDS_libecpg-staticdev = "libecpg-dev (= ${EXTENDPKGV})" | ||
281 | |||
282 | FILES_libpq = "${libdir}/libpq*${SOLIBS}" | ||
283 | FILES_libpq-dbg = "${libdir}/.debug/libpq* ${libdir}/${BPN}/pgxs/src/test/regress/.debug/*" | ||
284 | FILES_libpq-dev = "${libdir}/libpq*${SOLIBSDEV} \ | ||
285 | ${includedir} \ | ||
286 | " | ||
287 | FILES_libpq-staticdev = "${libdir}/libpq*.a ${libdir}/libpgport.a" | ||
288 | SECTION_libpq-staticdev = "devel" | ||
289 | RDEPENDS_libpq-staticdev = "libpq-dev (= ${EXTENDPKGV})" | ||
290 | |||
291 | FILES_libecpg-compat = "${libdir}/libecpg_compat*${SOLIBS}" | ||
292 | FILES_libecpg-compat-dbg = "${libdir}/.debug/libecpg_compat*" | ||
293 | FILES_libecpg-compat-dev = "${libdir}/libecpg_compat*${SOLIBS}" | ||
294 | FILES_libpgtypes = "${libdir}/libpgtypes*${SOLIBS}" | ||
295 | FILES_libpgtypes-dbg = "${libdir}/.debug/libpgtypes*" | ||
296 | FILES_libpgtypes-staticdev = "${libdir}/libpgtypes*.a" | ||
297 | FILES_libpgtypes-dev = "${libdir}/libpgtypes*${SOLIBS} ${includedir}/pgtypes*.h" | ||
298 | |||
299 | FILES_${PN}-contrib = " ${bindir}/oid2name ${bindir}/pg_standby \ | ||
300 | ${bindir}/pgbench ${bindir}/vacuumlo \ | ||
301 | ${S}/contrib/spi/*.example \ | ||
302 | ${libdir}/${BPN}/_int.so ${libdir}/${BPN}/adminpack.so \ | ||
303 | ${libdir}/${BPN}/autoinc.so ${libdir}/${BPN}/auto_explain.so \ | ||
304 | ${libdir}/${BPN}/auth_delay.so ${libdir}/${BPN}/btree_gin.so \ | ||
305 | ${libdir}/${BPN}/btree_gist.so ${libdir}/${BPN}/.so \ | ||
306 | ${libdir}/${BPN}/chkpass.so ${libdir}/${BPN}/citext.so \ | ||
307 | ${libdir}/${BPN}/cube.so ${libdir}/${BPN}/dblink.so \ | ||
308 | ${libdir}/${BPN}/dict_int.so ${libdir}/${BPN}/dict_xsyn.so \ | ||
309 | ${libdir}/${BPN}/dummy_seclabel.so ${libdir}/${BPN}/earthdistance.so \ | ||
310 | ${libdir}/${BPN}/file_fdw.so ${libdir}/${BPN}/fuzzystrmatch.so \ | ||
311 | ${libdir}/${BPN}/hstore.so ${libdir}/${BPN}/insert_username.so \ | ||
312 | ${libdir}/${BPN}/isn.so ${libdir}/${BPN}/lo.so \ | ||
313 | ${libdir}/${BPN}/ltree.so ${libdir}/${BPN}/moddatetime.so \ | ||
314 | ${libdir}/${BPN}/pageinspect.so ${libdir}/${BPN}/pg_buffercache.so \ | ||
315 | ${libdir}/${BPN}/pg_freespacemap.so ${libdir}/${BPN}/pg_trgm.so \ | ||
316 | ${libdir}/${BPN}/pgcrypto.so ${libdir}/${BPN}/pgrowlocks.so \ | ||
317 | ${libdir}/${BPN}/pgstattuple.so ${libdir}/${BPN}/pg_stat_statements.so \ | ||
318 | ${libdir}/${BPN}/refint.so ${libdir}/${BPN}/seg.so \ | ||
319 | ${libdir}/${BPN}/sslinfo.so \ | ||
320 | ${libdir}/${BPN}/tablefunc.so \ | ||
321 | ${libdir}/${BPN}/test_parser.so ${libdir}/${BPN}/timetravel.so \ | ||
322 | ${libdir}/${BPN}/tsearch2.so ${libdir}/${BPN}/uuid-ossp.so \ | ||
323 | ${libdir}/${BPN}/pgxml.so ${libdir}/${BPN}/passwordcheck.so \ | ||
324 | ${libdir}/${BPN}/pg_upgrade_support.so ${libdir}/${BPN}/.so \ | ||
325 | ${libdir}/${BPN}/unaccent.so \ | ||
326 | " | ||
327 | FILES_${PN}-contrib-dbg = " \ | ||
328 | ${libdir}/${BPN}/.debug/_int.so ${libdir}/${BPN}/.debug/adminpack.so \ | ||
329 | ${libdir}/${BPN}/.debug/autoinc.so ${libdir}/${BPN}/.debug/auto_explain.so \ | ||
330 | ${libdir}/${BPN}/.debug/auth_delay.so ${libdir}/${BPN}/.debug/btree_gin.so \ | ||
331 | ${libdir}/${BPN}/.debug/btree_gist.so ${libdir}/${BPN}/.debug/.so \ | ||
332 | ${libdir}/${BPN}/.debug/chkpass.so ${libdir}/${BPN}/.debug/citext.so \ | ||
333 | ${libdir}/${BPN}/.debug/cube.so ${libdir}/${BPN}/.debug/dblink.so \ | ||
334 | ${libdir}/${BPN}/.debug/dict_int.so ${libdir}/${BPN}/.debug/dict_xsyn.so \ | ||
335 | ${libdir}/${BPN}/.debug/dummy_seclabel.so \ | ||
336 | ${libdir}/${BPN}/.debug/earthdistance.so \ | ||
337 | ${libdir}/${BPN}/.debug/file_fdw.so ${libdir}/${BPN}/.debug/fuzzystrmatch.so \ | ||
338 | ${libdir}/${BPN}/.debug/hstore.so ${libdir}/${BPN}/.debug/insert_username.so \ | ||
339 | ${libdir}/${BPN}/.debug/isn.so ${libdir}/${BPN}/.debug/lo.so \ | ||
340 | ${libdir}/${BPN}/.debug/ltree.so ${libdir}/${BPN}/.debug/moddatetime.so \ | ||
341 | ${libdir}/${BPN}/.debug/pageinspect.so \ | ||
342 | ${libdir}/${BPN}/.debug/pg_buffercache.so \ | ||
343 | ${libdir}/${BPN}/.debug/pg_freespacemap.so \ | ||
344 | ${libdir}/${BPN}/.debug/pg_trgm.so \ | ||
345 | ${libdir}/${BPN}/.debug/pgcrypto.so ${libdir}/${BPN}/.debug/pgrowlocks.so \ | ||
346 | ${libdir}/${BPN}/.debug/pgstattuple.so \ | ||
347 | ${libdir}/${BPN}/.debug/pg_stat_statements.so \ | ||
348 | ${libdir}/${BPN}/.debug/refint.so ${libdir}/${BPN}/.debug/seg.so \ | ||
349 | ${libdir}/${BPN}/.debug/sslinfo.so \ | ||
350 | ${libdir}/${BPN}/.debug/tablefunc.so \ | ||
351 | ${libdir}/${BPN}/.debug/test_parser.so ${libdir}/${BPN}/.debug/timetravel.so \ | ||
352 | ${libdir}/${BPN}/.debug/tsearch2.so ${libdir}/${BPN}/.debug/uuid-ossp.so \ | ||
353 | ${libdir}/${BPN}/.debug/pgxml.so ${libdir}/${BPN}/.debug/passwordcheck.so \ | ||
354 | ${libdir}/${BPN}/.debug/pg_upgrade_support.so \ | ||
355 | ${libdir}/${BPN}/.debug/unaccent.so \ | ||
356 | " | ||
357 | DESCRIPTION_${PN}-contrib = "The postgresql-contrib package contains \ | ||
358 | contributed packages that are included in the PostgreSQL distribution." | ||
359 | |||
360 | FILES_${PN}-pltcl = "${libdir}/${BPN}/pltcl.so ${bindir}/pltcl_delmod \ | ||
361 | ${binddir}/pltcl_listmod ${bindir}/pltcl_loadmod \ | ||
362 | ${datadir}/${BPN}/unknown.pltcl" | ||
363 | FILES_${PN}-pltcl-dbg = "${libdir}/${BPN}/.debug/pltcl.so" | ||
364 | SUMMARY_${PN}-pltcl = "The Tcl procedural language for PostgreSQL" | ||
365 | DESCRIPTION_${PN}-pltcl = "PostgreSQL is an advanced Object-Relational \ | ||
366 | database management system. The postgresql-pltcl package contains the PL/Tcl \ | ||
367 | procedural language for the backend." | ||
368 | |||
369 | FILES_${PN}-plperl = "${libdir}/${BPN}/plperl.so" | ||
370 | FILES_${PN}-plperl-dbg = "${libdir}/${BPN}/.debug/plperl.so" | ||
371 | SUMMARY_${PN}-plperl = "The Perl procedural language for PostgreSQL" | ||
372 | DESCRIPTION_${PN}-plperl = "PostgreSQL is an advanced Object-Relational \ | ||
373 | database management system. The postgresql-plperl package contains the \ | ||
374 | PL/Perl procedural language for the backend." | ||
375 | |||
376 | # In version 8, it will be plpython.so | ||
377 | # In version 9, it might be plpython{2,3}.so depending on python2 or 3 | ||
378 | FILES_${PN}-plpython = "${libdir}/${BPN}/plpython*.so" | ||
379 | FILES_${PN}-plpython-dbg = "${libdir}/${BPN}/.debug/plpython*.so" | ||
380 | SUMMARY_${PN}-plpython = "The Python procedural language for PostgreSQL" | ||
381 | DESCRIPTION_${PN}-plpython = "PostgreSQL is an advanced Object-Relational \ | ||
382 | database management system. The postgresql-plpython package contains \ | ||
383 | the PL/Python procedural language for the backend." | ||
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_9.4.15.bb b/meta-oe/recipes-dbs/postgresql/postgresql_9.4.15.bb new file mode 100644 index 000000000..eec099a12 --- /dev/null +++ b/meta-oe/recipes-dbs/postgresql/postgresql_9.4.15.bb | |||
@@ -0,0 +1,15 @@ | |||
1 | require postgresql.inc | ||
2 | |||
3 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=81b69ddb31a8be66baafd14a90146ee2" | ||
4 | |||
5 | SRC_URI += "\ | ||
6 | file://remove.autoconf.version.check.patch \ | ||
7 | file://not-check-libperl.patch \ | ||
8 | " | ||
9 | |||
10 | do_compile_prepend_libc-musl() { | ||
11 | sed -i -e 's/\-lnsl//g' ${B}/src/Makefile.global | ||
12 | } | ||
13 | |||
14 | SRC_URI[md5sum] = "0aada0833a9208ae5fab966c73c39379" | ||
15 | SRC_URI[sha256sum] = "12bfb3c7e8e45515ef921ad365e122682a5c4935dcc0032644433af2de31acc4" | ||