blob: c88b6c0a3eaed32557d33dcb09de93144d2acd99 (
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
|
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
# Author: Stefan Briesenick <sbriesen@gentoo.org>
# This eclass is designed to streamline the construction of
# ebuilds for Asterisk voice prompts.
inherit asterisk-mod
EXPORT_FUNCTIONS src_compile src_install
DESCRIPTION="Based on the ${ECLASS} eclass"
DEPEND="net-misc/asterisk"
AST_PROMPT_DOCS=""
AST_PROMPT_EXTS="gsm wav"
AST_PROMPT_LANG="${AST_PN:7:2}"
AST_PROMPT_DIRS="dictate digits letters phonetic"
asterisk-prompt_src_compile() { :; }
asterisk-prompt_src_install() {
local x z
for x in ${AST_PROMPT_DIRS}; do
if [[ -d "${x}" ]]; then
z="${x}/${AST_PROMPT_LANG}"
insinto "${AST_SOUNDS_DIR}/${z}"
if [[ -d "${z}" ]]; then
doins -r "${z}/."
else
doins -r "${x}/."
fi
fi
done
insinto "${AST_SOUNDS_DIR}/${AST_PROMPT_LANG}"
if [[ -d "${AST_PROMPT_LANG}" ]]; then
doins -r "${AST_PROMPT_LANG}/."
else
for x in ${AST_PROMPT_EXTS}; do
doins 2>/dev/null *."${x}"
done
fi
# if no docs specified, check default list
if [[ -z "${AST_PROMPT_DOCS}" ]]; then
for x in ${AST_DOCS}; do
[[ -s "${x}" ]] && AST_PROMPT_DOCS="${AST_PROMPT_DOCS} ${x}"
done
fi
if [[ -n "${AST_PROMPT_DOCS}" ]]; then
echo ">>> Installing documentation files..."
dodoc ${AST_PROMPT_DOCS}
fi
ast_fix_permissions
}
|