|
Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2018 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
|
| 4 |
EAPI="6" |
| 5 |
|
| 6 |
inherit versionator multilib |
| 7 |
|
| 8 |
DESCRIPTION="OPUS codec and supporting files for asterisk" |
| 9 |
HOMEPAGE="https://wiki.asterisk.org/wiki/display/AST/Codec+Opus" |
| 10 |
|
| 11 |
MY_PV=$(replace_version_separator 2 _) |
| 12 |
AST_PV=${MY_PV%%_*} |
| 13 |
|
| 14 |
SRC_URI="x86? ( http://downloads.digium.com/pub/telephony/codec_opus/asterisk-${AST_PV}/x86-32/codec_opus-${MY_PV}-x86_32.tar.gz ) |
| 15 |
amd64? ( http://downloads.digium.com/pub/telephony/codec_opus/asterisk-${AST_PV}/x86-64/codec_opus-${MY_PV}-x86_64.tar.gz )" |
| 16 |
|
| 17 |
LICENSE="Digium" |
| 18 |
SLOT="0" |
| 19 |
KEYWORDS="-* ~amd64 ~x86" |
| 20 |
IUSE="" |
| 21 |
|
| 22 |
DEPEND="" |
| 23 |
RDEPEND="${DEPEND} =net-misc/asterisk-${PV%%.*}*" |
| 24 |
|
| 25 |
RESTRICT="mirror strip" |
| 26 |
|
| 27 |
S="${WORKDIR}" |
| 28 |
|
| 29 |
src_install() { |
| 30 |
local arch |
| 31 |
|
| 32 |
if use x86; then |
| 33 |
arch=x86_32 |
| 34 |
elif use amd64; then |
| 35 |
arch=x86_64 |
| 36 |
else |
| 37 |
die "Ebuild only functions for x86 and amd64." |
| 38 |
fi |
| 39 |
|
| 40 |
dodoc codec_opus-${MY_PV}-${arch}/LICENSE |
| 41 |
dodoc codec_opus-${MY_PV}-${arch}/README |
| 42 |
insinto /usr/$(get_libdir)/asterisk/modules/ |
| 43 |
doins "codec_opus-${MY_PV}-${arch}/codec_opus.so" |
| 44 |
|
| 45 |
insinto /var/lib/asterisk/documentation/thirdparty |
| 46 |
doins "codec_opus-${MY_PV}-${arch}/codec_opus_config-en_US.xml" |
| 47 |
} |