diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-10-23 09:57:04 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-10-23 09:57:04 +0000 |
commit | 542b9cf486271a9b9637ac422ded2f89a63edea7 (patch) | |
tree | 2283d42235c39b4f0c431f3edde96673a9390d42 /abuild.in | |
parent | 24a42d66f7674221b26d8ff75e82356797641dc2 (diff) | |
download | abuild-542b9cf486271a9b9637ac422ded2f89a63edea7.tar.gz abuild-542b9cf486271a9b9637ac422ded2f89a63edea7.tar.bz2 abuild-542b9cf486271a9b9637ac422ded2f89a63edea7.tar.xz abuild-542b9cf486271a9b9637ac422ded2f89a63edea7.zip |
abuild: dont run build() in fakeroot if package() exist
fakeroot seems do some kind of locking which kills performance on
multicores processors. We can run "make" and "make install" in 2 steps
with only hte latter in fakeroot.
Diffstat (limited to 'abuild.in')
-rwxr-xr-x | abuild.in | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -619,11 +619,22 @@ dev() { default_dev } +is_function() { + type "$1" 2>&1 | head -n 1 | egrep -q "is a (shell )?function" +} + # build and package in fakeroot rootpkg() { + local do_build=build + cd "$startdir" + if is_function package; then + msg "Building without fakeroot" + build || return 1 + do_build= + fi cd "$startdir" msg "Entering fakeroot..." - fakeroot $0 build prepare_subpackages prepare_package create_apks + fakeroot $0 $do_build prepare_subpackages prepare_package create_apks } srcpkg() { |