[packages/rpm] - pattern_Release cannot be overriden, change it in main macro file
Elan Ruusamäe
glen at pld-linux.org
Sat Sep 15 17:49:26 CEST 2012
On 09/15/2012 07:32 AM, Jeffrey Johnson wrote:
> The reason is that there are now ~500 macros being
> carried around through all modes of operation, of which
> maybe 50 have any use outside of package building.
especially annoying ones are ones that %(execute) something.
therefore i've done over the time two kinds of optimizations in pld:
1. make such macros evaluate once:
# if %{_topdir}/SPECS exists, it's old style structure
%_specdir %{expand:%%global _specdir %([ ! -d %{_topdir}/SPECS ]
&& echo %{_topdir}/%{name} || echo %{_topdir}/SPECS)}
%_specdir
%_sourcedir %{expand:%%global _sourcedir %([ ! -d %{_topdir}/SOURCES
] && echo %{_specdir} || echo %{_topdir}/SOURCES)}%_sourcedir
2. in pld builder script, start with blank macros (skip our build
macros), define ones used in .spec as %{nil} or () to leave syntax (but
not values) valid
this at the time i made it, in php.spec optimized ./builder -bp from 3m
to 3s
https://github.com/pld-linux/rpm-build-tools/commit/fa4bf1df3b2e998160d56004a956c6d3451b0e0b
--
glen
More information about the pld-devel-en
mailing list