From eb730472f515c1fee39dda6e761c8314ba1bce7e Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Tue, 26 Nov 2024 17:39:05 +0300 Subject: [PATCH] import ocaml-srpm-macros-10-3.el10 --- .gitignore | 0 .ocaml-srpm-macros.metadata | 0 SOURCES/macros.ocaml-srpm | 55 +++++++++++++ SPECS/ocaml-srpm-macros.spec | 146 +++++++++++++++++++++++++++++++++++ 4 files changed, 201 insertions(+) create mode 100644 .gitignore create mode 100644 .ocaml-srpm-macros.metadata create mode 100644 SOURCES/macros.ocaml-srpm create mode 100644 SPECS/ocaml-srpm-macros.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.ocaml-srpm-macros.metadata b/.ocaml-srpm-macros.metadata new file mode 100644 index 0000000..e69de29 diff --git a/SOURCES/macros.ocaml-srpm b/SOURCES/macros.ocaml-srpm new file mode 100644 index 0000000..e7a0498 --- /dev/null +++ b/SOURCES/macros.ocaml-srpm @@ -0,0 +1,55 @@ +# Note that OCaml is compiled on all architectures. However +# on some (rare) architectures, only bytecode compilation is +# available. Use these macros to find out if native code +# compilation is available on a particular architecture. + +# Architectures that support the OCaml native code compiler. +%ocaml_native_compiler aarch64 %{power64} riscv64 s390x x86_64 + +# Architectures that support native dynamic linking of OCaml code. +%ocaml_natdynlink aarch64 %{power64} riscv64 s390x x86_64 + +# Architectures that support profiling of native code (ocamlopt -p). +# This was removed in OCaml 4.09. +# https://github.com/ocaml/ocaml/pull/2314 +%ocaml_native_profiling %{nil} + +# Toplevel OCaml directory +%ocamldir %{_libdir}/ocaml + +# Common elements for all OCaml packages. +# +# ExcludeArch: OCaml packages have not been built on i686 since OCaml 5 was +# introduced in Fedora 39. +# -d: most OCaml packages have no ELF objects when built on a bytecode-only +# architecture, so debuginfo generation is suppressed. Use this flag to +# enable a debuginfo package on such architectures; i.e., when the package +# contains an ELF object even on bytecode-only architectures. +%ocaml_pkg(d) %{lua: + print("ExcludeArch: %{ix86}\\n") + if not opt.d then + local arch = rpm.expand("%{_target_cpu}") + local native = rpm.expand("%{ocaml_native_compiler}") + if not string.find(native, arch) then + rpm.define('debug_package %{nil}') + end + end +} + +# Generate %package and %files definitions for a doc subpackage, +# containing content generated by odoc. +# Use on the top-level only, preferably just before %prep. +# +# Options: +# -L: specify the license file name. Example: +# %odoc_package -L LICENSE +%odoc_package(L:) %{expand: +%package doc +BuildArch: noarch +BuildRequires: ocaml-odoc +Summary: Documentation for %{name} +%description doc +Developer documentation for %{name}. +%files doc +%doc _build/default/_doc/_html/* +%{?-L:%%license %{-L*} %*}} diff --git a/SPECS/ocaml-srpm-macros.spec b/SPECS/ocaml-srpm-macros.spec new file mode 100644 index 0000000..3d768e6 --- /dev/null +++ b/SPECS/ocaml-srpm-macros.spec @@ -0,0 +1,146 @@ +# OCaml has a bytecode backend that works on anything with a C +# compiler, and a native code backend available on a subset of +# architectures. A further subset of architectures support native +# dynamic linking. +# +# This package contains a file needed to define some RPM macros +# which are required before any SRPM is built. +# +# See also: https://bugzilla.redhat.com/show_bug.cgi?id=1087794 + +Name: ocaml-srpm-macros +Version: 10 +Release: 3%{?dist} + +Summary: OCaml architecture macros +License: GPL-2.0-or-later + +BuildArch: noarch + +Source0: macros.ocaml-srpm + +# NB. This package MUST NOT Require anything (except for dependencies +# that RPM itself generates). + +%description +This package contains macros needed by RPM in order to build +SRPMS. It does not pull in any other OCaml dependencies. + + +%prep + + +%build + + +%install +mkdir -p $RPM_BUILD_ROOT%{rpmmacrodir} +install -p -m 0644 %{SOURCE0} $RPM_BUILD_ROOT%{rpmmacrodir}/macros.ocaml-srpm + + +%files +%{rpmmacrodir}/macros.ocaml-srpm + + +%changelog +* Tue Nov 26 2024 MSVSphere Packaging Team - 10-3 +- Rebuilt for MSVSphere 10 + +* Mon Jun 24 2024 Troy Dawson - 10-3 +- Bump release for June 2024 mass rebuild + +* Fri May 31 2024 Richard W.M. Jones - 10-2 +- Bump and rebuild + +* Thu May 23 2024 Jerry James - 10-1 +- Update OCaml native arches for OCaml 5.2 + +* Thu Jan 25 2024 Fedora Release Engineering - 9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Oct 4 2023 Jerry James - 9-1 +- Update OCaml native arches for OCaml 5.1 +- Remove the Python file and some macros (now in ocaml-rpm-macros) +- Add %%ocaml_pkg macro for common declarations + +* Thu Jul 20 2023 Fedora Release Engineering - 8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Mon Jul 10 2023 Richard W.M. Jones - 8-1 +- Update OCaml native archs for OCaml 5.0 + +* Thu Jan 19 2023 Fedora Release Engineering - 7-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Feb 16 2022 Jerry James - 7-1 +- Add odoc and dune macros +- Add ocaml_files.py to support %%files automation +- Use %%rpmmacrodir instead of a custom macro + +* Thu Jan 20 2022 Fedora Release Engineering - 6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 22 2021 Fedora Release Engineering - 6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jan 29 2020 Fedora Release Engineering - 6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Dec 06 2019 Richard W.M. Jones - 6-1 +- Remove support for native profiling, see: + https://github.com/ocaml/ocaml/pull/2314 + +* Thu Jul 25 2019 Fedora Release Engineering - 5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 5-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Feb 08 2018 Fedora Release Engineering - 5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Tue Aug 08 2017 Richard W.M. Jones - 5-2 +- Bump and rebuild. + +* Tue Aug 8 2017 Richard W.M. Jones - 5-1 +- Add new macro ocaml_native_profiling. + +* Thu Jul 27 2017 Fedora Release Engineering - 4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Tue Nov 8 2016 Richard W.M. Jones - 4-1 +- s390x is now a native architecture with OCaml 4.04 in Fedora >= 26. +- Add riscv64 as a native arch using out of tree backend. + +* Thu Feb 04 2016 Fedora Release Engineering - 2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 2 2014 Richard W.M. Jones - 2-1 +- Move macros to _rpmconfigdir (RHBZ#1093528). + +* Tue Apr 22 2014 Richard W.M. Jones - 1-1 +- New package.