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

Re: Very simple specfile .. aargh!



> I have found countless examples and howto's on how to make packages but
> I am having difficulties creating a package that simply contains a few
> files that installs into a few different places. Does anyone have an
> example of how i might do this? ie: What would the spec file be for
> example just files such as /etc/abc /usr/bin/xyz in a simple tar file.
> 
> Thanks for any help!
> Jacob
> 
> (I am trying to make a simple rpm for essentially personal use, my boss
> wants to be able to install some files on a server without knowing
> anything except typing 'su' then 'rpm -i blah')
> 
> 
> 

My demo I show developers ..

Summary: A demo for rpmbuild testing
Name: demo
Version: 1
Release: 1
Source0: %{name}.tar.gz
License: GPL
Group: Development/Examples
BuildRoot: /tmp/%{name}
%description
Using HelloWorld.c to demonstrate how rpms are built and managed
%setup -n %{name} 
%build
make
%install
make install
%files
%defattr(-,root,root)
/tmp/demo

If you want to deliver tarballs, that was answered a few days ago by Dario
Alcocer <alcocer helixdigital com>.

"
  %install
  tar xzCf $RPM_BUILD_ROOT/mydir $RPM_SOURCE_DIR/mytarball.tgz

The contents of $RPM_BUILD_ROOT/mydir need to be listed in %files as well.

"
So your source tar passed to rpmbuild would include another tarball in it,
which would have /etc/abc /usr/bin/xyz
.
So it would look like

Summary: A demo for rpmbuild testing with a tarball.
Name: demo
Version: 1
Release: 1
Source0: %{name}.tar.gz
License: GPL
Group: Development/Examples
BuildRoot: /tmp/%{name}
%description
Tar ball dump example
%setup -n %{name} 
%build
%install
tar xzCf $RPM_BUILD_ROOT/mydir $RPM_SOURCE_DIR/mytarball.tgz
%files
%defattr(-,root,root)
/etc/abc 
/usr/bin/xyz


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