This is my first attempt at building an RPM and I'm finding it a bit confusing, not really getting the different variables at all yet, so would appreciate any advice on the below..
I have the following spec file:
BuildRoot : /home/dm40477/rpmbuild/BUILD
%description
Package to deploy PROD Support scripts
%prep
zcat ~/rpmbuild/SOURCES/ITRS.tar.gz | tar -xvf -
%install
RPM_INSTALL_PREFIX=/var/opt
%files
%defattr(0622,muser,muser)
/ITRS/bin/SXS
/ITRS/bin/SXSRT
/ITRS/etc/SXS
/ITRS/etc/SXSRT
%changelog
It creates the rpm file ok, but when I go to install it on target server, it installs in /bin and /etc
The source file is gziped tar file in the below dir structure which I would like to keep except install it in the folder /var/opt
/ITRS/bin/SXS
/ITRS/bin/SXSRT
/ITRS/etc/SXS
/ITRS/etc/SXSRT
- How can I set the install path in the spec file?
- Do I need to make the dirs to keep the structure, or will it automatically keep that structure?
Any hel appreciated.
Thanks
D