I have a Qt project and in that project i have the following directory structure:
/src (source of my main code that builds the main software product (including .pro file and .spec file))
/app (source code that builds an support app)
/bin (where the binary files from src and app are built to)
Currently I have a spec file in the main source directory that builds the rpm. This works fine.
In the app directory I have code that builds a support app for the application built in the src directory, this i build with a separate .pro file
and it builds and creates an executable fine.
At the moment after i build the app code I copy the app binary (from /bin) into the /src directory and just include
the binary in the main project by putting it in the DISTFILES section in the .pro file but this is not ideal.
The problem I have is I wish to build and include the executable from the /app directory in the rpm that is built from the /src directory,
so the rpm provides both executables, without having to build the /app directory separately and copying the executable across.
I want to be able to just do
qmake (in /src directory)
make dist
rpmbuild -ta app.tar.gz
and build executables in both directories for the rpm.
Currently if I don’t put the /app executable in the /src directory “make dist” fails as of course the app file doesn’t exist.
My question is how do i do this so the source code from the /app directory gets included into the tar.gz that make dist is creating from the /src directory?
(I would prefer not to move the .spec file from the src file if possible)
Thank you.