postgresql-libs: fix cross building of dependent packages

This commit is contained in:
Piotr Wójcik 2020-07-14 19:30:16 +02:00 committed by Piotr
parent 1a4c2c1c1f
commit 4038986cb8
2 changed files with 10 additions and 9 deletions

View file

@ -5,14 +5,14 @@ print() {
printf '%s\n' "$@"
}
sysroot="$(cd "${0%@PREFIX@/*}" && pwd)"
sysroot="$(cd "${0%/*}" && cd ../.. && pwd)"
BINDIR="$sysroot/@PREFIX@/bin"
DOCDIR="$sysroot/@PREFIX@/share/doc/postgresql"
HTMLDIR="$sysroot/@PREFIX@/share/doc/postgresql"
INCLUDEDIR="$sysroot/@PREFIX@/include"
PKGINCLUDEDIR="$sysroot/@PREFIX@/include/postgresql"
INCLUDEDIR_SERVER="$sysroot/@PREFIX@/include/postgresql/server"
INCLUDEDIR="$sysroot/usr/include"
PKGINCLUDEDIR="$sysroot/usr/include/postgresql"
INCLUDEDIR_SERVER="$sysroot/usr/include/postgresql/server"
LIBDIR="$sysroot/@PREFIX@/lib"
PKGLIBDIR="$sysroot/@PREFIX@/lib/postgresql"
LOCALEDIR="$sysroot/@PREFIX@/share/locale"

View file

@ -1,7 +1,7 @@
# Template file for 'postgresql12'
pkgname=postgresql12
version=12.3
revision=1
revision=2
wrksrc="postgresql-${version}"
build_style=gnu-configure
make_build_target=world
@ -60,6 +60,7 @@ pre_configure() {
done
configure_args="--prefix=/${_prefix}
--sysconfdir=/${_prefix}/etc
--includedir=/usr/include
${configure_args}"
}
@ -68,7 +69,6 @@ post_build() {
}
pre_check() {
echo ln -sr tmp_install/${_prefix} /${_prefix%/*}
ln -sr tmp_install/${_prefix} /${_prefix%/*}
}
@ -129,16 +129,17 @@ postgresql-libs-devel_package() {
short_desc="PostgreSQL shared libraries (development files)"
conflicts="postgresql9.6-libs-devel>=0"
pkg_install() {
mkdir -p "${PKGDESTDIR}/usr/bin"
vmkdir usr/bin
vmkdir usr/lib
for f in pg_config ecpg; do
vmove ${_prefix}/bin/${f}
vmove "usr/share/man/man1/$(basename ${f})*"
ln -sr "${PKGDESTDIR}/${_prefix}/bin/${f}" "${PKGDESTDIR}/usr/bin"
done
vmove usr/bin/pg_config.sh
vmove ${_prefix}/include
vmove usr/include
vmove "${_prefix}/lib/*.a"
vmove "${_prefix}/lib/pkgconfig/*"
mv "${DESTDIR}/${_prefix}/lib/pkgconfig" "${PKGDESTDIR}/usr/lib"
vmove usr/share/man/man3
vmove ${_prefix}/lib/postgresql/pgxs
for f in libpq.so libpgtypes.so libecpg_compat.so libecpg.so; do