[aur-general] [AUR4] Single binary package for different architectures
Ido Rosen
ido at kernel.org
Sat Jun 13 18:36:56 UTC 2015
On Sat, Jun 13, 2015 at 2:31 PM, Rudy Matela <rudy at matela.com.br> wrote:
> Hello,
>
> I am importing a PKGBUILD for something that has only a binary release.
> More specifically, a binary release for i686 and another for x86_64.
>
> In the old AUR, I was packaging it using an if clause to choose which
> release to download depending on the architecture -- this way, I can
> have a single package for both architectures. More or less like this:
>
> if [ ${CARCH} = 'x86_64' ]; then
> source=("http://example.com/release-${pkgver}-x86_64.tar.gz")
> md5sums=('00112233445566778899aabbccddeeff')
> else
> source=("http://example.com/release-${pkgver}-i386.tar.gz")
> md5sums=('ffeeddccbbaa99887766554433221100')
> fi
>
> Running mksrcinfo fails with the error:
>
> /path/PKGBUILD: line XX: [: =: unary operator expected
>
> "line XX" points to the line containing the if.
>
>
> Are there some guildelines for packaging something like this?
> How could I make mksrcinfo work?
> Is there any way to generate the .SRCINFO file manually to conform to
> the dual-binary release described above?
>
> (or... should I not be doing this at all?)
pacman 4.2 introduces source_${CARCH} and *sum_${CARCH} variables.
See also:
https://wiki.archlinux.org/index.php/PKGBUILD#source
>
> --
> Rudy
More information about the aur-general
mailing list