summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcelo Góes <vanquirius@gentoo.org>2008-05-20 02:24:04 +0000
committerMarcelo Góes <vanquirius@gentoo.org>2008-05-20 02:24:04 +0000
commitbf6e21b2e11fdf6542bc69a4878f4b6c54818bd2 (patch)
tree8707e7e6c6e3359af3213106a76d9c221ae70c03 /app-cdr/cdemud
parentAdd vhba for bug 198672 - userspace cdemu. Thanks to Daniel Lin <ephemient at... (diff)
downloadgentoo-2-bf6e21b2e11fdf6542bc69a4878f4b6c54818bd2.tar.gz
gentoo-2-bf6e21b2e11fdf6542bc69a4878f4b6c54818bd2.tar.bz2
gentoo-2-bf6e21b2e11fdf6542bc69a4878f4b6c54818bd2.zip
Add cdemud for bug 198672 - userspace cdemu. Thanks to Daniel Lin <ephemient at gmail
dot com>, Daniel Fullmer <cgibreak at gmail dot com>, Sebastian Stammler <stammler at stud.tu-darmstadt.de>, Rafal Muzylo <galtgendo at o2 dot pl>, Jan Bessai <Jan.Bessai at gmx dot de>, Pham Ngoc Hai <pngochai at yahoo dot com>, Petr Sykora <petr.sykora at gmail dot com>, Dirk Best <fatplumber at gmx dot de>, Marcel Schmedes <sm at kleinreich dot de>, Vladi <vladimir.elisseev at gmail dot com>, Ambroz BIzjak <ambro at b4ever dot net> and anyone I missed. (Portage version: 2.1.4.4)
Diffstat (limited to 'app-cdr/cdemud')
-rw-r--r--app-cdr/cdemud/ChangeLog17
-rw-r--r--app-cdr/cdemud/Manifest6
-rw-r--r--app-cdr/cdemud/cdemud-1.0.0.ebuild62
-rw-r--r--app-cdr/cdemud/files/cdemud.conf.d10
-rw-r--r--app-cdr/cdemud/files/cdemud.init.d38
-rw-r--r--app-cdr/cdemud/metadata.xml8
6 files changed, 141 insertions, 0 deletions
diff --git a/app-cdr/cdemud/ChangeLog b/app-cdr/cdemud/ChangeLog
new file mode 100644
index 000000000000..e95e103330f5
--- /dev/null
+++ b/app-cdr/cdemud/ChangeLog
@@ -0,0 +1,17 @@
+# ChangeLog for app-cdr/cdemud
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdemud/ChangeLog,v 1.1 2008/05/20 02:24:03 vanquirius Exp $
+
+*cdemud-1.0.0 (19 May 2008)
+
+ 19 May 2008; Marcelo Goes <vanquirius@gentoo.org> +files/cdemud.conf.d,
+ +files/cdemud.init.d, +metadata.xml, +cdemud-1.0.0.ebuild:
+ Add cdemud for bug 198672 - userspace cdemu. Thanks to Daniel Lin <ephemient
+ at gmail dot com>, Daniel Fullmer <cgibreak at gmail dot com>, Sebastian
+ Stammler <stammler at stud.tu-darmstadt.de>, Rafal Muzylo <galtgendo at o2
+ dot pl>, Jan Bessai <Jan.Bessai at gmx dot de>, Pham Ngoc Hai <pngochai at
+ yahoo dot com>, Petr Sykora <petr.sykora at gmail dot com>, Dirk Best
+ <fatplumber at gmx dot de>, Marcel Schmedes <sm at kleinreich dot de>, Vladi
+ <vladimir.elisseev at gmail dot com>, Ambroz BIzjak <ambro at b4ever dot
+ net> and anyone I missed.
+
diff --git a/app-cdr/cdemud/Manifest b/app-cdr/cdemud/Manifest
new file mode 100644
index 000000000000..874a5befb249
--- /dev/null
+++ b/app-cdr/cdemud/Manifest
@@ -0,0 +1,6 @@
+AUX cdemud.conf.d 152 RMD160 3a50ec49b06fa4bc95d724cb9d41a39f44fb3ceb SHA1 01bbcde953d6927eedca75e4f6a2cc1a1592c746 SHA256 58be861a9fb976b9b35b04037fc6c5fd4636710d49a3f8fc54fd756371c649ec
+AUX cdemud.init.d 986 RMD160 49e0b29a2473c88a189cd845b2bba75f241ddb84 SHA1 8e9cac74a48b53b787bef68040be9e415c8888b0 SHA256 c1379a482759aefb67db1c2d0635d8f5208c5b568aced8b4fc6903f1fc22f381
+DIST cdemu-daemon-1.0.0.tar.bz2 275127 RMD160 49d937003237312e578b443448f3210e340f6acd SHA1 f55940d4009d9f2fec6e6ffc5b354bdaf40c03d6 SHA256 182c569fb11c0dd3e3fea5dc26761fbc63005686455865d49f824177f5b107e0
+EBUILD cdemud-1.0.0.ebuild 1556 RMD160 b6b1129a6bc54b6b231cf247dfb83aef3e85058a SHA1 f9334c76c152735da7b67a491d1830358e2a9c90 SHA256 da95060756afe024c7bf1816b1ab97a527323277939888c9e0131ad9dc304582
+MISC ChangeLog 842 RMD160 7a16537d321d01734437ee058d84a0fb696aec18 SHA1 9d20fb7cec47ec46d21e53e5ec5cd6e8493fc144 SHA256 a597d7bd8b2524883fc5e492e13076913830958531d350a517642947d560d861
+MISC metadata.xml 225 RMD160 461e7786d6f2b4ad0796cdbd8da127d2aa1d9c88 SHA1 7e14b4551dd441a467b812e3b4c4f3fd795e5a58 SHA256 1c4c96d3ac062761d9e938c233751ff32b23e2c21aff1e38df6a37ffa0e97cb1
diff --git a/app-cdr/cdemud/cdemud-1.0.0.ebuild b/app-cdr/cdemud/cdemud-1.0.0.ebuild
new file mode 100644
index 000000000000..7be3872e5fd7
--- /dev/null
+++ b/app-cdr/cdemud/cdemud-1.0.0.ebuild
@@ -0,0 +1,62 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdemud/cdemud-1.0.0.ebuild,v 1.1 2008/05/20 02:24:03 vanquirius Exp $
+
+inherit eutils
+
+DESCRIPTION="Daemon of the cdemu cd image mounting suite"
+HOMEPAGE="http://www.cdemu.org"
+SRC_URI="mirror://sourceforge/cdemu/cdemu-daemon-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+IUSE="alsa"
+
+S="${WORKDIR}/cdemu-daemon-${PV}"
+
+DEPEND=">dev-libs/dbus-glib-0.6
+ >=dev-libs/libdaemon-0.10
+ >=dev-libs/libmirage-1.0.0
+ alsa? ( >=media-libs/alsa-lib-1.0.0
+ >=media-libs/libsndfile-1.0.0 )
+ dev-util/unifdef"
+RDEPEND=">dev-libs/dbus-glib-0.6
+ >=dev-libs/libdaemon-0.10
+ >=dev-libs/libmirage-1.0.0
+ alsa? ( >=media-libs/alsa-lib-1.0.0
+ >=media-libs/libsndfile-1.0.0 )
+ >=sys-fs/vhba-1.0.0"
+
+src_compile() {
+ local myconf
+
+ myconf="--sysconfdir=/etc $(use_enable alsa)"
+
+ econf ${myconf} || die "econf failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "install failed"
+ dodoc AUTHORS ChangeLog README TODO
+ unifdef "${FILESDIR}/${PN}.conf.d" \
+ -$(use alsa && echo D || echo U)ALSA \
+ >"${T}/${PN}"
+ doconfd "${T}/${PN}"
+ unifdef "${FILESDIR}/${PN}.init.d" \
+ -$(use alsa && echo D || echo U)ALSA \
+ >"${T}/${PN}"
+ doinitd "${T}/${PN}"
+}
+
+pkg_postinst() {
+ elog "Either cdemu group users can start"
+ elog "their own daemons or you can start"
+ elog "a systembus style daemon, adding"
+ elog "${PN} to the default runlevel by"
+ elog " # rc-update add ${PN} default"
+ elog "as root. Systembus style daemons can be configured"
+ elog "in /etc/conf.d/{PN}.conf"
+ echo
+}
diff --git a/app-cdr/cdemud/files/cdemud.conf.d b/app-cdr/cdemud/files/cdemud.conf.d
new file mode 100644
index 000000000000..063afbeb6978
--- /dev/null
+++ b/app-cdr/cdemud/files/cdemud.conf.d
@@ -0,0 +1,10 @@
+# Config file for /etc/init.d/cdemu-daemon
+
+CDEMUD_DEVICES=1
+#ifndef ALSA
+CDEMUD_BACKEND=null
+#else
+CDEMUD_BACKEND=ALSA
+CDEMUD_AUDIODEV=default
+#endif
+
diff --git a/app-cdr/cdemud/files/cdemud.init.d b/app-cdr/cdemud/files/cdemud.init.d
new file mode 100644
index 000000000000..7c06c9866549
--- /dev/null
+++ b/app-cdr/cdemud/files/cdemud.init.d
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-cdr/cdemud/files/cdemud.init.d,v 1.1 2008/05/20 02:24:04 vanquirius Exp $
+
+depend() {
+ need dbus
+#ifdef ALSA
+ [ "${CDEMUD_BACKEND}" == ALSA ] && need alsasound
+#endif
+}
+
+start() {
+ ebegin "Loading CDemu userspace daemon"
+ if ! grep -qw vhba /proc/modules; then
+ /sbin/modprobe vhba || eerror $? "Error loading vhba module"
+ fi
+ i=0; until [ -c /dev/vhba_ctl ]; do ((i++<=10)) || break; sleep 1; done
+#ifndef ALSA
+ CDEMUD_ARGS="-a null"
+#else
+ if [ "${CDEMUD_BACKEND}" == ALSA ]; then
+ CDEMUD_ARGS="-a ${CDEMUD_BACKEND} -o ${CDEMUD_AUDIODEV:-default}"
+ else
+ CDEMUD_ARGS="-a null"
+ fi
+#endif
+ CDEMUD_ARGS="-s -d -c /dev/vhba_ctl -n ${CDEMUD_DEVICES:-1} ${CDEMUD_ARGS}"
+ start-stop-daemon --quiet --start --exec /usr/bin/cdemud -- ${CDEMUD_ARGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping CDemu userspace daemon"
+ /usr/bin/cdemud -k; status=$?
+ /sbin/rmmod vhba || eerror $? "Error unloading vhba module"
+ eend "${status}"
+}
diff --git a/app-cdr/cdemud/metadata.xml b/app-cdr/cdemud/metadata.xml
new file mode 100644
index 000000000000..e4fa40918efa
--- /dev/null
+++ b/app-cdr/cdemud/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer>
+ <email>vanquirius@gentoo.org</email>
+</maintainer>
+</pkgmetadata>