/[gentoo-x86]/net-misc/iaxmodem/iaxmodem-1.2.0.ebuild
Gentoo

Contents of /net-misc/iaxmodem/iaxmodem-1.2.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri May 7 11:29:32 2010 UTC (4 years, 3 months ago) by sbriesen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +6 -9 lines
installing logrotate stuff unconditionally, solving bug #258178.
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/iaxmodem/iaxmodem-1.2.0.ebuild,v 1.1 2009/12/04 22:08:04 sbriesen Exp $
4
5 EAPI="2"
6
7 inherit eutils toolchain-funcs multilib
8
9 DESCRIPTION="Software modem that uses an IAX channel instead of a traditional phone line"
10 HOMEPAGE="http://sourceforge.net/projects/iaxmodem/"
11 SRC_URI="mirror://sourceforge/iaxmodem/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16
17 IUSE=""
18
19 RDEPEND="media-libs/tiff
20 sys-process/procps"
21
22 DEPEND="${RDEPEND}
23 sys-apps/sed"
24
25 src_prepare() {
26 # fix header file position
27 sed -i -e 's:iax/iax-client\.h:iax-client.h:g' iaxmodem.c
28
29 # fix broken line terminators
30 sed -i -e 's:\r::g' -e 's:--s$:--:g' -e 's:$:\r:g' iaxmodem.inf
31
32 # fix installation of libiax2 headers (though we don't need them)
33 sed -i -e 's: \(\$(includedir)/\): $(DESTDIR)\1:g' lib/libiax2/src/Makefile.in
34
35 # patch configure (we compile libs for ourself)
36 sed -i -e 's:^\(cd\|./configure\):# \1:g' configure
37 sed -i -e 's:build-libiax build-libspandsp ::g' Makefile.in
38
39 # fix dumb x86_64 libdir handling
40 sed -i -e 's: \(x86_64-\*)\): _DISABLED_\1:g' lib/spandsp/configure
41 }
42
43 src_configure() {
44 cd "${S}/lib/libiax2"
45 econf --disable-static \
46 --libdir=/usr/$(get_libdir)/iaxmodem \
47 --datadir=/usr/share/iaxmodem/libiax2 || die "econf libiax2 failed"
48
49 cd "${S}/lib/spandsp"
50 econf --disable-static \
51 --libdir=/usr/$(get_libdir)/iaxmodem \
52 --datadir=/usr/share/iaxmodem || die "econf spandsp failed"
53
54 cd "${S}"
55 ./configure || die "configure iaxmodem failed"
56 }
57
58 src_compile() {
59 cd "${S}/lib/libiax2"
60 emake || die "emake libiax2 failed"
61
62 cd "${S}/lib/spandsp"
63 emake || die "emake spandsp failed"
64
65 cd "${S}"
66 emake OBJS="iaxmodem.o" CC=$(tc-getCC) \
67 LDFLAGS="${LDFLAGS} -Wl,-rpath,/usr/$(get_libdir)/iaxmodem \
68 -Llib/spandsp/src/.libs -Llib/libiax2/src/.libs -lm -lutil -ltiff -lspandsp -liax" \
69 || die "emake iaxmodem failed"
70 }
71
72 src_install() {
73 cd "${S}/lib/libiax2"
74 emake DESTDIR="${D}" install || die "install libiax2 failed"
75
76 cd "${S}/lib/spandsp"
77 emake DESTDIR="${D}" install || die "install spandsp failed"
78
79 cd "${S}"
80 dosbin iaxmodem || die "install failed"
81
82 # remove libiax and spandsp headers, we don't need them
83 rm -rf "${D}usr/include" "${D}usr/bin/iax-config"
84
85 # install init-script + conf
86 newinitd "${FILESDIR}/iaxmodem.initd" iaxmodem
87 newconfd "${FILESDIR}/iaxmodem.confd" iaxmodem
88
89 # install docs
90 doman iaxmodem.1
91 newdoc CHANGES ChangeLog
92 newdoc lib/libiax2/ChangeLog ChangeLog.libiax2
93 newdoc lib/spandsp/ChangeLog ChangeLog.spandsp
94 dodoc FAQ README lib/spandsp/DueDiligence
95
96 # install sample configs
97 insinto /etc/iaxmodem
98 newins "${FILESDIR}/iaxmodem.cfg" default
99 insinto /usr/share/iaxmodem
100 doins config.ttyIAX iaxmodem-cfg.ttyIAX iaxmodem.inf
101
102 # install logrotate rule
103 insinto /etc/logrotate.d
104 newins "${FILESDIR}/iaxmodem.logrotated" iaxmodem
105
106 # create log dir
107 keepdir /var/log/iaxmodem
108 }

  ViewVC Help
Powered by ViewVC 1.1.20