Hello, Mark.
On Tuesday, 19 October 2021 at 13:28, Mark E. Fuller wrote:
Hi all,
I'm interested in developing a proper RPM for use on Fedora (and other Linux
systems eventually) for Cantera [0].
I've never built packages before and could use some
assistance/guidance/review.
I've got a successful build for F34/F35, but that's it so far on COPR [1].
Thanks,
Fuller
[0]
https://cantera.org/
[1]
https://copr.fedorainfracloud.org/coprs/fuller/Cantera/
I'm going to assume that this is the spec file used:
https://github.com/mefuller/cantera/blob/copr/rpm/cantera.spec
Upon a quick look, the spec file looks quite good already. Here are some
comments from me:
1. Version: field doesn't follow Fedora versioning guidelines[1] It
should simply correspond to the release you're packaging, e.g. 2.6.0.
If it's a pre-release (a3), then put it in the release field as
0.1.a3 or use the tilde separator: Version: 2.6.0~a3 and Release: 1.
2. I don't see the Fedora CFLAGS being passed anywhere and I'm not
familiar with scons, either. I guess you could try adding
%set_build_flags before calling scons and checking if it takes them
from the environment.
3. You don't need rm -rf %{buildroot} in %install, it's done
automatically.
4. You should mark the license file with %license macro.
5. You should add Requires: %{name}-common%{_isa} = %{version}-%{release}
or %{name}%{_isa} = %{version}-%{release} to the other subpackages as
appropriate. It's enough to put the license file in -common only, then.
6. You should remove all the manual Requires:. Manual ones are needed
only if they're not detected by rpm build process automatically.
7. Specify the file lists in more detail, i.e. by listing individual
files.
Regards,
Dominik
[1]
https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/
--
Fedora
https://getfedora.org | RPM Fusion
http://rpmfusion.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan