Skip to content

Instantly share code, notes, and snippets.

@stuartcampbell
Created November 17, 2016 21:31
Show Gist options
  • Select an option

  • Save stuartcampbell/8eedba36eaad359a3a9da87e80f00784 to your computer and use it in GitHub Desktop.

Select an option

Save stuartcampbell/8eedba36eaad359a3a9da87e80f00784 to your computer and use it in GitHub Desktop.
My RPM macros file
# This is basically my default RHEL7 one
%_topdir %(echo $HOME)/rpmbuild
%_smp_mflags %( \
[ -z "$RPM_BUILD_NCPUS" ] \\\
&& RPM_BUILD_NCPUS="`/usr/bin/nproc 2>/dev/null || \\\
/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
if [ "$RPM_BUILD_NCPUS" -gt 16 ]; then \\\
echo "-j16"; \\\
elif [ "$RPM_BUILD_NCPUS" -gt 3 ]; then \\\
echo "-j$RPM_BUILD_NCPUS"; \\\
else \\\
echo "-j3"; \\\
fi )
%__arch_install_post \
[ "%{buildarch}" = "noarch" ] || QA_CHECK_RPATHS=1 ; \
case "${QA_CHECK_RPATHS:-}" in [1yY]*) /usr/lib/rpm/check-rpaths ;; esac \
/usr/lib/rpm/check-buildroot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment