%vendor obs://build.opensuse.org/home:adinov
%_download_url https://download.opensuse.org/repositories
%_project home:adinov:core

### from openSUSE:Factory

%_repository ports
%suse_build_hwcaps_libs \
#!BuildTarget: x86_64_v3-linux,x86_64-linux \
#!BuildConstraint: hardware:cpu:flag x86-64-v3 \
%{nil}
%ffmpeg_pref ffmpeg-8
# RUBY - UNVERSIONED STUFF
#
# IMPORTANT IMPORTANT IMPORTANT IMPORTANT  IMPORTANT IMPORTANT
#
#  if you change any macros here you have to update the copy in the
#  prjconf aswell.
#
# IMPORTANT IMPORTANT IMPORTANT IMPORTANT  IMPORTANT IMPORTANT
#
%rubygem() %{expand:%%{rubygems%rb_build_versions STOP %*}}
%rubygemsSTOP() %nil
%rubygemsxSTOP() %{expand:%%rubygemsxxSTOP -a %*}
%rubygemsxxSTOP(a:) %{-a*}) %*

%rubySTOP() %nil
%rubyxSTOP() %*

%ruby() %{expand:%%{ruby%rb_build_versions STOP %*}}

%rubydevel() %{expand:%%{rubydevel%rb_build_versions STOP %*}}

%rubydevelSTOP() %nil
%rubydevelxSTOP() %*
#

#
# IMPORTANT IMPORTANT IMPORTANT IMPORTANT  IMPORTANT IMPORTANT
#
#  if you change any macros here you have to update the copy in
#  ruby<X.X> aswell.
#
# IMPORTANT IMPORTANT IMPORTANT IMPORTANT  IMPORTANT IMPORTANT
#

### And now Ruby 3.4

%rubygemsruby34() rubygem(ruby:3.4.0:%{expand:%%rubygemsx%*} %{expand:%%{rubygems%*}}
%rubygemsxruby34() %{expand:%%{rubygemsx%*}}

%rubyruby34() ruby3.4 %{expand:%%rubyx%*} %{expand:%%{ruby%*}}
%rubyxruby34() %{expand:%%{rubyx%*}}

%rubydevelruby34() ruby3.4-devel %{expand:%%rubydevelx%*} %{expand:%%{rubydevel%*}}
%rubydevelxruby34() %{expand:%%{rubydevelx%*}}


### Things to define default ruby stuff for the distro

%rb_default_ruby        ruby34
%rb_default_ruby_suffix ruby3.4
%rb_default_ruby_abi    ruby:3.4.0

%rb_build_ruby_abis     ruby:3.4.0
%rb_build_versions      ruby34
%_with_ruby34               1
## PYTHON MACROS BEGIN
# order of %pythons is important: The last flavor overrides any operation on conflicting files and definitions during expansions,
# making it the "default" in many cases --> keep the primary python3 provider at the end.
%pythons %{?!skip_python3:%{?!skip_python311:python311} %{?!skip_python312:python312} %{?!skip_python313:python313}}
%add_python() %{expand:%%define pythons %1 %pythons}

%_without_python2 1

# prjconf definitions for python-rpm-macros
# This method for generating python_modules gets too deep to expand for rpm at about 5 python flavors.
# Hence, python_module_iter is replaced by python_module_lua in macros.lua.
# However, OBS cannot expand lua, but has a much higher expansion depth, so this works fine for the server side resolver.
%python_module_iter(a:) %{expand:%%define python %{-a*}} ( %python-%args ) %{expand:%%{?!python_module_iter_%1:%%{python_module_iter -a%*}}%%{?python_module_iter_%1}}
# pseudo-undefine for obs: reset for the next expansion within the next call of python_module
%python_module_iter_STOP %global python %%%%python
%python_module() %{?!python_module_lua:%{expand:%%define args %{**}} %{expand:%%{python_module_iter -a %{pythons} STOP}}}%{?python_module_lua:%python_module_lua %{**}}
# gh#openSUSE/python-rpm-macros#127 ... define our current primary Python interpreter
%primary_python python313
%modern_python %{primary_python}

%single_pythons_311plus() %global pythons %{?modern_python}%{?!modern_python:%primary_python}
## PYTHON MACROS END
%rust_arches x86_64 i586 i686 armv6hl armv7hl aarch64 ppc64 powerpc64 ppc64le powerpc64le riscv64 s390x
%rust_tier1_arches x86_64 aarch64
%build_mtime_policy clamp_to_buildtime
%set_mtime_to_source_date_epoch Y
%use_source_date_epoch_as_buildtime Y
%_buildhost reproducible
%default_firewall_backend nftables
%suse_version 1699
%is_opensuse 1
%skelcd_compat 0
%build_ldflags %{?_lto_cflags}

%insserv_prereq insserv sed
%fillup_prereq fillup /usr/bin/mkdir /usr/bin/touch
%suseconfig_fonts_prereq perl aaa_base
# I can't just not define it, as otherwise all specs using it break: [   25s] error: line 27: Empty tag: Requires(post):
%install_info_prereq /bin/sh
%kernel_build_shell_package bash-sh
%kernel_module_package_buildreqs modutils kernel-syms kmod-compat suse-kernel-rpm-scriptlets %kernel_build_shell_package

%sles_version 0
%ul_version 0
%leap_version 0
%do_profiling 1
%opensuse_bs 1
%_vendor suse

# define which postgres is default
%postgresql_default_ver 18

# define which llvm package builds the system libraries
%product_libs_llvm_ver 21

# define which gcc package builds the system libraries
%product_libs_gcc_ver 15
# The following shlibs have latest versions built from GCC 6 sources
%product_libs_gcc_ver_libasan3 6
%product_libs_gcc_ver_libgo9 6
%product_libs_gcc_ver_libgfortran3 6
# reminded by richi 2017 4/3
%product_libs_gcc_ver_libgcj_bc1 6
# The following shlibs have the latest version built from GCC 7 sources
%product_libs_gcc_ver_libgfortran4 7
%product_libs_gcc_ver_libasan4 7
%product_libs_gcc_ver_libtsan0 7
%product_libs_gcc_ver_libubsan0 7
%product_libs_gcc_ver_libcilkrts5 7
%product_libs_gcc_ver_libgo11 7
# The following shlibs have the latest version  built from GCC 8
%product_libs_gcc_ver_libmpx2 8
%product_libs_gcc_ver_libmpxwrappers2 8
%product_libs_gcc_ver_libgo13 8
# The following shlibs have the latest version built from GCC 9 sources
%product_libs_gcc_ver_libasan5 9
%product_libs_gcc_ver_libgo14 9
# The following shlibs have the latest version built from GCC 10 sources
%product_libs_gcc_ver_libgphobos1 10
%product_libs_gcc_ver_libgdruntime1 10
%product_libs_gcc_ver_libgo16 10
# The following shlibs have the latest version built from GCC 11 sources
%product_libs_gcc_ver_libasan6 11
%product_libs_gcc_ver_libgo19 11
%product_libs_gcc_ver_libgphobos2 11
%product_libs_gcc_ver_libgdruntime2 11
# The following shlibs have the latest version build from GCC 12 sources
%product_libs_gcc_ver_libgo21 12
%product_libs_gcc_ver_libgphobos3 12
%product_libs_gcc_ver_libgdruntime3 12
# The following shlibs have the latest version build from GCC 13 sources
%product_libs_gcc_ver_libm218 13
%product_libs_gcc_ver_libgo22 13
%product_libs_gcc_ver_libgphobos4 13
%product_libs_gcc_ver_libgdruntime4 13
# The following shlibs have the latest version build from GCC 14 sources
%product_libs_gcc_ver_libgdruntime5 14
%product_libs_gcc_ver_libgo23 14
%product_libs_gcc_ver_libgphobos5 14
%product_libs_gcc_ver_libm219 14
%gcc_version 15

%ext_info .gz
%ext_man .gz

## from update-bootloader-rpm-macros - impacts build deps
#update_bootloader_requires %nil

### from openSUSE:Tumbleweed

%_repository dod

### from openSUSE:Tumbleweed

%_repository standard

%distribution home:adinov:core
%_project home:adinov:core
%_obs_cpu_flag_exclude yes

%jobs 4
