exherbo-impulze/packages/sys-apps/halevt/halevt-0.1.4.exheres-0
2010-10-10 12:50:06 +02:00

63 lines
1.4 KiB
Bash

# Copyright 2009 Daniel Mierswa <impulze@impulze.org>
# Distributed under the terms of the GNU General Public License, v2 or later
DESCRIPTION="A daemon that executes arbitrary commands when a device with
certain properties is added to the system and when device properties change."
HOMEPAGE="http://www.nongnu.org/halevt/"
DOWNLOADS="mirror://savannah/halevt/${PNV}.tar.gz"
LICENCES="GPL-2"
SLOT="0"
PLATFORMS="~amd64"
MYOPTIONS="baselayout"
DEPENDENCIES="
build:
dev-util/pkg-config
build+run:
dev-libs/BoolStuff
dev-libs/dbus-glib
dev-libs/libxml2
sys-apps/dbus
sys-apps/hal
"
DEFAULT_SRC_CONFIGURE_PARAMS=(
--enable-default-user=root
--enable-default-group=plugdev
--localstatedir=/var
)
src_install() {
default
keepdir /var/{lib,run}/halevt
insinto /etc/halevt
doins *.xml
if option baselayout ; then
hereinitd halevt <<EOF
#!/sbin/runscript
# Copyright 2009 Daniel Mierswa <impulze@impulze.org>
# Distributed under the terms of the GNU General Public License, v2 or later
depend() {
need hald
}
start() {
ebegin "Starting halevt"
start-stop-daemon --start --exec /usr/bin/halevt --pidfile /var/run/halevt/halevt.pid
eend $?
}
stop() {
ebegin "Stopping halevt"
start-stop-daemon --stop --pidfile /var/run/halevt/halevt.pid
eend $?
}
EOF
fi
}