remove the bytecode conditionals

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-rpm-macros?expand=0&rev=60
This commit is contained in:
Olaf Hering 2021-04-21 13:16:54 +00:00 committed by Git OBS Bridge
parent 4b6c153b6e
commit 9af80c8807

View File

@ -23,6 +23,7 @@ Summary: RPM macros for building OCaml source packages
License: GPL-2.0-only
Group: Development/Languages/OCaml
BuildRoot: %_tmppath/%name-%version-build
ExclusiveArch: %arm aarch64 %ix86 ppc ppc64 ppc64le riscv64 s390x x86_64
URL: https://build.opensuse.org/project/show/devel:languages:ocaml
Source0: ocaml-ocaml.rpm.prov_req.attr.sh
Source1: ocaml-findlib.rpm.prov_req.attr.sh
@ -35,28 +36,12 @@ Source1: ocaml-findlib.rpm.prov_req.attr.sh
%define debug_package %{nil}
%define ocaml_standard_library %{_libdir}/ocaml
%define do_opt 0
# macros to be set in prjconf:
#Macros:
#_with_ocaml_force_enable_ocaml_opt 1
#_with_ocaml_force_disable_ocaml_opt 1
#_with_ocaml_make_testsuite 1
#:Macros
%bcond_with ocaml_force_enable_ocaml_opt
%bcond_with ocaml_force_disable_ocaml_opt
%bcond_with ocaml_make_testsuite
%if %{with ocaml_force_enable_ocaml_opt}
%define do_opt 1
%endif
%if %{without ocaml_force_enable_ocaml_opt}
%ifarch %{arm} aarch64 %{ix86} ppc ppc64 ppc64le riscv64 s390x x86_64
%define do_opt 1
%endif
%endif
#
%if %{with ocaml_force_disable_ocaml_opt}
%define do_opt 0
%endif
#
%description
@ -134,7 +119,6 @@ tee %{buildroot}%{_rpmmacrodir}/macros.%{name} <<'_EOF_'
%if %{without suse_ocaml_opt_debug_package}
# Obviously, handling presence or absence of debug information works only when being built in a SUSE system.
%endif
%if %{do_opt}
%%ocaml_preserve_bytecode \
%if %{without suse_ocaml_opt_debug_package}
%%define debug_package %%{nil} \
@ -143,13 +127,6 @@ tee %{buildroot}%{_rpmmacrodir}/macros.%{name} <<'_EOF_'
%%define _lto_cflags %%{nil} \
%%{nil}
%%_find_debuginfo_dwz_opts %%{nil}
%else
%%ocaml_preserve_bytecode \
%%undefine _build_create_debug \
%%define __arch_install_post export NO_BRP_STRIP_DEBUG=true \
%%define _lto_cflags %%{nil} \
%%{nil}
%endif
# Create file list for base pkg and base-devel pkg
# Files with known extensions or names are written to 'files' or 'files.devel'