62 lines
1.3 KiB
Bash
62 lines
1.3 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=""
|
|
|
|
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
|
|
|
|
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
|
|
}
|
|
|