Building RPM packages from GIT

Checking out the sources

For initially checking out the sources you will need some disk space (about 25 megabytes) in a directory of your choice, the git package of your favorite distribution and full access to the Internet. If you get error messages about rejected connections you either have typed something wrong or your provider doesn't give you full access. A good place for the source files will be "$HOME/src".

  1. First create the directory that will receive the subdirectory with Kwave sources and change into it:

    % mkdir -p $HOME/src
    % cd $HOME/src

  2. Then check out the latest sources from the GIT server:

    % git clone git:// kwave

    or you can check out a specific release with the following commands:

        % git clone git:// kwave
        % cd kwave
        % git checkout tags/[release-tag] 

    You can look up the names of the release tags in the git web page at The release tags are always built out of the word Release- and the version number of the release, with underscores instead of dots. For example "Release-0_9_3" for v0.9.3.


There must not be a directory named kwave under the directory you want to check out. Otherwise the git program will complain about already existing files and the checkout will not work.

Updating fresh sources from GIT

The procedure described in the previous section is only necessary once. For further updates it is much easier. Just change into the directory where you have the checked out sources and do the following to update to the latest version:

% git pull

Then go on to the next section and compile as usual.


If you think that you have messed up your local source tree or if there are conflicts during updating and you want to start through from a clean state, you can do the following to discard all local changes and switch back to the latest version from the master branch:

% git clean --force -d
% git reset --hard
% git checkout master


Building rpm package from a GIT snapshot is quite simple. The procedure is nearly the same as described in the last section, so it unhappily also has the same problem with the rpmbuild -ta command our method internally uses. Like in the previous chapter, [arch] stands for the platform you have built the package and might be something like i386, i586, sparc or whatever, XXX stands for the version number you have checked out.


Note for SuSE users: here you have to specify the directory /usr/src/packages instead of /usr/src/redhat too!

Assuming that you are in the root of where you checked out from GIT, do the following to create a Makefile, the Kwave package and install it. If you already have a version of Kwave installed, please remove it first or use rpm -U instead of rpm -i for updating instead of installing.

% mkdir /tmp/kwave-build
% cd /tmp/kwave-build
% cmake $HOME/src/kwave
% make rpm
% rpm -ivh /usr/src/redhat/BUILD/[arch]/kwave-XXX.[arch].rpm


If you still have problems with make rpm, you will find the tar.bz2 archive that was produced in /tmp. Please follow the instructions in the previous chapter.