diff options
author | Silvino <silvino@bk.ru> | 2019-06-11 00:27:06 +0100 |
---|---|---|
committer | Silvino <silvino@bk.ru> | 2019-06-11 00:27:06 +0100 |
commit | 5adacc390c152b1540372d653712cb41fcb76b7b (patch) | |
tree | 6c7fa82642984b059889796b66dc204dadc1b933 /core/ports.html | |
parent | a55b4d39a97361fd4f04c6547835204b9e5371ac (diff) | |
download | doc-5adacc390c152b1540372d653712cb41fcb76b7b.tar.gz |
ports distcc and ccache revision
Diffstat (limited to 'core/ports.html')
-rw-r--r-- | core/ports.html | 55 |
1 files changed, 49 insertions, 6 deletions
diff --git a/core/ports.html b/core/ports.html index 07d52d2..a61643d 100644 --- a/core/ports.html +++ b/core/ports.html @@ -148,15 +148,15 @@ prtdir /usr/ports/contrib prtdir /usr/ports/ports prtdir /usr/ports/mate - prtdir /usr/ports/kde + prtdir /usr/ports/kde5 ### use mypackage form local directory # prtdir /home/packages/build:mypackage ### log options: - # writelog enabled # (enabled|disabled) - # logmode overwrite # (append|overwrite) - # rmlog_on_success yes # (no|yes) + writelog enabled # (enabled|disabled) + logmode overwrite # (append|overwrite) + rmlog_on_success yes # (no|yes) logfile /var/log/pkgbuild/%n.log # path, %p=path to port dir, %n=port name # %v=version, %r=release @@ -198,14 +198,57 @@ $ prt-get depinst ccache distcc </pre> - <p>Add to /etc/profile;</p> + <p>Configure pkgmk and define number of cores available, + in this example get dynamically Edit /etc/pkgmk.conf;</p> <pre> + ## local compile only + #export JOBS=$(nproc) + #export MAKEFLAGS="-j $JOBS" + + # compile using distcc + # set static cpu cores available + ##export MAKEFLAGS="-j 8" + # get dynamically cpu cores available + export MAKEFLAGS="/usr/bin/distcc -j 2> /dev/null" + export SCONSFLAGS="$MAKEFLAGS" + </pre> + + <p>Set ccaching directory and instructs to use distcc backend;</p> + + <pre> + # ccache settings export PATH="/usr/lib/ccache/:$PATH" - export CCACHE_DIR="/var/cache/ccache" + export CCACHE_DIR="/usr/ports/cache/ccache" + export CCACHE_PREFIX="distcc" export CCACHE_COMPILERCHECK="%compiler% -dumpversion; crux" </pre> + <p>Set distcc hosts and respective number of cpu cores to send work;</p> + <pre> + export DISTCC_HOSTS="localhost/4 worker/4" + export DISTCC_DIR="/urs/ports/distcc" + </pre> + + <p>Configure distcc daemon, edit /etc/rc.d/distccd;</p> + + <pre> + #!/usr/bin/env bash + # + # /etc/rc.d/distccd: start/stop distcc daemon + # + + . /etc/distcc.conf + if [ -z "$DISTCC_ALLOW" ]; then + </pre> + + <p>Create /etc/distcc.conf;</p> + + <pre> + + </pre> + + <a href="index.html">Core OS Index</a> <p> This is part of the Hive System Documentation. |