I have a spec file written to create rpm package where I am extracting tomcat package and jre. I have below sections in my spec file.
Source0: jre-8u181-linux-x64.tar
Source1: apache-tomcat-8.5.15.tar.gz
%prep
%setup -c -T -a 0 -n jre/1.8.0_181
%setup -D -c -T -a 1 -n apache-tomcat/8.5.15
which is extracting my tomcat package into "apache-tomcat/8.5.15/apache-tomcat/". But I want to strip last directory, as I want the folder structure to be "apache-tomcat/8.5.15".
How can I do that with %setup macro. Can someone help with this. Thanks, R Dama.