[aur-general] [RFC] command in PKGBUILD to select archlinux mirror to download from

Rafael Ferreira rafael.f.f1 at gmail.com
Thu Feb 5 17:25:46 UTC 2015

2015-02-05 14:52 GMT-02:00 Martti Kühne <mysatyre at gmail.com>:
> We all started with bash at some point. Use quotes for all these
> lines, and don't use backticks but the more convenient bourne $().
> _srcurl="$(grep -m 1 "^Server" /etc/pacman.d/mirrorlist)"
> _srcurl="${_srcurl#*= }"
> _srcurl="${_srcurl/\/\$repo\/os\/\$arch/}"

Thanks for the bash suggestions!

> Now, I'm nost sure why you have to download anything from arch's
> mirrors in a PKGBUILD. It feels like it doesn't belong into something
> that would potentially be delivered from there, and the question hence
> it seems a bit off.... If you need multilib packages, just put them
> into the depends=() array?
> cheers!
> mar77i

The reason for that is: some of the lib32 PKGBUILDS in AUR aren't set
to build from source, mostly, if not all of them, because simply won't
build 32bit in 64bit system. So, the PKGBUILD gets the 32bit package
from Arch's repository to install in /usr/lib32.

Also, in lib32-pam's case, the source array uses the tarball
"pam_unix2-2.9.1.tar.bz2" stored in Arch repository, just like ''pam'

So, as you might notice, it is not simply a matter of multilib
packages in depends array, but the need for fetching 32bit packages or
tarballs as source for build the desired lib32 package.


More information about the aur-general mailing list