Need To Understand how to Install and Build tar.bz2

Can any one take the time to give me a small TuT on how to understand this please

I would like to install this

xfce4-whiskermenu-plugin-2.4.6.tar.bz2

CMake is designed for the build process to be done in a separate
directory. The simplest way to compile this plugin is:

  1. `cd’ to the directory containing the source code.

  2. `mkdir build && cd build’ to create a location for building.

  3. `cmake -DCMAKE_INSTALL_PREFIX=/usr …’ to configure the sources.
    There are more options you can pass to cmake, see below for details.

  4. `make’ to compile the plugin. This will also rerun cmake for you if
    any CMakeLists.txt files have changed.

  5. `make install’ to install the plugin. This has to be done with root
    privileges if installing to system directories, but the rest of the
    build should be done with regular user privileges.

    For packaging you can optionally install the plugin into a temporary
    directory instead of the system directories by providing a DESTDIR
    variable. For example, `make install DESTDIR=alternate/directory’
    will prepend ‘alternate/directory’ before all installation names.

I Just cant understand any of this
it will help me if some one takes some time to tell me the steps for a newcomer
many thanks

why you want to build it from source when it’s available in repos?
just to learn?

1 Like

just to learn?

yes please

you can look at the arch PKGBUILD to see how they build it…
but they use ninja instead of make.

The process uses so-called Makefiles, which are scripts to help build and link the source code into binaries by way of existing tools on the system, such as cmake, GNU make and gcc, and then install the binaries to their designated locations in the UNIX directory hierarchy.

@scachemaille

Can u give me simple steps ? I dont understand all this :slight_smile:

I’m sorry… but there is no way to answer this in a simple way… you will need to learn and understand how to build program…
cmake is a make system… then it can read and understand makefiles. that is files that explain how to build source to binaries with options etc. then link the differentes binaries in a executable files with libraries etc…
the build() part is actually where the progran is built.
the package() part is the part it "takes the result of the build and “install” it int the system.

2 Likes

Look at the man pages… :arrow_down:

man make
man cmake
man gcc
man ld
3 Likes

Ok Thank u

Thank u

1 Like

Does this Look Right ?

I Found this

it explain the PKGBUILD and the tools used by arch to create package… it won’t explain the “build” process or how works cmake, make, etc… it will explain you how to create package for arch and manjaro.

1 Like

Thank u

I was searching around for some old project where I used a Makefile and found one

There you can see what Makefile is, and also a pretty standard use of one for install.

(PS I havent looked at that theme in a while … it is only supposed to be an example)

3 Likes

That is one way of creating a source code package, but it’s not applicable to a common .tar.gz or .tar.bz2 archive ─ which we call tarballs in UNIX jargon.

Tarballs usually make use of a Makefile. The PKGBUILD method with makepkg is a more modern and automated way of building, and it does not install the compiled software into their respective directories, but instead, it builds the software into a binary package that can then be installed with the distro’s package manager ─ in Manjaro’s case, pacman.

A tarball in turn is more universal, intended to be used on as wide a variety of UNIX systems as possible, and usually ─ there are exceptions ─ does not include a way for uninstalling the software that you built this way.

2 Likes

Thank u so much :slightly_smiling_face:

Thank u

Things are becoming more clear to me now

Thanks

1 Like

tarballs of program sources… a tarball is just an archive… so it can be everything… even the executable program itself :wink:

2 Likes

Of course, but I’m trying to stick to the topic at hand. We’re talking about compiling software from sources. :wink:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.