Can any one take the time to give me a small TuT on how to understand this please
I would like to install this
CMake is designed for the build process to be done in a separate
directory. The simplest way to compile this plugin is:
`cd’ to the directory containing the source code.
`mkdir build && cd build’ to create a location for building.
`cmake -DCMAKE_INSTALL_PREFIX=/usr …’ to configure the sources.
There are more options you can pass to cmake, see below for details.
`make’ to compile the plugin. This will also rerun cmake for you if
any CMakeLists.txt files have changed.
`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
why you want to build it from source when it’s available in repos?
just to learn?
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
gcc, and then install the binaries to their designated locations in the UNIX directory hierarchy.
Can u give me simple steps ? I dont understand all this
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.
Look at the
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.
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)
That is one way of creating a source code package, but it’s not applicable to a common
.tar.bz2 archive ─ which we call tarballs in UNIX jargon.
Tarballs usually make use of a
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,
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.
Things are becoming more clear to me now
tarballs of program sources… a tarball is just an archive… so it can be everything… even the executable program itself
Of course, but I’m trying to stick to the topic at hand. We’re talking about compiling software from sources.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.