%endif \
%ifarch %{ix86} \
GOARCH=${GOARCH-386} \\\
+%ifarch %{x86_with_sse2} \
+ GO386=${GO386-sse2} \\\
+%else \
+ GO386=${GO386-softfloat} \\\
+%endif \
%endif \
%ifarch %{x8664} \
GOARCH=${GOARCH-amd64} \\\
%ifarch mips mips64 ppc64 ppc64le riscv64 s390x \
GOARCH=${GOARCH-%{_arch}} \\\
%endif \
- %{?go_cachedir:GOCACHE="%{go_cachedir}"} \\\
+ %{?go_cachedir:GOCACHE="${GOCACHE-%{go_cachedir}}"} \\\
%{?__jobs:GOMAXPROCS=%{__jobs}} \\\
GOOS=${GOOS-linux} \\\
/usr/bin/go
# Python 3.x
# python main version
%__python3 /usr/bin/python3
-%py3_ver %{expand:%%global py3_ver %(%{__python3} -c "import sys; print(sys.version[:3])" 2>/dev/null || echo ERROR)}%py3_ver
+%py3_ver %{expand:%%global py3_ver %(%{__python3} -c "from sys import version_info; print('{}.{}'.format(*version_info[:2]))" 2>/dev/null || echo ERROR)}%py3_ver
# directories
%py3_prefix %{expand:%%global py3_prefix %(%{__python3} -c "import sys; print(sys.prefix)" 2>/dev/null || echo ERROR)}%py3_prefix
%rpmrustflags %debuginforustflags
%rust_arches %{x8664} %{ix86} x32 aarch64 armv6hl armv7hl armv7hnl
-%cargo_target \\\
+%rust_target \\\
%ifarch i586\
i586-unknown-linux-gnu\\\
%endif\
%endif\
%{nil}
+%cargo_target %rust_target
%cargo_targetdir target
-%cargo_objdir %{?buildsubdir:%{_builddir}/%{buildsubdir}/}%{cargo_targetdir}/%{cargo_target}/%{!?debug:release}%{?debug:debug}
+%cargo_objdir %{?buildsubdir:%{_builddir}/%{buildsubdir}/}%{cargo_targetdir}/%{rust_target}/%{!?debug:release}%{?debug:debug}
%__cargo /usr/bin/cargo
%__cargo_common_opts -v --offline
RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" \\\
%{?__jobs:CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-%{__jobs}}"} \\\
%{__cargo} %{__cargo_common_opts} build %{!?debug:--release} \\\
- --target %{cargo_target} \\\
+ --target %{rust_target} \\\
--target-dir %{cargo_targetdir} \\\
%{nil}
RUSTFLAGS="${RUSTFLAGS:-%rpmrustflags}" \\\
%{?__jobs:CARGO_BUILD_JOBS="${CARGO_BUILD_JOBS:-%{__jobs}}"} \\\
%{__cargo} %{__cargo_common_opts} install \\\
- --target %{cargo_target} \\\
+ --target %{rust_target} \\\
--target-dir %{cargo_targetdir} \\\
%{nil}
%debugcppflags %{nil}
%debugldflags %{nil}
-%optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc
+%optldflags -Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc %{?use_ld:-Wl,-fuse-ld=%{use_ld}}
%optcppflags %{nil}
# common compilation flags
-%define rpm_macros_rev 2.011
+%define rpm_macros_rev 2.013
%define find_lang_rev 1.40
# split into individual X_prov_ver if there is a reason to desync
%define prov_ver 4.15
Summary(pl.UTF-8): Makra RPM dla Linuksa TLD
Name: rpm-tld-macros
Version: %{rpm_macros_rev}
-Release: 7
+Release: 1
License: GPL v2+
Group: Development/Building
Source0: macros.tld