Compare commits

...

5 Commits
epel9 ... i9e

4
.gitignore vendored

@ -1,4 +0,0 @@
/*.rpm
/.build-*.log
/epel-rpm-macros-*/
/results_epel-rpm-macros/

@ -0,0 +1,42 @@
# Macros to constrain resource use during the build process
# outputs build flag overrides to be used in conjunction with
# %%make_build, %%cmake_build etc.
#
# if no override is needed, this macro outputs nothing
#
# - m memory limit in MBs per core; default is 1024
#
# Usage:
# e.g. %make_build %{limit_build -m 2048}
# => /usr/bin/make -O -j16 V=1 VERBOSE=1
# %make_build %{limit_build -m 40960}
# => /usr/bin/make -O -j16 V=1 VERBOSE=1 -j1
#
%limit_build(m:) %{lua:
local mem_per_process=rpm.expand("%{-m*}")
if mem_per_process == "" then
mem_per_process = 1024
else
mem_per_process = tonumber(mem_per_process)
end
local mem_total = 0
for line in io.lines('/proc/meminfo') do
if line:sub(1, 9) == "MemTotal:" then
local tokens = {}
for token in line:gmatch("%w+") do
tokens[#tokens + 1] = token
end
mem_total = tonumber(tokens[2])
break
end
end
local max_jobs = mem_total // (mem_per_process * 1024)
if max_jobs < 1 then
max_jobs = 1
end
cur_max_jobs=tonumber(rpm.expand("%{_smp_build_ncpus}"))
if cur_max_jobs > max_jobs then
print("-j" .. max_jobs)
end
}

@ -1,6 +1,6 @@
Name: epel-rpm-macros Name: epel-rpm-macros
Version: 9 Version: 9
Release: 13%{dist} Release: 14%{dist}.inferit
Summary: Extra Packages for Enterprise Linux RPM macros Summary: Extra Packages for Enterprise Linux RPM macros
License: GPLv2 License: GPLv2
@ -15,6 +15,8 @@ Source2: GPL
#Add source for misc macros below here #Add source for misc macros below here
# https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/macros.shell-completions # https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/rawhide/f/macros.shell-completions
Source3: macros.shell-completions Source3: macros.shell-completions
# macros.build-constraints
Source4: macros.build-constraints
BuildArch: noarch BuildArch: noarch
@ -25,6 +27,9 @@ Requires: fpc-srpm-macros
# https://bugzilla.redhat.com/show_bug.cgi?id=2001034 # https://bugzilla.redhat.com/show_bug.cgi?id=2001034
Requires: (pyproject-rpm-macros if python3-rpm-macros) Requires: (pyproject-rpm-macros if python3-rpm-macros)
Requires: ansible-srpm-macros Requires: ansible-srpm-macros
# Backwards-compatible backport of the new forge-srpm-macros from Fedora that
# avoids conflicts with EL 9's old version
Requires: forge-srpm-macros
# Provides backports from Fedora's go-rpm-macros and fixes critical # Provides backports from Fedora's go-rpm-macros and fixes critical
# bugs in RHEL's go-rpm-macros. # bugs in RHEL's go-rpm-macros.
# Just like in Fedora, only the minimal -srpm-macros are needed in the buildroot. # Just like in Fedora, only the minimal -srpm-macros are needed in the buildroot.
@ -59,17 +64,30 @@ install -Dpm 644 %{SOURCE1} \
install -Dpm 644 %{SOURCE3} \ install -Dpm 644 %{SOURCE3} \
%{buildroot}%{_rpmmacrodir}/macros.shell-completions %{buildroot}%{_rpmmacrodir}/macros.shell-completions
install -Dpm 644 %{SOURCE4} \
%{buildroot}%{_rpmmacrodir}/macros.build-constraints
%files %files
%license GPL %license GPL
%{_rpmmacrodir}/macros.epel-rpm-macros %{_rpmmacrodir}/macros.epel-rpm-macros
%{_sysconfdir}/rpm/macros.zzz-epel-override %{_sysconfdir}/rpm/macros.zzz-epel-override
%{_rpmmacrodir}/macros.shell-completions %{_rpmmacrodir}/macros.shell-completions
%{_rpmmacrodir}/macros.build-constraints
%changelog %changelog
* Tue Aug 27 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 9-14.inferit
- Add macros.build-constraints to the buildroot
* Sat Mar 02 2024 Maxwell G <maxwell@gtmx.me> - 9-14
- Add forge-srpm-macros to the buildroot
* Thu Oct 05 2023 Mattias Ellert <mattias.ellert@physics.uu.se> - 9-13 * Thu Oct 05 2023 Mattias Ellert <mattias.ellert@physics.uu.se> - 9-13
- Add qt6-srpm-macros to the buildroot. Fixes rhbz#2220860. - Add qt6-srpm-macros to the buildroot. Fixes rhbz#2220860.
* Mon Jul 24 2023 Arkady L. Shane <ashejn@msvsphere.ru> - 9-12
- Rebuilt for MSVSphere 9.2
* Wed May 10 2023 Maxwell G <maxwell@gtmx.me> - 9-12 * Wed May 10 2023 Maxwell G <maxwell@gtmx.me> - 9-12
- Rebuild for RHEL 9.2 - Rebuild for RHEL 9.2
Loading…
Cancel
Save