summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Cox <steel300@gentoo.org>2004-04-02 20:25:59 +0000
committerJason Cox <steel300@gentoo.org>2004-04-02 20:25:59 +0000
commitaba1f6e74800db64276195863bfb3a8e9aa10c19 (patch)
tree33c307fd5d4f5e4924f188c155200fb0df9cbedb /media-libs/libnjb
parentadd s390 to keywords (Manifest recommit) (diff)
downloadgentoo-2-aba1f6e74800db64276195863bfb3a8e9aa10c19.tar.gz
gentoo-2-aba1f6e74800db64276195863bfb3a8e9aa10c19.tar.bz2
gentoo-2-aba1f6e74800db64276195863bfb3a8e9aa10c19.zip
Add the hotplug script. Version Bump.
Diffstat (limited to 'media-libs/libnjb')
-rw-r--r--media-libs/libnjb/ChangeLog8
-rw-r--r--media-libs/libnjb/files/digest-libnjb-1.0.2_pre20040222-r11
-rw-r--r--media-libs/libnjb/files/nomadjukebox35
-rw-r--r--media-libs/libnjb/libnjb-1.0.2_pre20040222-r1.ebuild38
4 files changed, 81 insertions, 1 deletions
diff --git a/media-libs/libnjb/ChangeLog b/media-libs/libnjb/ChangeLog
index 329e79d50c89..9bbc2268ce72 100644
--- a/media-libs/libnjb/ChangeLog
+++ b/media-libs/libnjb/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for media-libs/libnjb
# Copyright 2000-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/libnjb/ChangeLog,v 1.4 2004/03/04 10:58:02 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libnjb/ChangeLog,v 1.5 2004/04/02 20:25:59 steel300 Exp $
+
+*libnjb-1.0.2_pre20040222-r1 (02 Apr 2004)
+
+ 02 Apr 2004; Jason Cox <steel300@gentoo.org>
+ libnjb-1.0.2_pre20040222-r1.ebuild:
+ Version Bump. Add Nomad Hotplug Script.
*libnjb-1.0.2_pre20040222 (04 Mar 2004)
diff --git a/media-libs/libnjb/files/digest-libnjb-1.0.2_pre20040222-r1 b/media-libs/libnjb/files/digest-libnjb-1.0.2_pre20040222-r1
new file mode 100644
index 000000000000..023412233897
--- /dev/null
+++ b/media-libs/libnjb/files/digest-libnjb-1.0.2_pre20040222-r1
@@ -0,0 +1 @@
+MD5 70fd867fc47cda7abfefc4e9b9cdb2ca libnjb-1.0.2-0.20040222.tar.gz 658821
diff --git a/media-libs/libnjb/files/nomadjukebox b/media-libs/libnjb/files/nomadjukebox
new file mode 100644
index 000000000000..bc6c9e32d64c
--- /dev/null
+++ b/media-libs/libnjb/files/nomadjukebox
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Lifts a plugged in nomad jukebox to user space and
+# optionally runs a client program.
+# Written by Linus Walleij 2004, based on the "usbcam"
+# script by Nalin Dahyabhai.
+DEVICEOWNER=CONSOLE
+DEVICEPERMS=0600
+PROGRAM="cd ~; gnomad2 --display=localhost:0"
+
+if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
+then
+ # New code, using lock files instead of copying /dev/console permissions
+ # This also works with non-gdm logins (e.g. on a virtual terminal)
+ # Idea and code from Nalin Dahyabhai <nalin@redhat.com>
+ if [ "x$DEVICEOWNER" = "xCONSOLE" ]
+ then
+ if [ -f /var/run/console.lock ]
+ then
+ DEVICEOWNER=`cat /var/run/console.lock`
+ elif [ -f /var/lock/console.lock ]
+ then
+ DEVICEOWNER=`cat /var/lock/console.lock`
+ else
+ DEVICEOWNER=
+ fi
+ fi
+ if [ -n "$DEVICEOWNER" ]
+ then
+ chmod 0000 "${DEVICE}"
+ chown "${DEVICEOWNER}" "${DEVICE}"
+ chmod "${DEVICEPERMS}" "${DEVICE}"
+ # Then run an optional program - this does not work yet.
+ # su "${CONSOLEOWNER}" -c "${PROGRAM}"
+ fi
+fi
diff --git a/media-libs/libnjb/libnjb-1.0.2_pre20040222-r1.ebuild b/media-libs/libnjb/libnjb-1.0.2_pre20040222-r1.ebuild
new file mode 100644
index 000000000000..63a896ad1174
--- /dev/null
+++ b/media-libs/libnjb/libnjb-1.0.2_pre20040222-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-libs/libnjb/libnjb-1.0.2_pre20040222-r1.ebuild,v 1.1 2004/04/02 20:25:59 steel300 Exp $
+
+DESCRIPTION="libnjb is a C library and API for communicating with the Creative Nomad JukeBox digital audio player under BSD and Linux."
+HOMEPAGE="http://libnjb.sourceforge.net/"
+SRC_URI="mirror://sourceforge/gnomad2/libnjb-1.0.2-0.20040222.tar.gz"
+RESTRICT="nomirror"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+DEPEND=">=dev-libs/libusb-0.1.7"
+
+S="${WORKDIR}/libnjb-1.0.2"
+
+src_compile() {
+ unpack ${A}; cd ${S}
+ epatch ${FILESDIR}/libnjb-errno.patch
+
+ sed -i "s:all\: lib samples filemodes:all\: lib filemodes:g" Makefile.in
+ econf || die "./configure failed."
+ emake -j1 || die "make failed."
+}
+
+src_install() {
+ # borks make DESTDIR=${D} install || die
+ einstall || die
+
+ # Backwards compatability
+ dosym libnjb.so /usr/lib/libnjb.so.0
+ prepalldocs
+ dodoc FAQ LICENSE INSTALL CHANGES README
+ exeinto /etc/hotplug/usb/
+ doexe ${FILESDIR}/nomadjukebox
+ cp ${ROOT}/etc/hotplug/usb.usermap ${D}/etc/hotplug/usb.usermap
+ cat nomad.usermap >> ${D}/etc/hotplug/usb.usermap
+}