diff options
author | riggs <riggs@FreeBSD.org> | 2017-01-21 23:51:08 +0800 |
---|---|---|
committer | riggs <riggs@FreeBSD.org> | 2017-01-21 23:51:08 +0800 |
commit | 6c58002880bfe3cdd0fbe17aa7b5cc92f8e3efd4 (patch) | |
tree | 282c06ba1024a47d46f89d105ad181bfe2a0a9b6 /audio | |
parent | 23722f6547efe07f0eab22756f8b40b5dd9dcd96 (diff) | |
download | freebsd-ports-gnome-6c58002880bfe3cdd0fbe17aa7b5cc92f8e3efd4.tar.gz freebsd-ports-gnome-6c58002880bfe3cdd0fbe17aa7b5cc92f8e3efd4.tar.zst freebsd-ports-gnome-6c58002880bfe3cdd0fbe17aa7b5cc92f8e3efd4.zip |
Added rc.d script to start jackd
PR: 215889
Submitted by: yuri@rawbw.com
Diffstat (limited to 'audio')
-rw-r--r-- | audio/jack/Makefile | 3 | ||||
-rw-r--r-- | audio/jack/files/jackd.in | 35 |
2 files changed, 37 insertions, 1 deletions
diff --git a/audio/jack/Makefile b/audio/jack/Makefile index 3c2ca847b3dd..f48e9a4f6c19 100644 --- a/audio/jack/Makefile +++ b/audio/jack/Makefile @@ -3,7 +3,7 @@ PORTNAME= jackit PORTVERSION= 0.124.1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= audio MASTER_SITES= http://jackaudio.org/downloads/ DISTNAME= jack-audio-connection-kit-${PORTVERSION} @@ -22,6 +22,7 @@ LIB_DEPENDS= libsndfile.so:audio/libsndfile \ GNU_CONFIGURE= yes USE_LDCONFIG= yes USES= gmake pathfix pkgconfig libtool bdb +USE_RC_SUBR= jackd CONFIGURE_ARGS= --disable-portaudio \ --with-default-tmpdir=/tmp diff --git a/audio/jack/files/jackd.in b/audio/jack/files/jackd.in new file mode 100644 index 000000000000..fce713a74330 --- /dev/null +++ b/audio/jack/files/jackd.in @@ -0,0 +1,35 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: jackd +# REQUIRE: LOGIN +# +# Add the following line to /etc/rc.conf to enable jackd: +# +# jackd_enable="YES" +# + +: ${jackd_enable="NO"} +: ${jackd_user="root"} +: ${jackd_rtprio="NO"} +: ${jackd_args="-r -doss -r44100 -p1024 -n3 -w16"} + +. /etc/rc.subr + +name=jackd +rcvar=jackd_enable +procname=%%PREFIX%%/bin/jackd +start_cmd="start_jackd" + +start_jackd() { + echo "Starting ${name}." + if [ $jackd_rtprio = "YES" ]; then + local rt="rtprio 1" + fi + # daemon(8) should be able to set the realtime priority, but it isn't + $rt daemon -p /var/run/${name}.pid -u ${jackd_user} %%PREFIX%%/bin/jackd ${jackd_args} >/var/log/${name}.log 2>&1 +} + +load_rc_config ${name} +run_rc_command "$1" |