I would like to create a rpm package that does the following:
When setup:
copies a script across into the rpm
untars a file into the rpm
When run:
runs
script.sh
runs
install
file that is extracted into the rpm
When the user runs the rpm it should execute 2 and 3 because the files already exist in the rpm.
I know how to do the setup stuff, the *.spec file is:
%description
# lets skip this for now
%prep
# lets skip this for now
%build
# lets skip this for now
%install
cd ${RPM_BUILD_ROOT}
cp -v /home/methuselah/script.sh ${RPM_BUILD_ROOT}
tar xvpf /home/methuselah/bin.tar
chmod 775 -R ${RPM_BUILD_ROOT}/*
%files
/*
%changelog
* Tue Jan 28 2014 Pavel Šimerda - 3.0.9-14
- Resolves: #1052814 - rsync command is terminated with SIGSEGV
- Resolves: #1052814 - add missing patch file
I'm not sure where to put the actual installation steps that run when the rpm is executed.