Package building related to OpenFOAM, as well as some extra tools

No description set
Name Changed
Comments 5

Atri Bhattacharya's avatar

I see your point about having everything under a single dir. In that case, it's recommended to use %define inst_target /opt and use that as the toplevel dir. Install appropriate symlinks to %{_bindir} as required.

You can also be more distro-agnostic in your BuildRequires rather than use multiple %if conditions by using pkgconfig() or cmake() based BuildRequires. For example, if you replace

 %if 0%{?suse_version}
BuildRequires:  cgal-devel
 %endif
 %if 0%{?fedora}
BuildRequires:  CGAL-devel
 %endif

with BuildRequires: cmake(CGAL) that will pull in the right devel pkg for both distros.


Mark Olesen's avatar

With %{inst_target} instead of Prefix: it looks like the shell env RPM_INSTALL_PREFIX would need to be replaced with something else, but this seems to be the mechanism for making relocatable packages.


Mark Olesen's avatar

Another question - what is the best way to define a meta-package? Initially defined it without a %files section, but then it didn't get created (or I did something else wrong). With an empty %files entry, rpmlint complains a bit, but does something.


Atri Bhattacharya's avatar

Have a %files section and put in a README there. See how llvm does it: https://build.opensuse.org/package/show/openSUSE:Factory/llvm


Mark Olesen's avatar

Thanks for the pointers

openSUSE Build Service is sponsored by