[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: tar to rpm



On Sat, 06 Oct 2001 23:04:29 +0200 Gustav Schaffter
<gustav schaffter com> imparted to us:

> Hi,
> 
> Is there an easy path to create an rpm package from a tar-ball?
> 
> Any HOW-TO on this?
> 
> 
> I'd like to install a few software packages that are available as
> tar-balls only. And I'd like to keep these PCs 'rpm only'.

Easy path? No. But, there are other ways.

If it has a specfile builtin, a simple command will compile it. If not
it will give an error:

late versions of rpm:
rpmbuild -ta <tarball_name> --target <target...can be
i386,i486,i586,etc>

older versions of rpm:
rpm -ta <tarball_name> --target=<target>

--target defaults to i386 if not given in both cases.

If you get an error, you'll need to try one of the other possibilities.

If you can't build one with the above command, some will let you untar
the tarball and run ./configure to create a specfile. In this instance
you can copy the complete tarball to /usr/src/redhat/SOURCES and the
specfile (once created) to /usr/src/redhat/SPECS. Then a simple command:

rpm -ba /usr/src/redhat/SPECS/<specfile_name> <--target if desired>
rpm -bb <same_directories/commands_as_above>
rpm -bs <ditto>

-ba will build source and binary, -bb will build binary, -bs will build
source.

Another option, get checkinstall (from Fresjmeat) and install it. Get
the tarball(s) you want, compile, and instead of (or after) the 'make
install' step issue the command 'checkinstall' and answer the prompts.
Defaults are OK but, you MUST specify R for rpm or it will abort and tar
up a lot of what you've just done.

Some of these are suitable for distribution. I don't know if I'd do it
if your system is heavily patched (as mine always is) or is using
cutting edge libraries, because most people may not be able to use them.
The good part about it is that you can now remove the rpm from the
system instead of having to locate a bunch of loose files. The rpmdb
will track it just like any other (though some of these confuse up2date:
I have linux_logo-3.9b1-2 installed and up2date wants to update it to
linux_logo-3.9b1-2 again; before installing it up2date didn't even offer
the file).

In all cases, the file will end up in /usr/src/redhat/RPMS/<target> once
built, with (as noted above) i386 being the default.

-- 
Speak softly and carry a cellular phone.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]