net-misc/iaxmodem: version bump 1.3.0 bug #574228.

Package-Manager: portage-2.2.26
This commit is contained in:
Amy Winston
2016-02-10 17:02:20 +01:00
parent 9aa24445eb
commit fa934a7a56
2 changed files with 109 additions and 0 deletions
+1
View File
@@ -1 +1,2 @@
DIST iaxmodem-1.2.0.tar.gz 3075769 SHA256 fa263c0df0870cb8133c4bee141146ca5db47ece6db50899a6acf508d76591ed SHA512 53b66a0977366541ffaa743fcbefa11c20eb9ea7182245a1d11bc7fd015d98a4ec8086b3cb85b8de84f63d67221bccb1a868fe9f0a603de600023ea158909707 WHIRLPOOL a258b663909cd7d8aa8be0e543a5cbd482ce978bd95534959cd300f96572b199d538fb1e6d7b8ec07fffda33b6e5c446065db89d1bbe50fe199492e191a418f1
DIST iaxmodem-1.3.0.tar.gz 2483995 SHA256 9dcff90bbc41846e5c3919ca92687df4b17f54d8df692940b8c67c4e98287535 SHA512 3add8fe1c228ee63f12a3d23fcc8bad5405b9fa6af70cadbcdb276d4e7dfe2a90f1b7c300d35659ab0247010c2315e25a5def5715e670071226bd89271d004f4 WHIRLPOOL 52502bdda06ec3bf128b738c0f7f59ea668961dbd70c31b873374c195bbbf23d0a1fb103d4b4baf313ec83a2c2d438e3a1db8bed772d5e5c0662f32741216c1e
+108
View File
@@ -0,0 +1,108 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
inherit eutils toolchain-funcs multilib
DESCRIPTION="Software modem that uses an IAX channel instead of a traditional phone line"
HOMEPAGE="http://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}
sys-apps/sed"
src_prepare() {
# fix header file position
sed -i -e 's:iax/iax-client\.h:iax-client.h:g' iaxmodem.c
# fix broken line terminators
sed -i -e 's:\r::g' -e 's:--s$:--:g' -e 's:$:\r:g' iaxmodem.inf
# fix installation of libiax2 headers (though we don't need them)
sed -i -e 's: \(\$(includedir)/\): $(DESTDIR)\1:g' lib/libiax2/src/Makefile.in
# patch configure (we compile libs for ourself)
sed -i -e 's:^\(cd\|./configure\):# \1:g' configure
sed -i -e 's:build-libiax build-libspandsp ::g' Makefile.in
# fix dumb x86_64 libdir handling
sed -i -e 's: \(x86_64-\*)\): _DISABLED_\1:g' lib/spandsp/configure
}
src_configure() {
cd "${S}/lib/libiax2"
econf --disable-static \
--libdir=/usr/$(get_libdir)/iaxmodem \
--datadir=/usr/share/iaxmodem/libiax2 || die "econf libiax2 failed"
cd "${S}/lib/spandsp"
econf --disable-static \
--libdir=/usr/$(get_libdir)/iaxmodem \
--datadir=/usr/share/iaxmodem || die "econf spandsp failed"
cd "${S}"
./configure || die "configure iaxmodem failed"
}
src_compile() {
cd "${S}/lib/libiax2"
emake || die "emake libiax2 failed"
cd "${S}/lib/spandsp"
emake || die "emake spandsp failed"
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" \
|| die "emake iaxmodem failed"
}
src_install() {
cd "${S}/lib/libiax2"
emake DESTDIR="${D}" install
cd "${S}/lib/spandsp"
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"
# 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
}