hooks/prepare-32bit: create packages from all *-devel

All *-devel dependencies of 32bit packages are replaced
with *-devel-32bit. Missing dependencies made some
uninstallable.
This commit is contained in:
Piotr Wójcik 2021-05-29 19:43:09 +02:00 committed by Piotr
parent 788458ffb5
commit 3680c424db
2 changed files with 12 additions and 5 deletions

View File

@ -24,11 +24,15 @@ hook() {
# Library mode, copy only relevant files to new destdir.
#
# If /usr/lib does not exist don't continue...
if [ ! -d ${PKGDESTDIR}/usr/lib ]; then
# except for devel packages, for which empty 32bit package will be created
if ! [ -d ${PKGDESTDIR}/usr/lib ] && ! [[ ${pkgname} == *-devel ]]; then
return
fi
mkdir -p ${destdir32}/usr/lib32
cp -a ${PKGDESTDIR}/usr/lib/* ${destdir32}/usr/lib32
if [ -d ${PKGDESTDIR}/usr/lib ]; then
cp -a ${PKGDESTDIR}/usr/lib/* ${destdir32}/usr/lib32
fi
# Only keep shared libs, static libs, and pkg-config files.
find "${destdir32}" -not \( \
@ -67,6 +71,9 @@ hook() {
mv ${destdir32}/usr/lib ${destdir32}/usr/lib32
fi
fi
if [[ ${pkgname} == *-devel ]]; then
mkdir -p ${destdir32}
fi
if [ ! -d ${destdir32} ]; then
return
fi

View File

@ -21,7 +21,7 @@ hook() {
error=1
fi
done
for f in var/run usr/local; do
if [ -d ${PKGDESTDIR}/${f} ]; then
msg_red "${pkgver}: /${f} directory is not allowed, remove it!\n"
@ -54,8 +54,8 @@ hook() {
esac
done
# Forbid empty packages unless build_style=meta
if [ "$build_style" != meta -a "$emptypkg" != no ]; then
# Forbid empty packages unless build_style=meta or it is 32bit devel package
if [ "$build_style" != meta ] && [ "$emptypkg" != no ] && [[ ${pkgname} != *-devel-32bit ]]; then
msg_red "${pkgver}: PKGDESTDIR is empty and build_style != meta\n"
error=1
fi