Building RPM packages from Sources

If you are running a system with RPM support, the preferred way to get Kwave on your system will be the creation and installation of a RPM package, as described in the next chapters. If you are running a Debian like system (dpkg based), you should skip to [here].

Finding the RPM settings of your system

You can find out the RPM top directory with the following command:

% rpm --eval '%_topdir'

With this command you can find out your native system architecture:

% rpm --eval '%_arch'

Building a RPM package from a source tree

Assuming you have checked out git sources of Kwave, and you have successfully passed the cmake stage, you have two possibilities to get a binary RPM package:

  1. Create a tarball with the command "make tarball" and then continue in the next section.

  2. Directly create a RPM package with the command "make rpm" (which is the quicker way) and then advance to the section about installation of the RPM package.

Building a RPM package with working rpmbuild -ta

Assuming you have a tar.bz2 archive of Kwave, you can create a RPM package just by doing the steps in this section (where [arch] stands for the platform you have built the package and might be something like x86_64, i686, sparc or whatever, [topdir] stands for the RPM top directory, and [version] stands for the version number).

You can build the Kwave package with this command:

% rpmbuild -ta kwave-[version].tar.bz2

If you haven't seen any errors, then that's it - you can skip the next section and install the package. If rpm was unable to build the packages and says something like "spec file not found", then please continue with the next section.

Building a RPM package with broken rpmbuild -ta support

If you cannot get rpmbuild -ta working, here are the steps for making that manually (the hard way):

  1. Go to your RPM "topdir".

    % cd [topdir]
    

  2. Put the tar.bz2 archive into the SOURCES subdirectory (you have to replace "somewhere" with the real directory where the files are, of course).

    % cp /somewhere/kwave-[version].tar.bz2 SOURCES
    

  3. Extract the spec file from the archives and put it into the SPEC subdirectory.

    % tar --wildcards -xOjf SOURCES/kwave-[version].tar.bz2 \*.spec > SPECS/kwave.spec
    

  4. Let rpm do the compile job and generate the rpm of Kwave. If you only want to make a binary package, you can specify -bb instead of -ba, or just -bs to build only a source package.

    % rpmbuild -ba SPECS/kwave.spec
    

Installing the RPM package

If everything was ok, you can install the binary rpm of Kwave, it should be available below the RPMS sub directory of the RPM top directory. If you already have a version of Kwave installed, please remove it first or use the parameter -U instead of -i for upgrading instead of installing.

% rpm -ivh [topdir]/RPMS/[arch]/kwave-[version].[arch].rpm