<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body smarttemplateinserted="true">
<div id="smartTemplate4-quoteHeader">Sat, 11 May 2019 17:53:27
+0300 Rinigus <a class="moz-txt-link-rfc2396E" href="mailto:rinigus.git@gmail.com"><rinigus.git@gmail.com></a>:</div>
<blockquote type="cite"
cite="mid:CA+4hNMFgCjaqyasQigSeA9bi219oZQWDjM2-Z86+kyfoTHMzgQ@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div class="gmail_default" style="font-size:small">Summary from
IRC chat on the topic: David spotted that BuildRequires is not
mentioned in the list of boolean dependencies (thank you!).</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">So, next
question: which condition could I use in %if expansion of SPEC
to distinguish SFOS 3.0.3.x from the earlier versions? Maybe
there is some variable defined at OBS build env that can be
used?</div>
</div>
</blockquote>
<p>I know that Fedora/RHEL/CentOS/OpenSUSE and RPM based distros in
general usually have some RPM macro[0] defined that can be used to
check on which "target" the package is being built and then behave
accordingly. That way people can use the same spec file across
multiple Fedora and even RHEL releases. I would assume Sailfish OS
might have something similar and if not it definitely should be
added.</p>
<p>But if no such mechanism is available at the moment, there might
still be a way to share a common spec file the way modRana does
it. I didn't want to maintain three spec files for modRana (one
for Open Repos, one for Harbour, one for Fedora) so I've added
conditions to the single shared spec file based on custom RPM
variables. The variables are then set at build time based on
custom config for the given Mer OBS project.</p>
<p>The condition can be seen for example here:</p>
<p><a class="moz-txt-link-freetext" href="https://github.com/M4rtinK/modrana/blob/master/packaging/modrana.spec#L33">https://github.com/M4rtinK/modrana/blob/master/packaging/modrana.spec#L33</a><br>
</p>
<p><br>
</p>
<p>The custom repo configs can be seen here:</p>
<p><a class="moz-txt-link-freetext" href="https://build.merproject.org/project/prjconf/home:MartinK:sailfish:modrana">https://build.merproject.org/project/prjconf/home:MartinK:sailfish:modrana</a><br>
</p>
<p><a class="moz-txt-link-freetext" href="https://build.merproject.org/project/prjconf/home:MartinK:sailfish:modrana-harbour">https://build.merproject.org/project/prjconf/home:MartinK:sailfish:modrana-harbour</a></p>
<p><br>
</p>
<p>Note that the modRana project has just %with_sailfish set while
modrana-harbour has also %with_harbour set.</p>
<p>I think you could use something similar, eq. %with_old_icu or
%sfos_303 on two separate OBS projects sharing the same spec file</p>
<p>with the respective conditions set.<br>
</p>
<p><br>
</p>
<p>Best Wishes</p>
<p>Martin Kolman<br>
</p>
<p><br>
</p>
<p>[0]
<a class="moz-txt-link-freetext" href="https://docs.fedoraproject.org/en-US/packaging-guidelines/DistTag/">https://docs.fedoraproject.org/en-US/packaging-guidelines/DistTag/</a><br>
</p>
<blockquote type="cite"
cite="mid:CA+4hNMFgCjaqyasQigSeA9bi219oZQWDjM2-Z86+kyfoTHMzgQ@mail.gmail.com">
<div dir="ltr">
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">Rinigus</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, May 11, 2019 at 4:38
PM rinigus <<a href="mailto:rinigus.git@gmail.com"
moz-do-not-send="true">rinigus.git@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div class="gmail_default" style="font-size:small">Hi,<br>
</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">the
problem is while building at OBS: <a
href="https://build.merproject.org/package/show/home:rinigus:maps/mapnik"
target="_blank" moz-do-not-send="true">https://build.merproject.org/package/show/home:rinigus:maps/mapnik</a></div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">Rinigus</div>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Sat, May 11, 2019 at
4:30 PM David Llewellyn-Jones <<a
href="mailto:david@flypig.co.uk" target="_blank"
moz-do-not-send="true">david@flypig.co.uk</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">On 11/05/2019 16:12,
rinigus wrote:<br>
[snip]<br>
> BuildRequires: (libicu52-devel or libicu-devel)<br>
> <br>
> as in<br>
> <a
href="https://github.com/rinigus/pkg-mapnik/blob/da5b6a11667b286c89bbee93eb57e2d4d52d5902/rpm/mapnik.spec#L16"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://github.com/rinigus/pkg-mapnik/blob/da5b6a11667b286c89bbee93eb57e2d4d52d5902/rpm/mapnik.spec#L16</a> <br>
[snip]<br>
> Hence the question - how can I add support for
3.0.2.x and 3.0.3.x using<br>
> the same SPEC file? On device, RPM has version 4.14,
if its of any<br>
> importance.<br>
<br>
For 'BuildRequires', it's presumably the versioning in
your SDK tooling<br>
which is important, rather than the RPM version on your
device. It may<br>
be worth checking that too.<br>
<br>
Or is the problem you're experiencing happening at install
time (i.e. in<br>
relation to the 'Requires' on line 36 of that file)? I
can't see any<br>
difference between your version and the examples in the
spec you posted.<br>
<br>
David<br>
-- <br>
Website: <a href="http://www.flypig.co.uk"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://www.flypig.co.uk</a><br>
_______________________________________________<br>
SailfishOS.org Devel mailing list<br>
To unsubscribe, please send a mail to <a
href="mailto:devel-unsubscribe@lists.sailfishos.org"
target="_blank" moz-do-not-send="true">devel-unsubscribe@lists.sailfishos.org</a></blockquote>
</div>
</blockquote>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to <a class="moz-txt-link-abbreviated" href="mailto:devel-unsubscribe@lists.sailfishos.org">devel-unsubscribe@lists.sailfishos.org</a></pre>
</blockquote>
<br>
<div id="smartTemplate4-template">
<p> </p>
</div>
</body>
</html>