The way sounds and moh is currently dealt with is restrictive, and the current asterisk-sounds package is seemingly still a match to asterisk 1.2, thus I intend to submit three new ebuilds: net-misc/asterisk-core-sounds net-misc/asterisk-extra-sounds net-misc/asterisk-moh-opsound The core-sounds is the same sounds that currently gets installed with asterisk module, except the ebuild supports all the codec variants made available by digium. The extra-sounds package contains a very close set to the current asterisk-sounds package. asterisk-moh-opsound is the current default music on hold music. Again, for each codec there is a USE flag to install or not to install. In the case of the two sounds packages the LINGUAS USE_EXPAND variable is queried to determine which of english or french should be installed. I'll also submit two patches to be applied to the asterisk-1.6.1.20 and asterisk-1.6.2.8 ebuilds to prevent it from installing sounds and to instead PDEPEND on the above packages. Reproducible: Always Steps to Reproduce:
Created attachment 238951 [details] asterisk-core-sounds-1.4.19.ebuild
Created attachment 238953 [details] asterisk-extra-sounds-1.4.11.ebuild
Created attachment 238955 [details] asterisk-moh-opsound-2.03.ebuild
Created attachment 238957 [details] metadata.xml The same metadata.xml file can be used for all three ebuilds in this case. The metadata.xml file merely describes the USE flags.
Created attachment 238959 [details, diff] asterisk-sounds-ebuild.patch This patch will apply to asterisk-1.6.1.20 as well as asterisk-1.6.2.9 in order to set the appropriate PDEPEND values on the submitted three ebuilds, as well as to blank out sounds/sounds.xml, effectively preventing the core asterisk ebuild from installing sounds files.
Stalled pending further discussion & testing; not going into 1.6.2.9-r1
Created attachment 240777 [details] asterisk-moh-opsound-2.03.ebuild Remove gsm USE flag as per discussion with Tony, this will now always install the gsm variants, plus any additional selected codecs. I've left the ability to use + and - in the codecs to set default values for any other codecs even though none of them currently makes use of it.
Created attachment 240779 [details] asterisk-core-sounds-1.4.19.ebuild gsm and en force-enabled, ability for + and - indicators once more left in place.
Created attachment 240783 [details] asterisk-extra-sounds-1.4.11.ebuild ditto ... Any suggestions on packing asterisk-moh-freeplay? It doesn't seem to contain usable version numbers.
Firstly, I really like the idea of packaging the sound files independently - great idea. However, I do not like the manner in which the USE flags are handled; I think it is unnecessarily convoluted. My suggestion is that IUSE is declared in the conventional fashion: IUSE="alaw g722 g729 gsm siren7 siren14 sln16 ulaw wav" The gsm flag and english locale can be enforced trivially by appending to /usr/portage/profiles/base/package.use.force: net-misc/asterisk-core-sounds gsm linguas_en net-misc/asterisk-extra-sounds gsm linguas_en net-misc/asterisk-moh-opsound gsm linguas_en This should simplify things somewhat which is probably just as well ... # ebuild asterisk-core-sounds-1.4.19.ebuild manifest <snip> !!! Couldn't download 'asterisk-core-sounds-^en-^gsm-1.4.19.tar.gz'. Aborting. !!! Fetch failed for asterisk-core-sounds-^en-^gsm-1.4.19.tar.gz, can't update Manifest
Also, if one would rather not employ the canonical form of USE, one might declare a CODECS USE_EXPAND variable instead (so the package.use.force syntax would be "codecs_gsm linguas_en". Of course, that would require a documentative file under /usr/portage/profiles/desc.
Created attachment 240901 [details] Re-factored asterisk-core-sounds ebuild * Changed DEPEND (hey, don't leave asterisk-1.4 out in the cold!) * Presence of USE_EXPAND flags in IUSE should be unconditional * Removed the proprietary ^ operator and simplified code (see follow-up comment) * Removed spurious variables and declared some others as local * Use einfo instead of echo and change wording slighty to distinguish the message somewhat from the phase messages that appear nearby Tested and apparently working.
To simulate the pre-requisite environment: # mkdir /etc/portage/profile # echo "net-misc/asterisk-core-sounds codecs_gsm linguas_en" \ > /etc/portage/profile/package.use.force # echo USE_EXPAND="CODECS" >> /etc/make.conf # ACCEPT_KEYWORDS="**" emerge -pv asterisk-core-sounds [ebuild N ] net-misc/asterisk-core-sounds-1.4.19 CODECS="(gsm) -alaw -g722 -g729 -siren14 -siren7 -sln16 -ulaw -wav" LINGUAS="(en) -fr" 0 kB
Created attachment 240903 [details] codecs.desc file for /usr/portage/profiles/desc
Re: Comment 9 - I would suggest using the date from the upstream tarball e.g. asterisk-moh-freeplay-20091216.
E(In reply to comment #15) > Re: Comment 9 - I would suggest using the date from the upstream tarball e.g. > asterisk-moh-freeplay-20091216. > They've been removed due to licensing issues, as explained on #asterisk: <jkroon> is there any specific reason why asterisk-moh-freeplay-* in http://downloads.asterisk.org/pub/telephony/sounds/releases/ isn't versioned? <tzafrir_laptop> jkroon, they were removed for potential licensing issues <tzafrir_laptop> They are not versioned because there was only one version <tzafrir_laptop> Anyway, just use the opsound ones So I'm guessing we just leave freeplay out of it. Either way, at the URL above I can't even locate date-stamped versions of freeplay moh at all. So difficult to package. Tony, your comments re use of package.use.force - I like it, I'll happily re-adjust the other ebuilds as well if you're happy with that solution. It still gives someone a chance (I think, via /etc/portage/package.use.force) to remove the gsm stuff if they really insist on not having it, as well as linguas_en. And it certainly does simplify the "convolution" at the top of the file.
(In reply to comment #16) > So I'm guessing we just leave freeplay out of it. Either way, at the URL > above I can't even locate date-stamped versions of freeplay moh at all. So > difficult to package. It can be seen that it was uploaded on the 26th December 2009 but I agree; let's not bother with it.
Created attachment 241105 [details] metadata.xml Accidentally had +gsm in the xml instead of just gsm. This just removes the spurious + sign.
Created attachment 241107 [details] asterisk-moh-opsound-2.03.ebuild * Remove linguas_en as per discussion on #gentoo-dev, only offer fr as an optional. * Use defaults IUSE for +gsm * Issue an ewarn if no codecs selected, but don't fail.
Created attachment 241113 [details] asterisk-core-sounds-1.4.19.ebuild I can't deprecate Kerin's ebuild/files. As per IRC discussion it's been decided to add all options as USE flags, but to have gsm enabled by default at package level, and to only issue a warning if no codecs are set. This deprecates both files uploaded by Kerin. I tried to keep the local var cleanups Kerin made, but please do audit this. Kerin - you're welcome to change the extracting messages again - I did the echo thing on purpose to make them as close as possible with the way it looks by default.
Created attachment 241117 [details] asterisk-extra-sounds-1.4.11.ebuild ditto. Kerin, please confirm that you are able to digest these files. I've even gone as far as removing the Manifest file and regenerating the digest files and it works for me, but nothing I've changed should change this for you.
Hi, Progress on this? I believe the last submitted ebuilds are production ready and would like to see these ebuilds made available and the patch to the asterisk ebuild applied at some point.
I have it all set up on my laptop now, ready to commit. But there is a slight problem with the core/extra sounds ebuilds when I try them: >>> Install asterisk-extra-sounds-1.4.11 into /var/tmp/portage/net-misc/asterisk-extra-sounds-1.4.11/image/ category net-misc !!! dodoc: ^en/CHANGES-asterisk-extra-^en-1.4.11 does not exist LINGUAS is unset on my system. Please advise?
Created attachment 243769 [details] asterisk-core-sounds-1.4.19.ebuild Fix up some bash (4.1) issues.
Created attachment 243771 [details] asterisk-extra-sounds-1.4.11.ebuild
Created attachment 243773 [details] asterisk-moh-opsound-2.03.ebuild Single modification of bash prefix stripping - it won't actually have an effect, but this is now slightly less cluttered.
+*asterisk-core-sounds-1.4.19 (20 Aug 2010) + + 20 Aug 2010; <chainsaw@gentoo.org> +asterisk-core-sounds-1.4.19.ebuild, + +metadata.xml: + Initial commit, ebuild by Jaco Kroon. For bug #328513. +*asterisk-extra-sounds-1.4.11 (20 Aug 2010) + + 20 Aug 2010; <chainsaw@gentoo.org> +asterisk-extra-sounds-1.4.11.ebuild, + +metadata.xml: + Initial commit, ebuild by Jaco Kroon. For bug #328513. +*asterisk-moh-opsound-2.03 (20 Aug 2010) + + 20 Aug 2010; <chainsaw@gentoo.org> +asterisk-moh-opsound-2.03.ebuild, + +metadata.xml: + Initial commit, ebuild by Jaco Kroon. For bug #328513. +*asterisk-1.6.2.11-r1 (20 Aug 2010) + + 20 Aug 2010; <chainsaw@gentoo.org> asterisk-1.2.40.ebuild, + asterisk-1.6.2.10.ebuild, asterisk-1.6.2.11.ebuild, + +asterisk-1.6.2.11-r1.ebuild, + +files/1.6.2/asterisk-1.6.2.11-strip-noapi.patch, + +files/1.6.2/asterisk.initd2, +files/1.6.2/asterisk.logrotate, + asterisk-1.2.37.ebuild: + Tweak nm call to avoid binary deletion as requested by Alexey McSakoff in + bug #302736. Bashims removed from init script by Kerin Millar & Federico + Santulli, closes bug #309277. Stock audio prompts now split out to + separate ebuilds and logrotate support thanks to Jaco Kroon, closes bug + #328513 & #329281 respectively.