about summary refs log tree commit diff stats
path: root/core/conf
diff options
context:
space:
mode:
Diffstat (limited to 'core/conf')
-rw-r--r--core/conf/pkgmk.conf26
-rwxr-xr-xcore/conf/rc.d/distccd33
2 files changed, 54 insertions, 5 deletions
diff --git a/core/conf/pkgmk.conf b/core/conf/pkgmk.conf
index 18d8730..c94fea7 100644
--- a/core/conf/pkgmk.conf
+++ b/core/conf/pkgmk.conf
@@ -2,12 +2,20 @@
 # /etc/pkgmk.conf: pkgmk(8) configuration
 #
 
-export CFLAGS="-O2 -march=x86-64"
+export CFLAGS="-O2 -g -march=x86-64"
 export CXXFLAGS="${CFLAGS}"
 
+# 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"
+
 case ${PKGMK_ARCH} in
 	"64"|"")
 		;;
@@ -23,16 +31,14 @@ case ${PKGMK_ARCH} in
 		;;
 esac
 
-PKGMK_SOURCE_MIRRORS=(https://hive.gnu.systems/mirror/distfiles/)
+PKGMK_SOURCE_MIRRORS=(http://c1.ank/distfiles/ http://c1.ank/archive/distfiles/)
 # PKGMK_SOURCE_DIR="$PWD"
 PKGMK_SOURCE_DIR="/usr/ports/distfiles"
 # PKGMK_PACKAGE_DIR="$PWD"
 PKGMK_PACKAGE_DIR="/usr/ports/packages"
 # PKGMK_WORK_DIR="$PWD/work"
-PKGMK_WORK_DIR="/usr/ports/work/${name}"
+PKGMK_WORK_DIR="/usr/ports/work/$name"
 # PKGMK_DOWNLOAD="no"
-# PKGMK_IGNORE_SIGNATURE="no"
-# PKGMK_IGNORE_MD5SUM="no"
 # PKGMK_IGNORE_FOOTPRINT="no"
 # PKGMK_IGNORE_NEW="no"
 # PKGMK_NO_STRIP="no"
@@ -40,5 +46,15 @@ PKGMK_WORK_DIR="/usr/ports/work/${name}"
 # PKGMK_WGET_OPTS=""
 # PKGMK_CURL_OPTS=""
 # PKGMK_COMPRESSION_MODE="gz"
+# PKGMK_UP_TO_DATE=yes
+
+## ccache settings
+#export PATH="/usr/lib/ccache/:$PATH"
+#export CCACHE_DIR="/usr/ports/cache/ccache"
+#export CCACHE_PREFIX="distcc"
+#export CCACHE_COMPILERCHECK="%compiler% -dumpversion; crux"
+#
+#export DISTCC_HOSTS="localhost/4 worker/4"
+#export DISTCC_DIR="/urs/ports/distcc"
 
 # End of file
diff --git a/core/conf/rc.d/distccd b/core/conf/rc.d/distccd
new file mode 100755
index 0000000..65a166d
--- /dev/null
+++ b/core/conf/rc.d/distccd
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+#
+# /etc/rc.d/distccd: start/stop distcc daemon
+#
+
+. /etc/distcc.conf
+if [ -z "$DISTCC_ALLOW" ]; then 
+    echo "Please define a range of IPs allowed to connect to this distccd"
+    echo "host in DISTCC_ALLOW in /etc/rc.conf. More detailed information"
+    echo "can be found in the distcc's README package."
+    exit 1
+fi
+
+DISTCC_USER="${DISTCC_USER:=nobody}"
+DISTCC_LOG_LEVEL="${DISTCC_LOG_LEVEL:=notice}"
+
+case $1 in
+start)
+	/usr/sbin/distccd --daemon --user "$DISTCC_USER" --allow "$DISTCC_ALLOW" --log-level "$DISTCC_LOG_LEVEL"
+	;;
+stop)
+	killall -q /usr/sbin/distccd
+	;;
+restart)
+	$0 stop
+	$0 start
+	;;
+*)
+	echo "usage: $0 [start|stop|restart]"
+	;;
+esac
+
+# End of file