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

Re: newbie help to simple RPM



On Mon, 1 Dec 2003, Thomas Elsgaard wrote:

> i would like to make a rpm that just extracts a .tar.gz file to a
> directory, but how should the spec look to do this ?

It sort of depends, but let's assume that

* the package will live in /opt/foo-1.0
* the source tarball is foo-1.0.tar.gz
* the source tarball will unpack itself into ./foo-1.0

If that's true, then its skeleton will look something like

  Name: foo
  Version: 1.0
  Source: %{name}-%{version}.tar.gz
  Prefix: /opt
  BuildRoot: %{_tmppath}/%{name}-%{version}-root
  [... other headers, %description go here ...]
  %install
  install -d %{buildroot}%{prefix}
  cd %{buildroot}%{prefix} && gzip -dc %{SOURCE0} | tar xf -
  [... %clean and any scriptlets go here ...]
  %files
  %{prefix}/%{name}-%{version}

--Paul Heinlein <heinlein@cse.ogi.edu>




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