Martin, thanks for pointing in this direction. I added %dump in SPEC and the only reasonable macro that I could see was _repository. So, I added the following to differentiate the dependencies:
%if %{_repository} == "sailfish_3.0.2.8_armv7hl" BuildRequires: libicu52-devel %else BuildRequires: libicu-devel %endif Not the prettiest of the solutions, but seem to work. Rinigus On Sun, May 12, 2019 at 3:53 PM Martin Kolman <martin.kol...@gmail.com> wrote: > Sat, 11 May 2019 17:53:27 +0300 Rinigus <rinigus....@gmail.com> > <rinigus....@gmail.com>: > > Summary from IRC chat on the topic: David spotted that BuildRequires is > not mentioned in the list of boolean dependencies (thank you!). > > 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? > > 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. > > 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. > > The condition can be seen for example here: > > https://github.com/M4rtinK/modrana/blob/master/packaging/modrana.spec#L33 > > > The custom repo configs can be seen here: > > https://build.merproject.org/project/prjconf/home:MartinK:sailfish:modrana > > > https://build.merproject.org/project/prjconf/home:MartinK:sailfish:modrana-harbour > > > Note that the modRana project has just %with_sailfish set while > modrana-harbour has also %with_harbour set. > > I think you could use something similar, eq. %with_old_icu or %sfos_303 on > two separate OBS projects sharing the same spec file > > with the respective conditions set. > > > Best Wishes > > Martin Kolman > > > [0] https://docs.fedoraproject.org/en-US/packaging-guidelines/DistTag/ > > > Rinigus > > > > On Sat, May 11, 2019 at 4:38 PM rinigus <rinigus....@gmail.com> wrote: > >> Hi, >> >> the problem is while building at OBS: >> https://build.merproject.org/package/show/home:rinigus:maps/mapnik >> >> Rinigus >> >> On Sat, May 11, 2019 at 4:30 PM David Llewellyn-Jones <da...@flypig.co.uk> >> wrote: >> >>> On 11/05/2019 16:12, rinigus wrote: >>> [snip] >>> > BuildRequires: (libicu52-devel or libicu-devel) >>> > >>> > as in >>> > >>> https://github.com/rinigus/pkg-mapnik/blob/da5b6a11667b286c89bbee93eb57e2d4d52d5902/rpm/mapnik.spec#L16 >>> >>> [snip] >>> > Hence the question - how can I add support for 3.0.2.x and 3.0.3.x >>> using >>> > the same SPEC file? On device, RPM has version 4.14, if its of any >>> > importance. >>> >>> For 'BuildRequires', it's presumably the versioning in your SDK tooling >>> which is important, rather than the RPM version on your device. It may >>> be worth checking that too. >>> >>> Or is the problem you're experiencing happening at install time (i.e. in >>> relation to the 'Requires' on line 36 of that file)? I can't see any >>> difference between your version and the examples in the spec you posted. >>> >>> David >>> -- >>> Website: http://www.flypig.co.uk >>> _______________________________________________ >>> SailfishOS.org Devel mailing list >>> To unsubscribe, please send a mail to >>> devel-unsubscr...@lists.sailfishos.org >> >> > _______________________________________________ > SailfishOS.org Devel mailing list > To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org > > > > _______________________________________________ > SailfishOS.org Devel mailing list > To unsubscribe, please send a mail to > devel-unsubscr...@lists.sailfishos.org
_______________________________________________ SailfishOS.org Devel mailing list To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org