I am trying to build a Sailfish OS
app, and I need to use *.wav
files, which are to be distributed through the *.rpm
package. In my case, these files are to be put in /usr/share/[application_name]/sounds/*
. How do I set up the *.pro
and *.yamp
files accordingly?
How to add files in the RPM package of an Sailfish OS project?
826 views Asked by Ivan Bratoev At
3
There are 3 answers
4
On
This isn't a RPM question per se: you seem to be asking how to configure your application through *.pro and *.yamp if you deliver content in *.rpm packages.
The packaging answer is: Patch the configuration files exactly the same as if you were installing the *.wav files manually (i.e. not through *.rpm).
You will need to copy the *.wav content into the %buildroot tree that is used to stage the files to be included in the package, as well as the modified *.pro and *.yamp content. All the files to be included in the *.rpm package will need to be mentioned in the %files manifest exactly as they are to be installed (i.e. w/o the %buildroot prefix used for staging files while building).
I finally found an answer! I want to thank to the owner of that project: https://github.com/krig/metronom-sailfish From the
.pro
and the.yaml
files of this project i found out how to deploy the files. First, we declare that constant:DEPLOYMENT_PATH = /usr/share/$${TARGET}
which seems to hold the path to/usr/share/[appname]
. Next, we define some kind of a variable (TODO
: find a more detailed explanation of that). The definition of that first sets the path to the files, for example,data.files = data
(the seconddata
is the folder). Next, we setdata.path
to$${DEPLOYMENT_PATH}
. We list all the files inOTHER_FILES
and add the setting, in our case,data
, toINSTALLS
. Now, that we are finished with the.pro
file, we move to the.yaml
file for the.rpm
and we add to the necessary line to theFiles:
section, in our case,- '%{_datadir}/%{name}/data'
, the last being the folder we need to add.TODO
: to whoever is more experienced, please provide a more detailed answer.