%vendor obs://build.opensuse.org/home:cschneemann
%_download_url https://download.opensuse.org/repositories
%_project home:cschneemann:FroSCon

### from SUSE:SLE-15:GA

%_repository pool
%_without_mono          1
# 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
#  ruby2.5 aswell.
#
# IMPORTANT IMPORTANT IMPORTANT IMPORTANT  IMPORTANT IMPORTANT
#
%rubygemsruby25() rubygem(ruby:2.5.0:%{expand:%%rubygemsx%*} %{expand:%%{rubygems%*}}
%rubygemsxruby25() %{expand:%%{rubygemsx%*}}

%rubyruby25() ruby2.5 %{expand:%%rubyx%*} %{expand:%%{ruby%*}}
%rubyxruby25() %{expand:%%{rubyx%*}}

%rubydevelruby25() ruby2.5-devel %{expand:%%rubydevelx%*} %{expand:%%{rubydevel%*}}
%rubydevelxruby25() %{expand:%%{rubydevelx%*}}


### Things to define default ruby stuff for the distro
%rb_default_ruby        ruby25
%rb_default_ruby_suffix ruby2.5
%rb_default_ruby_abi    ruby:2.5.0
%rb_build_ruby_abis     ruby:2.5.0
%rb_build_versions      ruby25

%_with_ruby25               1
%pythons  %{?!skip_python2:python2} %{?!skip_python3:python3}

# This method for generating python_modules gets too deep to expand at about 5 python flavors.
# It is replaced by a Lua macro in macros.lua
# However, OBS has a much higher expansion depth, so this works fine.
%python_module_iter(a:) %{-a*}-%{args} %{expand:%%{?!python_module_iter_%1:%%{python_module_iter -a%*}}}
%python_module_iter_STOP stop
%python_module() %{expand:%%define args %{**}} %{expand:%%{python_module_iter -a %{pythons} STOP}}

%add_python() %{expand:%%define pythons %pythons %1}
%suse_version 1500
%sle_version 150000
%is_susesap 1

%insserv_prereq insserv sed
%fillup_prereq fillup coreutils grep diffutils
%suseconfig_fonts_prereq perl aaa_base
%install_info_prereq info
%kernel_module_package_buildreq kmod-compat kernel-syms
%kernel_module_package_buildreqs kmod-compat kernel-syms
%maintenance_vendor SUSE LLC <https://www.suse.com/>
%maintenance_distribution SUSE Linux Enterprise 15

%sles_version 0
%do_profiling 1
%_vendor suse

# Reproducible builds
%source_date_epoch_from_changelog Y

# define which gcc package builds the system libraries
%product_libs_gcc_ver 7
# 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 been introduced with GCC 7
%product_libs_gcc_ver_libmpxwrappers2 7
%product_libs_gcc_ver_libmpx2 7
%product_libs_gcc_ver_libasan4 7
%product_libs_gcc_ver_libgo11 7
%product_libs_gcc_ver_libgfortran4 7
%gcc_version 7

%ext_info .gz
%ext_man .gz

%info_add(:-:) test -x /sbin/install-info -a -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \
%{nil}

%info_del(:-:) test -x /sbin/install-info -a ! -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --quiet --delete --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \
%{nil}
%rust_arches x86_64 i586 i686 armv6hl armv7hl aarch64 ppc64 powerpc64 ppc64le powerpc64le s390x
%_without_obs_scm_testsuite 0

### from SUSE:SLE-15:Update

%_repository pool
%shim_enforce_ms_signature 1

# define which gcc package builds the system libraries
%product_libs_gcc_ver 13
# 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_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_libtsan0 11
%product_libs_gcc_ver_libgo19 11
%product_libs_gcc_ver_libgphobos2 11
%product_libs_gcc_ver_libgdruntime2 11
%product_libs_gcc_ver_libgphobos3 12
%product_libs_gcc_ver_libgdruntime3 12
%product_libs_gcc_ver_libgo21 12

%product_libs_gcc_ver 14
# 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

%product_libs_gcc_ver 15
# 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

%susemanager_container_images_path registry.suse.com/suse/manager/4.3
%default_firewall_backend iptables
%primary_python python3

### from SUSE:SLE-15-SP1:GA

%_repository pool
%sle_version 150100

### from SUSE:SLE-15-SP2:GA

%_repository pool
%sle_version 150200
%current_milestone GMC

%product_libs_gcc_ver 9
%product_libs_gcc_ver_libgfortran4 7
%product_libs_gcc_ver_libasan4 7
%product_libs_gcc_ver_libubsan0 7
%product_libs_gcc_ver_libcilkrts5 7
%product_libs_gcc_ver_libgo11 7
%product_libs_gcc_ver_libobjc4 7
%product_libs_gcc_ver_libmpx2 8
%product_libs_gcc_ver_libmpxwrappers2 8
%product_libs_gcc_ver_libgo13 8

### from SUSE:SLE-15-SP3:GA

%_repository pool
%current_milestone GM
%sle_version 150300

### from SUSE:SLE-15-SP3:Update

%_repository pool
%rust_arches x86_64 i586 i686 armv6hl armv7hl aarch64 ppc64 powerpc64 ppc64le powerpc64le riscv64 s390x
%rust_tier1_arches x86_64 aarch64

### from SUSE:SLE-15-SP4:GA

%_repository pool
%current_milestone Snapshot-202204-3
%sle_version 150400
## 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:python3}
%add_python() %{expand:%%define pythons %1 %pythons}

%_without_python2 1

### from SUSE:SLE-15-SP4:Update

%_repository pool
# Macro to build Python Stack Proposal packages
%sle15_python_module_pythons() %global pythons python311

# 2023-06-07 meissner
# Macro to build Python Stack Proposal packages
%sle15allpythons() %global pythons python311 python3

# 2023-09-22 dmueller
# 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 %{**}}
#
# requested by dmueller 2025-05-30
%modern_python python311
%single_pythons_311plus() %global pythons %{?modern_python}%{?!modern_python:%primary_python}

### from SUSE:SLE-15-SP5:GA

%_repository pool
%current_milestone PublicBeta-202302
%sle_version 150500

### from SUSE:SLE-15-SP6:GA

%_repository pool
%current_milestone Alpha
%product_libs_llvm_ver 17
%sle_version 150600

### from openSUSE:Backports:SLE-15-SP6

%_repository standard
## 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:python3}
%add_python() %{expand:%%define pythons %1 %pythons}

# requested by Scott
%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 %{**}}

%skip_python2 1
%_without_python2 1
%is_opensuse  1
%is_backports 1
%opensuse_bs  1
# I doubt this should set to 1 - maxlin
# %_with_mono   1

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


### from openSUSE:Backports:SLE-15-SP6:Update

%_repository standard
# add macro for llvm19, so that chromium can use it
%product_libs_llvm_ver 19
:socraM

# ffmpeg_prep requested in https://code.opensuse.org/leap/features/issue/260
# We have multiple versions of ffmpeg available, the preferred one is ffmpeg4 from Backports instead of ffmpeg3 from SLE
# Prefer: ffmpeg-4-libavcodec-devel ffmpeg-4-libavformat-devel ffmpeg-4-libavutil-devel ffmpeg-4-libswscale-devel ffmpeg-4-libavdevice-devel                
# Prefer: -ffmpeg-private-devel -libavcodec-devel -libavformat-devel -libavutil-devel -libswscale-devel -libavdevice-devel -libavfilter-devel
# ffmpeg-3 and ffmpeg-4 handling in 15.2
%define ffmpeg_pref ffmpeg-3
Prefer: libvpx-devel
Prefer: %{ffmpeg_pref}-libavcodec-devel %{ffmpeg_pref}-libavdevice-devel %{ffmpeg_pref}-libavfilter-devel %{ffmpeg_pref}-libavformat-devel %{ffmpeg_pref}-libavresample-devel %{ffmpeg_pref}-libavutil-devel %{ffmpeg_pref}-libpostproc-devel %{ffmpeg_pref}-libswresample-devel %{ffmpeg_pref}-libswscale-devel %{ffmpeg_pref}-private-devel
Prefer: -ffmpeg3-devel
Substitute: ffmpeg3-devel %{ffmpeg_pref}-libavcodec-devel
Prefer: -libavcodec-devel -libavdevice-devel -libavfilter-devel -libavformat-devel -libavresample-devel -libavutil-devel -libpostproc-devel -libswresample-devel -libswscale-devel -ffmpeg-private-devel
# ffmpeg and its fork libav both provide libswscale; prefer the 'original' ffmpeg
Prefer: -libswscale-libav-devel -libavformat-libav-devel -libavresample-libav-devel -libavcodec-libav-devel -libavdevice-libav-devel -libavfilter-libav-devel -libpostproc-libav-devel -libavutil-libav-devel
Macros:
%ffmpeg_pref ffmpeg-3

### from openSUSE:Leap:15.6

%_repository standard
%suse_version 1500
%sle_version 150600
%is_opensuse 1
%is_backports 0

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

%sles_version 0
%_vendor suse

### from openSUSE:Leap:15.6:Update

%_repository standard
%maintenance_distribution openSUSE Leap 15.6

%distribution home:cschneemann:FroSCon
%_project home:cschneemann:FroSCon

### from home:cschneemann:FroSCon

%_repository standard
%vendor openSUSE
%distribution openSUSE Leap 15.4
%packager https://bugs.opensuse.org
%_obs_cpu_flag_exclude yes

%jobs 4
%_smp_mflags -j4
