From 4c50446d172e24c7fa7d219dc4f8274c261ca00e Mon Sep 17 00:00:00 2001 From: git-bruh Date: Tue, 27 Apr 2021 12:45:54 +0530 Subject: [PATCH] multilib: refactor kiss hook outside README --- multilib/README.md | 51 ++++++---------------------------------------- multilib/kiss-hook | 41 +++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 45 deletions(-) create mode 100755 multilib/kiss-hook diff --git a/multilib/README.md b/multilib/README.md index 3083e8ca1..9bf629d86 100644 --- a/multilib/README.md +++ b/multilib/README.md @@ -28,52 +28,9 @@ for pkg in $(kiss search "lib32-*" | grep multilib); do done ``` -* Set up a `KISS_HOOK` to remove unwanted stuff from 32-bit packages: -```sh -#!/bin/sh -e - -case "$TYPE" in - pre-build) - export _CC="${CC:-cc}" - export _CXX="${CXX:-c++}" - export _PKG_CONFIG_PATH="$PKG_CONFIG_PATH" - - case "$PKG" in - lib32-*) - export CC="gcc -m32" - export CXX="g++ -m32" - export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" - ;; - esac - ;; - - post-build) - : "${DEST:?DEST is unset}" - - export CC="$_CC" - export CXX="$_CXX" - export PKG_CONFIG_PATH="$_PKG_CONFIG_PATH" - - case "$PKG" in - lib32-glibc) ;; - lib32-*) - rm -rf "$3/etc" \ - "$3/usr/bin" \ - "$3/usr/include" \ - "$3/usr/share" - ;; - esac - - # Default package manager hook. - rm -rf "$3/usr/share/gettext" \ - "$3/usr/share/polkit-1" \ - "$3/usr/share/locale" \ - "$3/usr/share/info" - ;; -esac -``` +* Set a `KISS_HOOK` to remove unwanted stuff from 32-bit packages: -`export KISS_HOOK=/path/to/hook` +`export KISS_HOOK=/path/to/grepo/multilib/kiss-hook` * In order to run graphical applications, one of either `lib32-nvidia` or `lib32-mesa` must be installed, depending upon the graphics card present in the system. @@ -104,3 +61,7 @@ ln -sf ../cert.pem ca-certificates.crt kiss b gtar && kiss i gtar kiss a gtar /usr/bin/tar ``` + +* Some games require `pulseaudio`: + +`kiss b pulseaudio && kiss i pulseaudio # From 'gcommunity'` diff --git a/multilib/kiss-hook b/multilib/kiss-hook new file mode 100755 index 000000000..463ec7f2c --- /dev/null +++ b/multilib/kiss-hook @@ -0,0 +1,41 @@ +#!/bin/sh -e + +case "$TYPE" in + pre-build) + export _CC="${CC:-cc}" + export _CXX="${CXX:-c++}" + export _PKG_CONFIG_PATH="$PKG_CONFIG_PATH" + + case "$PKG" in + lib32-*) + export CC="gcc -m32" + export CXX="g++ -m32" + export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" + ;; + esac + ;; + + post-build) + : "${DEST:?DEST is unset}" + + export CC="$_CC" + export CXX="$_CXX" + export PKG_CONFIG_PATH="$_PKG_CONFIG_PATH" + + case "$PKG" in + lib32-glibc) ;; + lib32-*) + rm -rf "$3/etc" \ + "$3/usr/bin" \ + "$3/usr/include" \ + "$3/usr/share" + ;; + esac + + # Default package manager hook. + rm -rf "$3/usr/share/gettext" \ + "$3/usr/share/polkit-1" \ + "$3/usr/share/locale" \ + "$3/usr/share/info" + ;; +esac