tar.gz转换成rpm

Building RPM packages from tar.gz 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.gz archive from the Kwave download page or check out an up-to-date copy via SVN (like described in the chapter about SVN) and read the next chapter.

If you have downloaded a tar.gz 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 i386, i586, 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.gz
% 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):

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


Put the tar.gz 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.gz SOURCES


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

% tar -xOzf SOURCES/kwave-XXX.tar.gz \*.spec > SPECS/kwave.spec


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


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

你可能感兴趣的:(SVN,redhat,REST,SuSE,Go)