hooks/prepare-32bit: introduce lib32symlinks.

- This creates a symlink of a file stored in usr/lib32 to usr/lib.
- This expects basename of files stored in usr/lib32.
- This is required by an upcoming change to the glibc pkg.
This commit is contained in:
Juan RP 2015-01-28 16:29:45 +01:00
parent 6a5dd73ea4
commit d104a99fa0
2 changed files with 8 additions and 1 deletions

View File

@ -12,7 +12,7 @@ unset -v nostrip nostrip_files shlib_requires
unset -v noverifyrdeps allow_unknown_shlibs shlib_provides unset -v noverifyrdeps allow_unknown_shlibs shlib_provides
# hooks/post-install/06-prepare-32bit # hooks/post-install/06-prepare-32bit
unset -v lib32depends lib32disabled lib32files lib32mode unset -v lib32depends lib32disabled lib32files lib32mode lib32symlinks
# xbps-triggers: system-accounts # xbps-triggers: system-accounts
unset -v system_accounts system_groups unset -v system_accounts system_groups

View File

@ -4,6 +4,7 @@
# - lib32depends: if set, 32bit pkg will use this rather than "depends". # - lib32depends: if set, 32bit pkg will use this rather than "depends".
# - lib32disabled: if set, no 32bit pkg will be created. # - lib32disabled: if set, no 32bit pkg will be created.
# - lib32files: additional files to add to the 32bit pkg (abs paths, separated by blanks). # - lib32files: additional files to add to the 32bit pkg (abs paths, separated by blanks).
# - lib32symlinks: makes a symlink from lib32 to lib of the specified file (basename).
# - lib32mode: # - lib32mode:
# * if unset only files for libraries will be copied. # * if unset only files for libraries will be copied.
# * if set to "full" all files will be copied. # * if set to "full" all files will be copied.
@ -160,6 +161,12 @@ hook() {
mkdir -p ${_targetdir/\/usr\/lib/\/usr\/lib32} mkdir -p ${_targetdir/\/usr\/lib/\/usr\/lib32}
cp -a ${PKGDESTDIR}/${f} ${_targetdir/\/usr\/lib/\/usr\/lib32} cp -a ${PKGDESTDIR}/${f} ${_targetdir/\/usr\/lib/\/usr\/lib32}
done done
# Additional symlinks to the native libdir.
for f in ${lib32symlinks}; do
echo "$pkgver: symlinking $f to the native libdir..."
mkdir -p ${destdir32}/usr/lib{,32}
ln -sfr ${destdir32}/usr/lib32/$f ${destdir32}/usr/lib/$f
done
# If it's a development pkg add a dependency to the 64bit pkg. # If it's a development pkg add a dependency to the 64bit pkg.
if [[ $pkgname =~ '-devel' ]]; then if [[ $pkgname =~ '-devel' ]]; then
echo " RDEP: ${pkgver}" echo " RDEP: ${pkgver}"