You are not logged in.

#1 2015-03-07 09:31:25

JJK
Member
Registered: 2013-10-24
Posts: 56

creating a multiarch pkgbuild

Hey archers,

I just created my first pkgbuild (sonic3d) for some kind of fanmade sonic game. I submitted it to the AUR.

Currently this pkgbuild only supports x86_64. I also have a pkgbuild for i686. I would like to merge them into one.

How would i go about doing that? Is there some kind of variable which I can use to determine what kind of architecture the pkgbuild is running on?

The pkgbuild would need to update the sources and md5sums according to the download for that specific architecture.

I will add the pkgbuilds to this post. Please feel free to give me suggestions or to be critical.

ps.

The sources look a bit strange because they are not hosted in a repo. They are actually .deb files.

x86_64 pkgbuild:

# Maintainer: Jan-Jaap Korpershoek (JJK) <jjkorpershoek96@gmail.com> 
pkgname=sonic3d
pkgver=0.3
pkgrel=1
pkgdesc="3D fan game starring Sonic the Hedgehog on EDuke32 engine"
arch=(x86_64)
url="http://www.indiedb.com/games/sonic-the-hedgehog-3d"
license=('GPL')
depends=(libvpx libpng12 sdl_mixer)
optdepends=(timidity++)
conflicts=()
replaces=()
backup=()
options=()
noextract=()
#source=("sonic3d_0.3_amd64.deb")
source=("http://www.indiedb.com/downloads/mirror/53313/107/02419bfb40ba8585ce7c38c608058186")
#http://www.indiedb.com/downloads/mirror/53311/102/5906f387f6f687639eaae117c53ecec0
md5sums=(85263704c023a8de04a2c1a81d3131dd)

package() {
	cd "$srcdir"
	tar xvzf data.tar.gz -C $pkgdir
	install -d $pkgdir/usr/bin/
	install $pkgdir/usr/games/* $pkgdir/usr/bin
	rm -r $pkgdir/usr/games
}

i686 pkgbuild:

# Maintainer: Jan-Jaap Korpershoek (JJK) <jjkorpershoek96@gmail.com> 
pkgname=sonic3d
pkgver=0.3
pkgrel=1
pkgdesc="3D fan game starring Sonic the Hedgehog on EDuke32 engine"
arch=(i386)
url="http://www.indiedb.com/games/sonic-the-hedgehog-3d"
license=('GPL')
depends=(libvpx libpng12 sdl_mixer)
optdepends=(timidity++)
conflicts=()
replaces=()
backup=()
options=()
noextract=()
#source=("sonic3d_0.3_i386.deb")
source=("http://www.indiedb.com/downloads/mirror/53311/102/5906f387f6f687639eaae117c53ecec0")
md5sums=(d5176fec59c7386a6e181abaacba7d6e)

package() {
	cd "$srcdir"
	tar xvzf data.tar.gz -C $pkgdir
	install -d $pkgdir/usr/bin/
	install $pkgdir/usr/games/* $pkgdir/usr/bin
	rm -r $pkgdir/usr/games
}

Offline

#2 2015-03-07 09:38:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: creating a multiarch pkgbuild

The arch array will allow with source_xxx and sums_xxx, see: http://allanmcrae.com/2014/12/pacman-4-2-released

Or you can go old school, see mprime-bin in the AUR.

Offline

#3 2015-03-07 15:21:14

JJK
Member
Registered: 2013-10-24
Posts: 56

Re: creating a multiarch pkgbuild

Thats the solution, thank you. Is this somewhere in the arch wiki? Because I cloudn't find it.

Last edited by JJK (2015-03-07 15:22:04)

Offline

#4 2015-03-07 15:26:08

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: creating a multiarch pkgbuild

Offline

Board footer

Powered by FluxBB