#!/usr/bin/sh

NCPUS=${RPM_BUILD_NCPUS:-1}

while IFS='\n' read -r file; do
    printf '%s\0' "${RPM_BUILD_ROOT}${file}"
done | xargs -0 -r -P$NCPUS -n4 /usr/lib/rpm/clean-empty-rpaths-worker
