summaryrefslogtreecommitdiff
blob: 67b03c06d0c8daf8cec13893679cfd6e29a63c72 (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
62
63
64
65
66
67
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# Maintainer: Matt Keadle (mkeadle@mkeadle.org)
# $Header: /var/cvsroot/gentoo-x86/media-sound/speechd/speechd-0.56.ebuild,v 1.3 2002/10/04 05:54:46 vapier Exp $

S=${WORKDIR}/${PN}
DESCRIPTION="Implements /dev/speech (any text written to /dev/speech will be spoken aloud)"
HOMEPAGE="http://www.speechio.org/"
SRC_URI="http://www.speechio.org/dl/${P}.tar.gz"

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

DEPEND="sys-devel/perl
	media-sound/festival"

src_compile() {

	emake || die

}

src_install () {

	dobin ${S}/bin/speechd ${S}/bin/catspeech
	insinto /etc
	doins speechdrc speechd.sub
	doman ${S}/man/man1/*.1
	dodoc README AUTHORS CHANGELOG COPYING TODO

}

pkg_postinst () {

	if ! grep -q ^speech: /etc/group ; then
		groupadd speech || die "problem adding group speech"
	fi
	
	einfo "${GOOD}****************************************************************************** *${NORMAL}"
	einfo "Execute ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config ${GOOD}*${NORMAL}"
	einfo "to build the neccessary FIFO on /dev/speech.                                   ${GOOD}*${NORMAL}"
	einfo "${GOOD}****************************************************************************** *${NORMAL}"



}

pkg_config () {

	mkfifo --mode=0660 /dev/speech
	chown root.speech /dev/speech

	einfo "${GOOD}************************************************************** *${NORMAL}"
	einfo "FIFO has been created on /dev/speech                           ${GOOD}*${NORMAL}"
	einfo "                                                               ${GOOD}*${NORMAL}"
	einfo "In order for non-root users to take advantage of /dev/speech   ${GOOD}*${NORMAL}"
	einfo "they must be added to the 'speech' group.                      ${GOOD}*${NORMAL}"
	einfo "${GOOD}************************************************************** *${NORMAL}"
}

pkg_postrm () {

	einfo "Removing FIFO at /dev/speech ..."
	rm -f /dev/speech

}