# Per-platform rpm configuration file.

#==============================================================================
# ---- per-platform macros.
#
%_arch			arm
%_build_arch		arm
%_vendor		pc
%_os			linux
%_gnu			-gnu
%_target_platform	%{_target_cpu}-%{_vendor}-%{_target_os}
%optflags		-O2 -g -march=armv6 -mfloat-abi=hard -mfpu=vfp

%__isa_name		armv6hl
%__isa_bits		32
%__isa			%{__isa_name}-%{__isa_bits}

# The default transaction color. This value is a set of bits to
# determine file and dependency affinity for this arch.
#	0	uncolored (i.e. use only arch as install hint)
#	1	Elf32 permitted
#	2	Elf64 permitted
%_transaction_color	0

#==============================================================================
# ---- configure macros.
#
%_prefix		/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/usr
%_exec_prefix		/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/usr
%_bindir		/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/usr/bin
%_sbindir		/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/usr/bin
%_libexecdir		/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/usr/libexec
%_datarootdir		%{_prefix}/share
%_datadir		/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/usr/share
%_sysconfdir		/etc
%_sharedstatedir	/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/com
%_localstatedir		/var
%_lib			lib
%_libdir		/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/usr/lib
%_includedir		/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/usr/include
%_oldincludedir		/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/usr/include
%_infodir		/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/usr/share/info
%_mandir		/opt/petalinux/2020.3/sysroots/x86_64-petalinux-linux/usr/share/man
%_initddir		%{_sysconfdir}/rc.d/init.d
# Deprecated misspelling, present for backwards compatibility.
%_initrddir		%{_initddir}
%_rundir		/run

%_defaultdocdir		%{_datadir}/doc

# Maximum number of CPU's to use when building, 0 for unlimited.
#%_smp_ncpus_max 0
%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
	&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
        ncpus_max=%{?_smp_ncpus_max}; \\\
        if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$RPM_BUILD_NCPUS" -gt "$ncpus_max" ]; then RPM_BUILD_NCPUS="$ncpus_max"; fi; \\\
        if [ "$RPM_BUILD_NCPUS" -gt 1 ]; then echo "-j$RPM_BUILD_NCPUS"; fi)

#==============================================================================
# ---- Build policy macros.
#
#---------------------------------------------------------------------
#	Expanded at end of %install scriptlet.
#

%__arch_install_post   %{nil}
%_python_bytecompile_errors_terminate_build 0
%_python_bytecompile_extra   1

# Standard brp-macro naming:
# convert all '-' in basename to '_', add two leading underscores.
%__brp_compress %{_rpmconfigdir}/brp-compress
%__brp_java_gcjcompile %{_rpmconfigdir}/brp-java-bytecompile
%__brp_python_bytecompile %{_rpmconfigdir}/brp-python-bytecompile "" "%{?_python_bytecompile_errors_terminate_build}" "%{?_python_bytecompile_extra}"
%__brp_strip %{_rpmconfigdir}/brp-strip %{__strip}
%__brp_strip_comment_note %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump}
%__brp_strip_shared %{_rpmconfigdir}/brp-strip-shared
%__brp_strip_static_archive %{_rpmconfigdir}/brp-strip-static-archive %{__strip}

%__os_install_post    \
    %{?__brp_compress} \
    %{?__brp_strip} \
    %{?__brp_strip_static_archive} \
    %{?__brp_strip_comment_note} \
%{nil}

%__spec_install_post\
    %{?__debug_package:%{__debug_install_post}}\
    %{__arch_install_post}\
    %{__os_install_post}\
%{nil}

