summaryrefslogtreecommitdiff
blob: 0a3a2ff890eb6d7f1f73ee42ad9c9ccc0d668207 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/nomadii-utils/nomadii-utils-0.8.ebuild,v 1.2 2002/07/09 21:43:55 nitro Exp $

P="nomadII-utils-$PV"
S=${WORKDIR}/${P}

DESCRIPTION="Supports for Creative Nomad II, IIc and II MG under Linux running USB for file transfers and other operations."
HOMEPAGE="http://nomadii.sourceforge.net/"
SRC_URI="mirror://sourceforge/nomadii/${P}.tgz"

KEYWORDS="x86"
LICENSE="GPL-2"
SLOT="0"

DEPEND="virtual/glibc
		>=sys-libs/ncurses-5.2
		readline? ( >=sys-libs/readline-4.1 )"

src_compile() {

	cp -f Makefile Makefile.orig
	sed -e "s:^LIBTERMCAP=-ltermcap$:LIBTERMCAP=-lncurses:" \
		Makefile.orig > Makefile

	cp -f Makefile Makefile.orig
	sed -e "s:^OPTIMIZER= -O2$:OPTIMIZER= ${CFLAGS}:" \
		Makefile.orig > Makefile

	if [ -z "`use readline`" ] ; then
		cp -f Makefile Makefile.orig
		sed -e "s:^USE_READLINE=1$:USE_READLINE=0:" \
			Makefile.orig > Makefile
	fi
		
	emake || die "compile failure"
}

src_install() {

	dodir /usr/bin /usr/share/man/man1
	dobin nomadii 
	newman nomadii.man nomadii.1

}

pkg_postinst() {
	if ! groupmod usb; then
        groupadd -g 85 usb || die "problem adding group usb"
    fi

	echo
	einfo "To use nomadii, you need to have usbdevfs compiled in your kernel"
	einfo "Look for: CONFIG_USB_DEVICEFS or Preliminary USB device filesystem"
	echo
	einfo "To use nomadii as a regular user, add the following to /etc/fstab"
	einfo "   usbdevfs /proc/bus/usb usbdevfs devmode=0660,devgid=85 0 0"
	einfo "Remount it, then add the regular user to the usb group"
	einfo "   usermod -G usb <username>"
	echo
}