From 76b6b8105840879e4cf47c885e6f1c06b6f0cb48 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Apr 2014 11:07:08 +0100 Subject: [PATCH] New package. --- macros.ocaml-srpm | 10 +++++++++ ocaml-srpm-macros.spec | 47 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 macros.ocaml-srpm create mode 100644 ocaml-srpm-macros.spec diff --git a/macros.ocaml-srpm b/macros.ocaml-srpm new file mode 100644 index 0000000..7b8d319 --- /dev/null +++ b/macros.ocaml-srpm @@ -0,0 +1,10 @@ +# 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 %{arm} %{ix86} ppc ppc64 ppc64le sparc sparcv9 x86_64 + +# Architectures that support native dynamic linking of OCaml code. +%ocaml_natdynlink aarch64 %{arm} %{ix86} ppc ppc64 ppc64le sparc sparcv9 x86_64 diff --git a/ocaml-srpm-macros.spec b/ocaml-srpm-macros.spec new file mode 100644 index 0000000..7ef9ca7 --- /dev/null +++ b/ocaml-srpm-macros.spec @@ -0,0 +1,47 @@ +# 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 single 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: 1 +Release: 1%{?dist} + +Summary: OCaml architecture macros +License: GPLv2+ + +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%{_sysconfdir}/rpm +install -m 0644 %{SOURCE0} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.ocaml-srpm + + +%files +%{_sysconfdir}/rpm/macros.ocaml-srpm + + +%changelog +* Tue Apr 22 2014 Richard W.M. Jones - 1-1 +- New package.