For specific reason I need to ship a binary with my app. I compiled it for three architectures, and I want the files to be in /opt/myapp/bin, say.
In SPEC file I think I can add it in %files, however it has to be in build root. The question is, how do I force qmake or whatever packages application (I use Qt Creator from Sailfish IDE) to copy some files to build root, which, say, are in bin directory in my project root?
I understand I need to deal with pro file, however I tried few things and nothing seems to copy the bin directory to build root, where SPEC file could do its job.
Even though the page doesn’t directly answer your question, have a look at how sailfishapp.prf handles installation of desktop and icon files. The same mechanism works in a pro file as well.
AutoReq: no
%define _unpackaged_files_terminate_build 0
%define _binaries_in_noarch_packages_terminate_build 0
Along with following in %files to ensure they are 755:
%attr(0755, root, root) %{_datadir}/%{name}/bin
Without those defines it complained, because the app is technically noarch, but contains binaries. I know this is not the best way, but the app won’t be published in Harbour anyway (as it calls external processes), so I don’t really care… Big thanks for help!