diff options
author | B. Watson <yalhcru@gmail.com> | 2022-03-22 16:36:18 -0400 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-03-26 01:20:09 +0700 |
commit | 7c0ed7b6a864bfe02ee14e33f12b3b1e7211ad1a (patch) | |
tree | ba4473c3ed78bec9385f088a67483555b4751c19 /audio/google-musicmanager | |
parent | e48d132d7ec51d2b51b3bf35deb1d22538c5d2e4 (diff) | |
download | slackbuilds-7c0ed7b6a864bfe02ee14e33f12b3b1e7211ad1a.tar.gz |
audio/google-musicmanager: Fix 32-bit build.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio/google-musicmanager')
-rw-r--r-- | audio/google-musicmanager/google-musicmanager.SlackBuild | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/audio/google-musicmanager/google-musicmanager.SlackBuild b/audio/google-musicmanager/google-musicmanager.SlackBuild index e9195facce..8aca2a30f2 100644 --- a/audio/google-musicmanager/google-musicmanager.SlackBuild +++ b/audio/google-musicmanager/google-musicmanager.SlackBuild @@ -27,6 +27,8 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# 20220322 bkw: Modified by SlackBuilds.org: fix 32-bit build. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=google-musicmanager @@ -35,9 +37,21 @@ BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} -case "$(uname -m)" in - i?86) DEBARCH="i386" ; LIBDIRSUFFIX="" ; ARCH=i386 ;; - x86_64) DEBARCH="amd64" ; LIBDIRSUFFIX="64" ; ARCH=x86_64 ;; +# 20220322 bkw: changed this stuff to allow building a 32-bit package +# on x86_64 with 'export ARCH=i586', or build a 64-bit package on +# 32-bit with 'export ARCH=x86_64'. Please leave it this way; it makes +# testing ever so much simpler. +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +case "$ARCH" in + i?86) DEBARCH="i386" ; LIBDIRSUFFIX="" ;; + x86_64) DEBARCH="amd64" ; LIBDIRSUFFIX="64" ;; *) echo "Package for $(uname -m) architecture is not available." ; exit 1 ;; esac @@ -71,7 +85,14 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $PKG -ar p $CWD/$PRGNAM-${RELEASE}_current_${DEBARCH}.deb data.tar.xz | tar xvJ + +# 20220322 bkw: 32-bit .deb has lzma compression, not xz. Handle either. +DEB=$CWD/$PRGNAM-${RELEASE}_current_${DEBARCH}.deb +for i in lzma xz; do + ar -t "$DEB" | fgrep -q data.tar.$i && COMP=$i +done + +ar p $DEB data.tar.$COMP | $COMP -d | tar xv # 20220218 bkw: absolute path symlink in deb, no good. rm -f usr/bin/$PRGNAM |