exherbo-impulze/packages/app-emulation/cdemud/cdemud.exlib

55 lines
1018 B
Bash

# Copyright 2009 Daniel Mierswa <impulze@impulze.org>
# Distributed under the terms of the GNU General Public License v2
require cdemu-common [ name=cdemu-daemon autogen=true suffix=.tar.gz ]
export_exlib_phases src_install
SLOT="0"
DEPENDENCIES="
build+run:
dev-libs/libmirage[>=${PV}]
dev-libs/dbus-glib[>=0.66]
dev-libs/glib[>=2.6]
media-libs/libao[>=0.8.0]
sys-apps/dbus[>=0.60]
sys-fs/sysfsutils
run:
app-emulation/vhba-module
"
MYOPTIONS="baselayout"
cdemud_src_install() {
default
if option baselayout ; then
hereinitd cdemud <<EOF
#!/sbin/runscript
depend() {
after logger
need dbus
}
start() {
ebegin "Starting cdemu daemon"
cdemud \${CDEMUD_OPTS} -d -p /run/cdemud.pid
eend \$?
}
stop() {
ebegin "Stopping cdemu daemon"
cdemud \${CDEMUD_OPTS} -k -p /run/cdemud.pid
eend \$?
}
EOF
hereconfd cdemud <<EOF
# options passed to the cdemud
#CDEMUD_OPTS=--num-devices=10
EOF
fi
}