diff options
Diffstat (limited to 'meta-oe/recipes-dbs/postgresql/postgresql.inc')
-rw-r--r-- | meta-oe/recipes-dbs/postgresql/postgresql.inc | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc index 60d44ce979..2dd7dd6fda 100644 --- a/meta-oe/recipes-dbs/postgresql/postgresql.inc +++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc @@ -35,8 +35,9 @@ LEAD_SONAME = "libpq.so" # LDFLAGS for shared libraries export LDFLAGS_SL = "${LDFLAGS}" +export LDFLAGS_EX_BE = "-Wl,--export-dynamic" -inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext cpan-base +inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext cpan-base multilib_header CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6" @@ -54,7 +55,7 @@ pkg_postinst:${PN} () { PACKAGECONFIG ??= " \ ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \ - openssl python uuid libxml tcl perl zlib \ + openssl python uuid libxml tcl perl zlib icu \ " PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native," PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl" @@ -69,6 +70,7 @@ PACKAGECONFIG[libxslt] = "--with-libxslt,--without-libxslt,libxslt" PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" PACKAGECONFIG[openssl] = "--with-ssl=openssl,ac_cv_file__dev_urandom=yes,openssl" +PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu,icu" EXTRA_OECONF += "--enable-thread-safety --disable-rpath \ --datadir=${datadir}/${BPN} \ @@ -183,6 +185,7 @@ INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ." do_install:append() { # install contrib oe_runmake DESTDIR=${D} -C contrib install + oe_multilib_header pg_config.h pg_config_ext.h ecpg_config.h postgresql/server/pg_config.h postgresql/server/pg_config_ext.h # install tutorial install -d -m 0755 ${D}${libdir}/${BPN}/tutorial install ${B}/src/tutorial/* ${D}${libdir}/${BPN}/tutorial @@ -195,24 +198,24 @@ do_install:append() { # install dirs and server init install -d ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server + install -m 0755 ${UNPACKDIR}/${BPN}.init ${D}${sysconfdir}/init.d/${BPN}-server sed -i -e "s/^PGVERSION=.*$/PGVERSION=${PV}/g" ${D}${sysconfdir}/init.d/${BPN}-server - install -m 0755 ${WORKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup + install -m 0755 ${UNPACKDIR}/${BPN}-setup ${D}${bindir}/${BPN}-setup install -d -m 700 ${D}${localstatedir}/lib/${BPN}/data install -d -m 700 ${D}${localstatedir}/lib/${BPN}/backups - install -m 644 ${WORKDIR}/${BPN}-profile ${D}${localstatedir}/lib/${BPN}/.profile + install -m 644 ${UNPACKDIR}/${BPN}-profile ${D}${localstatedir}/lib/${BPN}/.profile chown -R postgres:postgres ${D}${localstatedir}/lib/${BPN} # multiple server config directory install -d -m 700 ${D}${sysconfdir}/default/${BPN} if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then install -d ${D}${sysconfdir}/pam.d - install -m 644 ${WORKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql + install -m 644 ${UNPACKDIR}/postgresql.pam ${D}${sysconfdir}/pam.d/postgresql fi # Install systemd unit files install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/postgresql.service ${D}${systemd_unitdir}/system + install -m 0644 ${UNPACKDIR}/postgresql.service ${D}${systemd_unitdir}/system sed -i -e 's,@BINDIR@,${bindir},g' \ ${D}${systemd_unitdir}/system/postgresql.service # Remove the build path @@ -228,6 +231,16 @@ do_install:append() { SSTATE_SCAN_FILES += "Makefile.global" SSTATE_SCAN_FILES:remove = "*_config" +postgresql_fix_sources () { + for f in ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/Util.c \ + ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/SPI.c; do + if [ -e $f ]; then + sed -i -e 's#${B}/../${P}#${TARGET_DBGSRC_DIR}#g' $f + fi + done +} +PACKAGESPLITFUNCS =+ "postgresql_fix_sources" + PACKAGES =+ "${PN}-client ${PN}-server-dev ${PN}-timezone \ libecpg-compat libecpg-compat-dev \ libecpg libecpg-dev libecpg-staticdev libecpg-doc \ |