Building RPM packages from tar.bz2 archives

With working rpmbuild -ta

If you are runnig a system with RPM support, the preferred way to install Kwave on your system will be the creation of a nice RPM package. First you should get the current source of Kwave, either as a tar.bz2 archive from the Kwave download page or check out an up-to-date copy via GIT (like described in the chapter about GIT) and read the next chapter.

If you have downloaded a tar.bz2 archives of Kwave, create and install the RPMs just by doing the following steps (where [arch] stands for the platform you have built the package and might be something like i586, i686, sparc or whatever, XXX stands for the version number you have downloaded).

To build the Kwave package and install it do:

% rpmbuild -ta kwave-XXX.tar.bz2
% rpm -i /usr/src/redhat/RPMS/[arch]/kwave-XXX.[arch].rpm

Note

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

If you haven't seen any errors, then that's it and you can skip the rest of this chapter. If rpm was unable to build the packages and says something like "spec file not found", then go on and read the rest of this section.

With broken rpmbuild -ta support

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

  1. Go to your RPM "topdir". This normally is /usr/src/redhat for the redhat distribution or /usr/src/packages if you have the SuSE distribution.

    % cd /usr/src/redhat
    

  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-XXX.tar.bz2 SOURCES
    

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

    % tar -xOjf SOURCES/kwave-XXX.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
    

  5. If everything was ok, you can install the binary rpm of Kwave, it will be in the BUILD 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 BUILD/[arch]/kwave-XXX.[arch].rpm