/[gentoo-x86]/net-misc/asterisk-core-sounds/asterisk-core-sounds-1.4.21-r1.ebuild
Gentoo

Contents of /net-misc/asterisk-core-sounds/asterisk-core-sounds-1.4.21-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Thu Feb 7 22:33:16 2013 UTC (6 years, 11 months ago) by ulm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +3 -3 lines
Move Creative Commons licenses to shorter names.

(Portage version: 2.1.11.50/cvs/Linux x86_64, signed Manifest commit with key E7BE08CA7DC6EA25)

1 ulm 1.4 # Copyright 1999-2013 Gentoo Foundation
2 chainsaw 1.1 # Distributed under the terms of the GNU General Public License v2
3 ulm 1.4 # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-core-sounds/asterisk-core-sounds-1.4.21-r1.ebuild,v 1.3 2012/02/16 18:43:47 phajdan.jr Exp $
4 chainsaw 1.1
5     EAPI="4"
6    
7     DESCRIPTION="Core sounds for asterisk"
8     HOMEPAGE="http://www.asterisk.org/"
9     LINGUAS="^en fr es ru" # ^ 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=""
14     for c in ${CODECS}; do
15     [[ "${c}" != +* ]] && IUSE+=" ${c}"
16     done
17     for l in ${LINGUAS}; do
18     [[ "${l}" != ^* ]] && IUSE+=" linguas_${l}" && SRC_URI+=" linguas_${l}? ("
19     for c in ${CODECS}; do
20     [[ "${c}" != +* ]] &&
21     SRC_URI+=" ${c#+}? ( http://downloads.asterisk.org/pub/telephony/sounds/releases/${PN}-${l#^}-${c#+}-${PV}.tar.gz )" ||
22     SRC_URI+=" http://downloads.asterisk.org/pub/telephony/sounds/releases/${PN}-${l#^}-${c#+}-${PV}.tar.gz"
23     done
24     [[ "${l}" = ^* ]] || SRC_URI+=" )"
25     done
26    
27 ulm 1.4 LICENSE="CC-BY-SA-3.0"
28 chainsaw 1.1 SLOT="0"
29 phajdan.jr 1.3 KEYWORDS="amd64 x86"
30 chainsaw 1.1
31     DEPEND=">=net-misc/asterisk-1.4"
32    
33     S="${WORKDIR}"
34    
35     src_unpack() {
36     local ar
37    
38     for ar in ${A}; do
39     l="${ar#${PN}-}"
40     l=${l%%-*}
41     c="${ar#${PN}-*-}"
42     c=${c%%-*}
43     ebegin "Unpacking ${c} audio files for \"${l}\""
44     [ -d "${WORKDIR}/${l}" ] || mkdir "${WORKDIR}/${l}" || die "Error creating unpack directory"
45     tar xf "${DISTDIR}/${ar}" -C "${WORKDIR}/${l}" || die "Error unpacking ${ar}"
46     eend $?
47     done
48     }
49    
50     src_install() {
51     for l in ${LINGUAS}; do
52     if [[ "${l}" = ^* ]] || use linguas_${l}; then
53     l="${l#^}"
54     ebegin "Installing documentation for \"${l}\""
55     dodoc ${l}/CHANGES-${PN%-sounds}-${l}-${PV} ${l}/${PN#asterisk-}-${l}.txt
56     rm ${l}/CHANGES-${PN%-sounds}-${l}-${PV} ${l}/${PN#asterisk-}-${l}.txt
57     eend $?
58     fi
59     done
60    
61     diropts -m 0770 -o asterisk -g asterisk
62     insopts -m 0660 -o asterisk -g asterisk
63    
64     ebegin "Installing audio files"
65     dodir /var/lib/asterisk/sounds
66     insinto /var/lib/asterisk/sounds
67     doins -r .
68     eend $?
69     }

  ViewVC Help
Powered by ViewVC 1.1.20