From 3680c424dbf021d1aaf7d7c3d4e0895d64da71a5 Mon Sep 17 00:00:00 2001 From: Piotr Wójcik Date: Sat, 29 May 2021 19:43:09 +0200 Subject: hooks/prepare-32bit: create packages from all *-devel All *-devel dependencies of 32bit packages are replaced with *-devel-32bit. Missing dependencies made some uninstallable. --- common/hooks/pre-pkg/05-prepare-32bit.sh | 11 +++++++++-- common/hooks/pre-pkg/99-pkglint.sh | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/common/hooks/pre-pkg/05-prepare-32bit.sh b/common/hooks/pre-pkg/05-prepare-32bit.sh index 9aa6cae7dc7..d0e0565babd 100644 --- a/common/hooks/pre-pkg/05-prepare-32bit.sh +++ b/common/hooks/pre-pkg/05-prepare-32bit.sh @@ -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 diff --git a/common/hooks/pre-pkg/99-pkglint.sh b/common/hooks/pre-pkg/99-pkglint.sh index ada06c485ea..ea73c961ec5 100644 --- a/common/hooks/pre-pkg/99-pkglint.sh +++ b/common/hooks/pre-pkg/99-pkglint.sh @@ -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 -- cgit v1.2.3