You are not logged in.

#1 2015-06-17 07:45:08

Nyutag
Member
Registered: 2012-07-19
Posts: 18

[SOLVED] .SRCINFO file and multiarch PKGBUILD/package

Is it a bad practice to have one PKGBUILD/package for x86 and x86_64 when they have not the same source?

Exemple:

# Maintainer: Tanguy ALEXIS <tanguy@metatux.fr>
# Contributer: Shaun Hammill <plloi.pllex@gmail.com>
# Contributer: Travis Lyons <travis.lyons@gmail.com>

pkgname=magicassistant-gtk
pkgver=1.4.2.001
pkgrel=1
pkgdesc="Card Browser, Library Organizer, Deck Builder and Tournament Manager for Magic the Gathering Card Game"
arch=(i686 x86_64)
url="http://sourceforge.net/projects/mtgbrowser/"
license=('EPL')
depends=(gtk2 'java-runtime>=8' unzip libwebkit)
source=('source')
md5sums=('md5sums')

if test "$CARCH" == "x86_64"; then
  source=(http://downloads.sourceforge.net/project/mtgbrowser/Magic_Assistant/${pkgver}/magicassistant-${pkgver}-linux.gtk.x86_64.zip magicassistant.desktop)
  md5sums=('ae780a748d2d245b2f3220694cec5986'
           '37f143dbb28032d4fcc7a0a6e4e7f239')
fi

if test "$CARCH" == "i686"; then
  source=(http://downloads.sourceforge.net/project/mtgbrowser/Magic_Assistant/${pkgver}/magicassistant-${pkgver}-linux.gtk.x86.zip magicassistant.desktop)
  md5sums=('cb0e8e8fb8bf3f37326432302954fecf'
           '37f143dbb28032d4fcc7a0a6e4e7f239')
fi

package() {
    msg "Installing..."
    install -d "$pkgdir"/{/usr/bin,/opt,/usr/share/applications}
    install -m644 $srcdir/magicassistant.desktop $pkgdir/usr/share/applications/magicassistant.desktop
    mv $srcdir/MagicAssistant $pkgdir/opt
    msg "Link to bin..."
    ln -s /opt/MagicAssistant/magicassistant $pkgdir/usr/bin/magicassistant
    msg2 "Done!"
}

This work but not with mksrcinfo even if I skip the integrity check, because it will check for a "source" file instead of the actual source.

So, is there any way to deal with this or I just have to split this in two package? Sorry if this has been answered before, can't find it.

Last edited by Nyutag (2015-06-17 07:55:24)

Offline

#2 2015-06-17 07:53:22

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,649
Website

Re: [SOLVED] .SRCINFO file and multiarch PKGBUILD/package

Read 'man PKGBUILD', particularly the section about the source array and how you can specify architecture-specific sources. Look into the corresponding *sum arrays too. Lose the bash conditionals outside the build/package functions.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2015-06-17 07:55:13

Nyutag
Member
Registered: 2012-07-19
Posts: 18

Re: [SOLVED] .SRCINFO file and multiarch PKGBUILD/package

TIL

Thanks!

Offline

Board footer

Powered by FluxBB