How to compile a package from source?

I am trying to learn how to compile a package from source and I have been unsuccessful so far.

I am downloading my package from here:

I get a .zip file which I unzip and find some different files, but no installation instructions.

How do I compile this package from source?

Install yay if you don’t have it:

sudo pacman -Sy yay
yay -S exodus

Skip editing files if prompt.

Or just use… :arrow_down:

pamac build exodus


1 Like

The archive pulled for creating that package seems to contain the application already compiled.

If you are interested in compiling an application from code, you should rather look for -git AUR packages, those usually having open source code. Then, first try simply compiling the code – this will give you a compiled application – before looking for how to package that application.

1 Like

Yes, I know that I can get it from the AUR.

But I want to learn how to build package from source directly from the developers page.

So what are the steps to install this specific package that I got from exodus website?

You can usually look at the PKGBUILD in the AUR to see how that package does it. It’ll show every step in the process. I’d still recommend doing it with makepkg either way, since you’ll get a package that’s managed by pacman, rather than just files scattered wherever the app makers felt appropriate (usually /usr/local. Usually).

This app in particular doesn’t seem to provide the source, so you won’t likely be able to compile this one yourself.

This BIN package. Not compillled. :stuck_out_tongue: See details in PKGBUILD.

Where’s the source? It appears they do not provide it.

It’s just an Electron application, so it would normally be built with NPM or Yarn and Electron Builder.

The devs only provide a .deb pakage and .zip package. what is the latter for than if you cant install it from that .zip package?

The AUR package uses the .zip package they provide
to install the application.

The .deb contains the same,
just packaged a little differently, especially for use with Debian based systems and directly installable there.

Neither of the two contain the source the application is built from.
They just don’t provide it.

For most packages, you would do a

sudo make install

But for Arch-based distros you mostly don’t need that and the AUR already has all applications. (I’ve yet to find something I need that is not in the AUR.)

However, your linked application is not open source ( so it’s not possible to compile from source.

If its not open source, how does it get built from source when I take it from AUR then?

It isn’t being compiled from source, it’s being extracted from a zip file and moved to the relevant directories.

alright I see now. And PKGBUILD gives exact directories where the files should be put?

That is what a PKGBUILD is - a description of what to do, how to do it and where to put stuff.

It contains all the relevant information (the steps taken) to install the software - whether it is by
unpacking a .zip file containing the pre-built software
(as is the case here)
unpacking a .deb file containing the pre-built software
unpacking a .rpm file containing the pre-built software
or building and installing it from source.

1 Like