diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2008-11-27 10:00:39 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2008-11-27 10:00:39 +0000 |
commit | d2773581e7cd723b8ff8a78104a6b18ebbaabfc2 (patch) | |
tree | 7e719fb8bf1e9fd3b3be9d470a64a7f3ca886a9a /core/distcc | |
parent | 61facd2730fe966a48478c815dd2b3676ef70ab1 (diff) | |
download | aports-d2773581e7cd723b8ff8a78104a6b18ebbaabfc2.tar.bz2 aports-d2773581e7cd723b8ff8a78104a6b18ebbaabfc2.tar.xz |
core/distcc: new aport
Diffstat (limited to 'core/distcc')
-rw-r--r-- | core/distcc/APKBUILD | 34 | ||||
-rw-r--r-- | core/distcc/distccd.confd | 45 | ||||
-rw-r--r-- | core/distcc/distccd.initd | 38 |
3 files changed, 117 insertions, 0 deletions
diff --git a/core/distcc/APKBUILD b/core/distcc/APKBUILD new file mode 100644 index 000000000..e39c0c2e0 --- /dev/null +++ b/core/distcc/APKBUILD @@ -0,0 +1,34 @@ +pkgname=distcc +pkgver=2.18.3 +pkgrel=0 +pkgdesc="A distributed C, C++, Obj C compiler" +url="http://distcc.samba.org" +license="GPL-2" +depends="popt" +makedepends="popt-dev" +source="http://distcc.samba.org/ftp/distcc/distcc-2.18.3.tar.bz2 + distccd.initd distccd.confd" +subpackages="$pkgname-doc" + +build () +{ + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --without-gtk --sysconfdir=/etc + + make || return 1 + make DESTDIR="$pkgdir" install + + install -D -m644 ../distccd.confd "$pkgdir"/etc/conf.d/distccd + install -D -m755 ../distccd.initd "$pkgdir"/etc/init.d/distccd + + local d="$pkgdir/usr/lib/$pkgname/bin" + mkdir -p "$d" + ln -sf /usr/bin/$pkgname "$d"/cc + ln -sf /usr/bin/$pkgname "$d"/gcc + ln -sf /usr/bin/$pkgname "$d"/g++ + ln -sf /usr/bin/$pkgname "$d"/cpp +} + +md5sums="0d6b80a1efc3a3d816c4f4175f63eaa2 distcc-2.18.3.tar.bz2 +059cb5183d10575ccbde11757931c846 distccd.initd +419f2d8e09108bb5947fecfe33c1df64 distccd.confd" diff --git a/core/distcc/distccd.confd b/core/distcc/distccd.confd new file mode 100644 index 000000000..b4e72b6c1 --- /dev/null +++ b/core/distcc/distccd.confd @@ -0,0 +1,45 @@ +# /etc/conf.d/distccd: config file for /etc/init.d/distccd + +DISTCCD_OPTS="" + +# this is the distccd executable +DISTCCD_EXEC="/usr/bin/distccd" + +# this is where distccd will store its pid file +DISTCCD_PIDFILE="/var/run/distccd/distccd.pid" + +# set this option to run distccd with extra parameters +# Default port is 3632. For most people the default is okay. +DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632" + +# Logging +# You can change some logging options here: +# --log-file FILE +# --log-level LEVEL [critical,error,warning, notice, info, debug] +# +# Leaving --log-file blank will log to syslog +# example: --log-file /dev/null --log-level warning +# example: --log-level critical + +DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical" + +# SECURITY NOTICE: +# It is HIGHLY recomended that you use the --listen option +# for increased security. You can specify an IP to permit connections +# from or a CIDR mask +# --listen accepts only a single IP +# --allow is now mandatory as of distcc-2.18. +# example: --allow 192.168.0.0/24 +# example: --allow 192.168.0.5 --allow 192.168.0.150 +# example: --listen 192.168.0.2 +DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.0.0/24" +#DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.0.2" + +# set this for niceness +# Default is 15 +DISTCCD_NICE="15" + +#ifdef AVAHI +# Enable zeroconf support in distccd +DISTCCD_AVAHI="no" +#endif diff --git a/core/distcc/distccd.initd b/core/distcc/distccd.initd new file mode 100644 index 000000000..c1490fae3 --- /dev/null +++ b/core/distcc/distccd.initd @@ -0,0 +1,38 @@ +#!/sbin/runscript +# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/files/2.18-r1/init,v 1.1 2008/01/04 03:53:15 betelgeuse Exp $ + +depend() { + local avahi +#ifdef AVAHI + [ ${DISTCCD_AVAHI} = yes ] && avahi="avahi-daemon" +#endif + need net ${avahi} + use ypbind +} + +start() { + [ -e "${DISTCCD_PIDFILE}" ] && rm -f ${DISTCCD_PIDFILE} &>/dev/null + + local args +#ifdef AVAHI + [ ${DISTCCD_AVAHI} = yes ] && args="--zeroconf" +#endif + + ebegin "Starting distccd" + chown distcc `dirname ${DISTCCD_PIDFILE}` >/dev/null 2>&1 + TMPDIR="${TMPDIR}" \ + /sbin/start-stop-daemon --start --quiet --exec ${DISTCCD_EXEC} \ + --pidfile ${DISTCCD_PIDFILE} -- \ + --pid-file ${DISTCCD_PIDFILE} -N ${DISTCCD_NICE} --user distcc \ + ${args} ${DISTCCD_OPTS} + + eend $? +} + +stop() { + ebegin "Stopping distccd" + start-stop-daemon --stop --quiet --pidfile "${DISTCCD_PIDFILE}" \ + && rm -f "${DISTCCD_PIDFILE}" + eend $? +} + |