From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-misc/iaxmodem/Manifest | 9 +++ net-misc/iaxmodem/files/iaxmodem.cfg | 88 +++++++++++++++++++++++ net-misc/iaxmodem/files/iaxmodem.confd | 6 ++ net-misc/iaxmodem/files/iaxmodem.initd | 42 +++++++++++ net-misc/iaxmodem/files/iaxmodem.logrotated | 9 +++ net-misc/iaxmodem/iaxmodem-1.3.0-r1.ebuild | 105 ++++++++++++++++++++++++++++ net-misc/iaxmodem/metadata.xml | 13 ++++ 7 files changed, 272 insertions(+) create mode 100644 net-misc/iaxmodem/Manifest create mode 100644 net-misc/iaxmodem/files/iaxmodem.cfg create mode 100644 net-misc/iaxmodem/files/iaxmodem.confd create mode 100644 net-misc/iaxmodem/files/iaxmodem.initd create mode 100644 net-misc/iaxmodem/files/iaxmodem.logrotated create mode 100644 net-misc/iaxmodem/iaxmodem-1.3.0-r1.ebuild create mode 100644 net-misc/iaxmodem/metadata.xml (limited to 'net-misc/iaxmodem') diff --git a/net-misc/iaxmodem/Manifest b/net-misc/iaxmodem/Manifest new file mode 100644 index 000000000000..3776877345d7 --- /dev/null +++ b/net-misc/iaxmodem/Manifest @@ -0,0 +1,9 @@ +AUX iaxmodem.cfg 2684 SHA256 cb3cab672319a8cd63e9d87f032bcb7493e26be25c87caeef7ce863cb80021fc SHA512 f77d8d5c913f166256b2ab4f0de65b8fc6cfcca495f161163ea47beb6099f8dd7aa763c0015481a80d07f86446b40fca17fde0a8297fd9f36f0c19c38337af99 WHIRLPOOL 14333e90aaefea6474aeb11d889af1552419f29cbac99b18e3840b32d95f056d76967ab54778ca7f6aad8638ec174674c1571f1409d71dcc81b34971809d78ef +AUX iaxmodem.confd 140 SHA256 15fb51ad1dbca1731b90070eb78c024a4fa8a20060cc363ee4a55ac01fe32297 SHA512 6c69283cad4485fd782fa0022a2788c3ec25c02388804f4df06f0948be9b1dab3cb2dca363a32bb326bdbce392b5f7c5015a1ca6b87f6ad00c05511479a630de WHIRLPOOL 8e170bd60a16c703b85da32ba6c55f0b843f98d508e64f252d8622a7ddd2b025078fec2450b2a57271eda77c162660645dc01cbc089b4b1d3f0eaabed8f46c9c +AUX iaxmodem.initd 1162 SHA256 47e4b3a356efbfa1bc3b5bfec2cc9c5e42b77674576dfdf96b50f6aae28bcf9a SHA512 dc3dfd7f74501a1686a3bcebcd357339bc49e87d45e40659eb87f037b27ecb3f1b9fb67d780f71d4c765188436378f13290ac58865bcea12fd2d61158cf4773b WHIRLPOOL 57a645997ab817b4a794664fb6a94e7cb3289b748c8188ec745a932ad0437f03f99d33c288ac4b2d47bdf463ec85ab54504ffc6318b8e6f089f2d8f42ed0551c +AUX iaxmodem.logrotated 164 SHA256 515f89aeaf50c30633c04329b084e56d8ee33454de318beb77f52f66d08a7273 SHA512 3f4734fec0ea1361f5ee58d75eb4b8cff5f557abc4a73996e40e5ed43050c79fb82da23b01412d9200f600226a5e66a220a2c56b112e0b0945c5f0ffa2d84c2d WHIRLPOOL 1a655473b3b262ae06cc6b98c843e10b64875265565a9df657f6729ae04d1886f1228c8463061b40d3047f2bf1eeeb4d031cfcaed43d4b232ef907468db19905 +DIST iaxmodem-1.3.0.tar.gz 2483995 SHA256 9dcff90bbc41846e5c3919ca92687df4b17f54d8df692940b8c67c4e98287535 SHA512 3add8fe1c228ee63f12a3d23fcc8bad5405b9fa6af70cadbcdb276d4e7dfe2a90f1b7c300d35659ab0247010c2315e25a5def5715e670071226bd89271d004f4 WHIRLPOOL 52502bdda06ec3bf128b738c0f7f59ea668961dbd70c31b873374c195bbbf23d0a1fb103d4b4baf313ec83a2c2d438e3a1db8bed772d5e5c0662f32741216c1e +EBUILD iaxmodem-1.3.0-r1.ebuild 2728 SHA256 073655324862b812960e54e126b5150ce9cef2f4e8104039db985f1bddd4940d SHA512 90b5fae853c27127b887f3536ae74c10419bc307521e4cf93075db6f3cf707208a292e2bba40a843d01a174d51edf52575c2405c3c0db00a8aee8518d4bb208f WHIRLPOOL d2295cb2ebc712963858fb9c714b92fd9be11f0d80a6e3afaa2e6bbffda6a9f4a8c73f1fdd243c5c8b8e1c91631bc67f7e178baad2b28f3d75ef84d18a4a892b +MISC ChangeLog 3742 SHA256 1c42f73d5eb78064d3a6d76fc8967f4fa739ebd357241a1def8110c38b35eb61 SHA512 0ef154b01850deb775d29028ff93fa5516264e5df6a41da47c570b8dd5bf3e2b060d8d134467329b2dabf408e3408c1e30ce0221e2908a82c7f85da59dddcabc WHIRLPOOL 763f1805d81324508dd4f01ec156447904906d968acc7980e5e05fd19f433c38e4161640370f04048cb58bc77fa3c3a97b7e8e378f151aec8b73492b0d55a0a7 +MISC ChangeLog-2015 1051 SHA256 60fd218fdbc70c7ef34e7d972a2fc49cbfda792c5fe39e49a8fe6f18d6b6f244 SHA512 93e8a2884c69caf45f1ac32bb0298f396d8232ba4673a9d35a00e8dc622356847804a3bdac908d2ab09a3b8c7b18942054c0ec7b638c49c57e6929bd195fdab7 WHIRLPOOL 4bcb3be723e667f5dcc65ca8f1a6a0b3d03d0ced4872071d63a216feafe41c1114d922c8cfe27bd3b5d8a132a30452a77e23bcc6bf2f233f7b584389f41104c3 +MISC metadata.xml 506 SHA256 d0b850f159435416792ea7a9299679fe02e52d1baf9d34b280cc190a69e937a2 SHA512 a5f0f8500bd6db8c294d0a9e207786227a5d523203977e300791ea23a7d9e40d9b50f90d2f47704a1fa8eda72efff48800108adf075cc7e529fb4559f86bb2ef WHIRLPOOL 3098db27592d421d30c2aba4b8b59d93703396d8c07e437963bf12cc8b1b63847098b581b609183a944cfd7c75bbbbc50600b7032f0b2f402d4d5d2b2388185e diff --git a/net-misc/iaxmodem/files/iaxmodem.cfg b/net-misc/iaxmodem/files/iaxmodem.cfg new file mode 100644 index 000000000000..8a30e912e58b --- /dev/null +++ b/net-misc/iaxmodem/files/iaxmodem.cfg @@ -0,0 +1,88 @@ +; Sample Configuration for IAXmodem +; +; Comments can be placed into the IAXmodem configuration files by beginning +; them with a semicolon (";"). +; +; Copy this file to the /etc/iaxmodem directory with a unique file name. +; The name of the file will serve as the identifier, if you choose to +; launch iaxmodem in non-daemon mode. + + +; The "nodaemon" entry exempts the modem from inclusion with daemon use. +; Comment out this line, if you want to use this config in daemon mode! + +nodaemon + +; The "device" entry is the full name of the device that you will be using +; in your modem application. If running multiple instances of iaxmodem then +; you will need a different device for each instance. + +device /dev/ttyIAX + +; The "owner" entry (formatted "user:group") is the system user and group +; that IAXmodem should use for the created device. + +owner uucp:uucp + +; The "mode" entry is the permissions mode for the created device. + +mode 660 + +; The "port" entry refers to the preferred port number on which to listen +; for communications from the Asterisk server (so if you're using more than +; one IAXmodem on a single IP address you will need to have each IAXmodem +; configuration use a different port). You should not use "4569" if Asterisk +; is already listening on port 4569. + +port 4570 + +; The "refresh" entry indicates the preference on how frequently to refresh +; the registration with the Asterisk server. (However, the actual refresh +; value that is used will be negotiated between IAXmodem and the Asterisk +; server.) By setting this to a value of "0" (zero), IAXmodem will not +; register with the server, and thus the server should be configured to +; communicate with IAXmodem on a static address. + +refresh 300 + +; The "server", "peername", and "secret" entries refer to the server name +; (or address), the registered peer name for the IAXmodem client, and the +; registered secret (password) for the IAXmodem client. + +server 127.0.0.1 +peername iaxmodem +secret password + +; The entries "cidname" and "cidnumber" refer to the Caller*ID presentation +; that will be made by IAXmodem to the Asterisk server. + +cidname John Doe +cidnumber 8005551212 + +; The "codec" entry refers to the preferred audio codec. This can be +; "slinear", "alaw", or "ulaw". + +codec slinear +;codec alaw +;codec ulaw + +; The "record" entry causes audio files to be recorded. + +;record + +; The "replay" entry causes the audio files to be replayed back. + +;replay + +; The "nojitterbuffer" entry disables the very simple iaxmodem jitterbuffer + +;nojitterbuffer + +; The "iax2debug" entry enables debugging output for IAX2. + +;iax2debug + +; The "dspdebug" entry enables debugging output for the DSPs. + +;dspdebug + diff --git a/net-misc/iaxmodem/files/iaxmodem.confd b/net-misc/iaxmodem/files/iaxmodem.confd new file mode 100644 index 000000000000..5998d8a36e96 --- /dev/null +++ b/net-misc/iaxmodem/files/iaxmodem.confd @@ -0,0 +1,6 @@ +# Configfile for /etc/init.d/iaxmodem + +# Set the priority of the iaxmodem process +# Value: (highest) -20..19 (lowest) +# +#IAXMODEM_NICE="-5" diff --git a/net-misc/iaxmodem/files/iaxmodem.initd b/net-misc/iaxmodem/files/iaxmodem.initd new file mode 100644 index 000000000000..327b0843c922 --- /dev/null +++ b/net-misc/iaxmodem/files/iaxmodem.initd @@ -0,0 +1,42 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +description="IAXmodem" +description_reload="Reread configuration file and make the appropriate changes" +extra_started_commands="reload" +command="/usr/sbin/iaxmodem" +pidfile="/var/run/iaxmodem.pid" +name="iaxmodem" + +depend() { + use asterisk + need net +} + +start() { + ebegin "Starting ${description}" + start-stop-daemon --start --quiet --pidfile "${pidfile}" \ + --env TMPDIR="/tmp" --nice ${IAXMODEM_NICE:-0} --exec "${command}" + eend ${?} +} + +stop() { + local childs="" + ebegin "Stopping ${description}" + # start-stop-daemon doesn't kill childs reliable, so we + # use a combination of pgrep + start-stop-daemon + kill + [ -s "${pidfile}" ] && childs=$(pgrep -P $(cat "${pidfile}")) + start-stop-daemon --stop --quiet --pidfile "${pidfile}" --retry TERM/10/KILL/5 + if eend ${?}; then + # if there're still childs running, kill them! + [ -n "${childs}" ] && kill -KILL ${childs} 2>/dev/null + return 0 + fi +} + +reload() { + ebegin "Reloading ${description} configuration" + start-stop-daemon --stop --signal HUP --pidfile "${pidfile}" + eend ${?} +} diff --git a/net-misc/iaxmodem/files/iaxmodem.logrotated b/net-misc/iaxmodem/files/iaxmodem.logrotated new file mode 100644 index 000000000000..037aa94ef9dd --- /dev/null +++ b/net-misc/iaxmodem/files/iaxmodem.logrotated @@ -0,0 +1,9 @@ +/var/log/iaxmodem/* { + notifempty + missingok + size 1000k + sharedscripts + postrotate + /etc/init.d/iaxmodem --ifstarted --quiet reload + endscript +} diff --git a/net-misc/iaxmodem/iaxmodem-1.3.0-r1.ebuild b/net-misc/iaxmodem/iaxmodem-1.3.0-r1.ebuild new file mode 100644 index 000000000000..af7d88a80cbe --- /dev/null +++ b/net-misc/iaxmodem/iaxmodem-1.3.0-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit eutils toolchain-funcs multilib + +DESCRIPTION="Software modem that uses an IAX channel instead of a traditional phone line" +HOMEPAGE="https://sourceforge.net/projects/iaxmodem/" +SRC_URI="mirror://sourceforge/iaxmodem/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="" + +RDEPEND="media-libs/tiff:= + sys-process/procps" + +DEPEND="${RDEPEND}" + +src_prepare() { + # fix header file position + sed -i -e 's:iax/iax-client\.h:iax-client.h:g' iaxmodem.c || die + + # fix broken line terminators + sed -i -e 's:\r::g' -e 's:--s$:--:g' -e 's:$:\r:g' iaxmodem.inf || die + + # fix installation of libiax2 headers (though we don't need them) + sed -i -e 's: \(\$(includedir)/\): $(DESTDIR)\1:g' lib/libiax2/src/Makefile.in || die + + # patch configure (we compile libs for ourself) + sed -i -e 's:^\(cd\|./configure\):# \1:g' configure || die + sed -i -e 's:build-libiax build-libspandsp ::g' Makefile.in || die + + # fix dumb x86_64 libdir handling + sed -i -e 's: \(x86_64-\*)\): _DISABLED_\1:g' lib/spandsp/configure || die +} + +src_configure() { + cd "${S}/lib/libiax2" || die + econf --disable-static \ + --libdir=/usr/$(get_libdir)/iaxmodem \ + --datadir=/usr/share/iaxmodem/libiax2 + + cd "${S}/lib/spandsp" || die + econf --disable-static \ + --libdir=/usr/$(get_libdir)/iaxmodem \ + --datadir=/usr/share/iaxmodem + + cd "${S}" + ./configure || die "configure iaxmodem failed" +} + +src_compile() { + cd "${S}/lib/libiax2" || die + emake + + cd "${S}/lib/spandsp" || die + emake + + cd "${S}" + emake OBJS="iaxmodem.o" CC=$(tc-getCC) \ + LDFLAGS="${LDFLAGS} -Wl,-rpath,/usr/$(get_libdir)/iaxmodem \ + -Llib/spandsp/src/.libs -Llib/libiax2/src/.libs -lm -lutil -ltiff -lspandsp -liax" +} + +src_install() { + cd "${S}/lib/libiax2" || die + emake DESTDIR="${D}" install + + cd "${S}/lib/spandsp" || die + emake DESTDIR="${D}" install + + cd "${S}" + dosbin iaxmodem + + # remove libiax and spandsp headers, we don't need them + rm -rf "${D}usr/include" "${D}usr/bin/iax-config" || die + + # install init-script + conf + newinitd "${FILESDIR}/iaxmodem.initd" iaxmodem + newconfd "${FILESDIR}/iaxmodem.confd" iaxmodem + + # install docs + doman iaxmodem.1 + newdoc CHANGES ChangeLog + newdoc lib/libiax2/ChangeLog ChangeLog.libiax2 + newdoc lib/spandsp/ChangeLog ChangeLog.spandsp + dodoc FAQ README lib/spandsp/DueDiligence + + # install sample configs + insinto /etc/iaxmodem + newins "${FILESDIR}/iaxmodem.cfg" default + insinto /usr/share/iaxmodem + doins config.ttyIAX iaxmodem-cfg.ttyIAX iaxmodem.inf + + # install logrotate rule + insinto /etc/logrotate.d + newins "${FILESDIR}/iaxmodem.logrotated" iaxmodem + + # create log dir + keepdir /var/log/iaxmodem +} diff --git a/net-misc/iaxmodem/metadata.xml b/net-misc/iaxmodem/metadata.xml new file mode 100644 index 000000000000..0b2db7eb138c --- /dev/null +++ b/net-misc/iaxmodem/metadata.xml @@ -0,0 +1,13 @@ + + + + + + IAXmodem is a software modem written in C that uses an IAX channel + (commonly provided by an Asterisk PBX system) instead of a traditional + phone line and uses a DSP library instead of DSP hardware chipsets. + + + iaxmodem + + -- cgit v1.2.3