[aur-general] PKGBUILD for multiple packages: some examples?

Gordian Edenhofer gordian.edenhofer at gmail.com
Sat Mar 28 10:13:17 UTC 2015

If I understand you correctly then what you want is to download
multiple sources and compile them separately as if they would be
separate packages. This can be done by adding each and every
source-file to the source array in one PKGBUILD and compile them in
build, like this:
build() {
  cd "$srcdir/$pkgname-PART-ONE"
  ./configure --whatever

  cd "$srcdir/$pkgname-PART-TWO"
  ./configure --whatever

now you just have to adjust the package() function accordingly and you
are done. There is no special PKGBUILD-function. Everything common
function/command is listed in
https://wiki.archlinux.org/index.php/PKGBUILD , there is nothing more
and nothing less.

On Sat, Mar 28, 2015 at 11:05 AM, Giovanni Santini
<giovannisantini93 at yahoo.it> wrote:
>> Il 28/mar/2015 10:22 AM Gordian Edenhofer <gordian.edenhofer at gmail.com> ha scritto:
>> >
>> > Dear Giovanni,
>> >
>> > I would recomment you two great articles on building custom packages
>> > for the AUR. The first one concerenes how a PKGBUILD works:
>> > https://wiki.archlinux.org/index.php/PKGBUILD . It will give you an
>> > idea of what is needed and how it is done. The second one concentrates
>> > on really building an AUR-ready src-file:
>> > https://wiki.archlinux.org/index.php/Creating_packages .
>> > They are both rather easy to read and should give you an overall idea
>> > of what to expect.
>> > If you question however was whether there are already packages with
>> > that source in the AUR, then you might be better of just searching the
>> > AUR git repo, which is hosted here:
>> > http://pkgbuild.com/git/aur-mirror.git/ , refer to
>> > https://wiki.archlinux.org/index.php/Arch_User_Repository#Git_repository
>> > for more info on how to fetch that repo and possibly search in it.
>> >
>> > I hope I could help you.
>> >
>> > Best regards,
>> > Gordian
>> >
> Many thanks Gordian for the tip, I already know (somehow) how to write a PKGBUILD.
> I was asking if it's possible to add multiple package builds (in this case, the main program and the various solvers) in just one PKGBUILD and, if that's possible, how to do it.
> As PKGBUILDs have a Bash-like syntax, I suppose there's something like a "function" (Bash ones, I mean) in order to have different packages.
> Giovanni Santini
> ---
> Coding stuff: https://github.com/ItachiSan

More information about the aur-general mailing list