Search code examples
buildffmpegdebiandebdpkg

are there options to speed up dpkg-buildpackage


Im back porting ffmpeg to an older version of debian. everything is going well, but its so slow. I am running dpkg-buildpackage -us -uc

with a debian rules file that looks like this:

#!/usr/bin/make -f
%:
    dh $@

override_dh_auto_configure:
    ./configure

I notice, this is only processing on 1 core. is there anything like make -j 4 that I could use to speed this up?

I've been using this guide, but i don't see anything for speeding up the build step https://www.debian.org/doc/manuals/maint-guide/


Solution

  • Sure, you can use -j 4 as an argument to dpkg-buildpackage. It is documented in the man page. The relevant section is:

    -jjobs Number of jobs allowed to be run simultaneously, equivalent to the make(1) option of the same name. Will add itself to the MAKEFLAGS environment variable, which should cause all subsequent make invocations to inherit the option. Also adds parallel=jobs to the DEB_BUILD_OPTIONS environment variable which allows debian/rules files to use this information for their own purposes. The parallel=jobs in DEB_BUILD_OPTIONS environment variable will override the -j value if this option is given.