I'm trying to make a very simple RPM installation file for RedHat.
This file must only put my binary to /usr/bin
and my configuration file to /usr/etc.
I don't want to put my sources on the RPM.
I'm trying to make a very simple RPM installation file for RedHat.
This file must only put my binary to /usr/bin
and my configuration file to /usr/etc.
I don't want to put my sources on the RPM.
Create a tar ball with your files on paths (in the tar ball) like ./usr/etc …
Then add the tar ball with a SourceN: directive (choose N appropriately).
In %install do
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
tar -C %{buildroot} -xvf %{SOURCEn} # <== choose n same as N in SourceN:
Then create %files with the absolute paths (i.e. w/o leading . and/or %buildroot). Use %attr(mode,user,group) if necessary: default %defattr(0644,root,root,0755) is usually what is necessary.
Run "rpm -ba your.spec" to create the binary packages.
Q.E.D.