You are not logged in.

#1 2024-08-14 18:48:53

iamthecoolestguyonearth
Member
Registered: 2022-07-08
Posts: 7

compile pacman packages manually

Hi,

I wanna try to build a arch system for risc-v. As gentoo uses emerge with python which is bloated, arch would be better with pacman in c.

I just need the rootfs compiled to risc-v and am courious to know: as arch build servers auto build packages. where is the build script for pulling the source and compiling the package ? For then the mirrors to receive.

I have found out the package filesystem is the one needed + ofc a init & bootloader etc etc.

Offline

#2 2024-08-14 18:55:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: compile pacman packages manually

iamthecoolestguyonearth wrote:

... as arch build servers auto build packages

No, they don't.  Packagers build packages.

iamthecoolestguyonearth wrote:

... where is the build script for pulling the source and compiling the package

That's the PKGBUILD.  They're all here.

Though it sounds like you haven't familiarized yourself with the information already in our wiki, so start there reading about the arch build system, makepkg, and PKGBUILDs.

But note that I'd not have much expectation for any package to just build as-is for a risc-v system, you're going to need to be editing along the way removing irrelevant patches and adding needed ones (writing some as needed too).

Last edited by Trilby (2024-08-14 19:01:16)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2024-08-14 19:06:38

iamthecoolestguyonearth
Member
Registered: 2022-07-08
Posts: 7

Re: compile pacman packages manually

iamthecoolestguyonearth wrote:

That's the PKGBUILD.

all maintainers have a build script with the source url, compiler version; flags etc just like ebuilds on gentoo.

That's the only thing I am interested in. Don't arch have that?

Example of the package Tuxcart and what the ebuild looks like what dependecies, compiler flags etc.
https://gitweb.gentoo.org/repo/gentoo.g … -r1.ebuild

Last edited by iamthecoolestguyonearth (2024-08-14 19:18:50)

Offline

#4 2024-08-14 19:13:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: compile pacman packages manually

iamthecoolestguyonearth wrote:

Don't arch have that?

Did you read my post ... at all?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2024-08-23 20:02:06

iamthecoolestguyonearth
Member
Registered: 2022-07-08
Posts: 7

Re: compile pacman packages manually

I have now (after reading the wiki) managed to compile the packages. Is it possible for makepkg to temporarily build for another architecture, with custom flags and compiler parameters, switch back since i also use makepkg for aur?

Offline

#6 2024-08-23 20:57:29

seth
Member
Registered: 2012-09-03
Posts: 58,659

Re: compile pacman packages manually

You mean like almost use a completely different --config file for a single build?
Maybe. https://man.archlinux.org/man/core/pacm … en#OPTIONS

You're probably also interested in
https://wiki.archlinux.org/title/Cross- … guidelines
https://wiki.archlinux.org/title/Distcc … ith_distcc

Offline

#7 2024-08-23 21:05:04

iamthecoolestguyonearth
Member
Registered: 2022-07-08
Posts: 7

Re: compile pacman packages manually

Thank you.

The idea was to have a script to build everything from pacman and filesystem to grub and make a whole image ready to be pushed. But since the device usually is resource starving a stronger arch pc would build and through a custom repo and local mirror the packages will be pushed to the device.

is it possible to have 1 script with a lot of packages and custom flags and even custom compiler options per package rather than a config per package?

Offline

#8 2024-08-23 21:41:19

seth
Member
Registered: 2012-09-03
Posts: 58,659

Re: compile pacman packages manually

Well… yes - you can you a custom makepkg config per pacakge and even replace the buildscript (-p myriscpkgbuild instead of PKGBUILD)
You should really read the manpages.

Offline

#9 2024-08-24 00:02:11

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,472
Website

Re: compile pacman packages manually

You could also save yourself a lot of time and just use the risc-v port...   https://archriscv.felixc.at/

Also worth looking at using QEMU on your more powerful PC to compile for risc-v.  Success may vary....

Offline

Board footer

Powered by FluxBB