can an RPM spec file include other files?
RPM does not support includes.
I have solved similar problems with either m4 macro processor or by just concatenating parts of spec (when the "include" was at the beginning).
If you only need to pass a few variables at build time, and not include several lines from another file, you can run
rpmbuild --define 'myvar SOMEVALUE' -bb myspec.spec
and you can use %myvar in the spec.
Add extra file into the rpm building process
You need to know where to place your script file on the target installation (e.g. /usr/lib/myApp/plugins/myNiceScript.py)
In the spec-File (section %install) you have to copy your script under %{buildroot} into the target directory (which has to be created first.
%install
...
# in case the dir does not exist:
mkdir -p %{buildroot}/usr/lib/myApp/plugins
cp whereitis/myNiceScript.py %{buildroot}/usr/lib/myApp/plugins
At the end you have to define the file flags in the %files section. E.g. if your file has to have 644 under root:
%files
...
%defattr(644,root,root)
/usr/lib/myApp/plugins/myNiceScript.py
If your plugins directory is to be created during installation you need to define these flags too:
%defattr(755,root,root)
%dir /usr/lib/myApp/plugins
rpm packaging: files installed using rpm but not found by other rpm which requires it
You probably disabled automatic provides. See: http://ftp.rpm.org/max-rpm/s1-rpm-depend-auto-depend.html
You either have to enable it again by deleting the line with AutoReqProv
or explicitly write it in spec:
Provides: libjaegertracing.so.0()(64bit)
Provides: libopentracing.so.1()(64bit)
The first is preferred as the second is hard to maintain.
Related Topics
How to Install Packages in Tcl
Socket Send Concurrency Guarantees
Show Image Notification from Bash Script
Bash-Script Printing a PDF to a PDF in Linux
Why Can One Remove/Rename Open Files in Linux
How to Execute a Command in a Bash Script and Then Focus The Appearing Window
Sending Snmp2 Trap Message from Linux Command Lne
How to Create a File in Assembly with a Dynamically Specified File Path
"Nothing to Commit (Working Directory Clean)" When a Folder Has Been Added
Linux Kernel Hardware Break Points
Run 'Perf Stat' on The Output of 'Perf Record'
Linux Shell Kill Signal Sigkill && Kill
What Means "Atomic" System Call
Is There a Rpm File Naming Convention in Lsb
Linux: How to Send Tcp Packet from Specific Port
Enabling The Vt-X Inside a Virtual Machine