summaryrefslogtreecommitdiff
path: root/net-misc/iaxmodem/iaxmodem-1.3.3.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-05 02:47:11 +0000
commit2771f79232c273bc2a57d23bf335dd81ccf6af28 (patch)
treec8af0fd04194aed03cf067d44e53c7edd3e9ab84 /net-misc/iaxmodem/iaxmodem-1.3.3.ebuild
parente9d044d4b9b71200a96adfa280848858c0f468c9 (diff)
gentoo resync : 05.12.2021
Diffstat (limited to 'net-misc/iaxmodem/iaxmodem-1.3.3.ebuild')
-rw-r--r--net-misc/iaxmodem/iaxmodem-1.3.3.ebuild104
1 files changed, 104 insertions, 0 deletions
diff --git a/net-misc/iaxmodem/iaxmodem-1.3.3.ebuild b/net-misc/iaxmodem/iaxmodem-1.3.3.ebuild
new file mode 100644
index 000000000000..d84be367eebf
--- /dev/null
+++ b/net-misc/iaxmodem/iaxmodem-1.3.3.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Software modem that uses an IAX channel instead of a traditional phone line"
+HOMEPAGE="https://sourceforge.net/projects/iaxmodem/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="media-libs/tiff:=
+ sys-process/procps"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ default
+
+ # 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
+}