/[gentoo-x86]/net-misc/asterisk-extra-sounds/asterisk-extra-sounds-1.4.11.ebuild
Gentoo

Contents of /net-misc/asterisk-extra-sounds/asterisk-extra-sounds-1.4.11.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Feb 27 19:01:55 2011 UTC (3 years, 4 months ago) by chainsaw
Branch: MAIN
Changes since 1.3: +2 -2 lines
Mark stable on AMD64 for security bug #352059. Arch testing by Agostino "ago" Sarubbo.

(Portage version: 2.1.9.41/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-extra-sounds/asterisk-extra-sounds-1.4.11.ebuild,v 1.3 2011/02/26 17:19:10 tomka Exp $
4
5 EAPI="2"
6
7 DESCRIPTION="Extra sounds for asterisk"
8 HOMEPAGE="http://www.asterisk.org/"
9 LINGUAS="^en fr" # ^ is used to indicate to the loops below to NOT set this as an optional
10 CODECS="alaw g722 g729 +gsm siren7 siren14 sln16 ulaw wav"
11
12 SRC_URI=""
13 IUSE="${CODECS}"
14 for l in ${LINGUAS}; do
15 [[ "${l}" != ^* ]] && IUSE+=" linguas_${l}" && SRC_URI+=" linguas_${l}? ("
16 for c in ${CODECS}; do
17 SRC_URI+=" ${c#+}? ( http://downloads.asterisk.org/pub/telephony/sounds/releases/${PN}-${l#^}-${c#+}-${PV}.tar.gz )"
18 done
19 [[ "${l}" = ^* ]] || SRC_URI+=" )"
20 done
21
22 LICENSE="CCPL-Attribution-ShareAlike-3.0"
23 SLOT="0"
24 KEYWORDS="amd64 x86"
25
26 DEPEND=">=net-misc/asterisk-1.4"
27
28 S="${WORKDIR}"
29
30 src_unpack() {
31 local ar
32
33 for ar in ${A}; do
34 l="${ar#${PN}-}"
35 l=${l%%-*}
36 echo ">>> Unpacking $ar to ${WORKDIR}/${l}"
37 [ -d "${WORKDIR}/${l}" ] || mkdir "${WORKDIR}/${l}" || die "Error creating unpack directory"
38 tar xf "${DISTDIR}/${ar}" -C "${WORKDIR}/${l}" || die "Error unpacking ${ar}"
39 done
40 }
41
42 src_install() {
43 for l in ${LINGUAS}; do
44 if [[ "${l}" = ^* ]] || use linguas_${l}; then
45 l="${l#^}"
46 dodoc ${l}/CHANGES-${PN%-sounds}-${l}-${PV} ${l}/${PN#asterisk-}-${l}.txt
47 rm ${l}/CHANGES-${PN%-sounds}-${l}-${PV} ${l}/${PN#asterisk-}-${l}.txt
48 fi
49 done
50
51 diropts -m 0770 -o asterisk -g asterisk
52 insopts -m 0660 -o asterisk -g asterisk
53
54 dodir /var/lib/asterisk/sounds
55 insinto /var/lib/asterisk/sounds
56 doins -r .
57 }
58
59 pkg_postinst() {
60 local c has_once_codec=
61
62 for c in ${CODECS}; do
63 use ${c#+} && has_one_codec=1
64 done
65
66 [ -n "${has_one_codec}" ] || ewarn "You have none of the codec use flags (${CODECS}) set. You need to have at least one set in order for this package to be useful."
67 }

  ViewVC Help
Powered by ViewVC 1.1.20