summaryrefslogtreecommitdiff
blob: 734998c7d77e70d45aa253596c2afab4f20e7298 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk-app_nv_faxdetect/asterisk-app_nv_faxdetect-1.0.6.ebuild,v 1.7 2007/01/06 16:30:24 drizzt Exp $

inherit eutils

MY_PN="app_nv_faxdetect"

DESCRIPTION="Asterisk plugins to detect faxes, dtfm and voice (faxdetect and backgrounddetect)"
HOMEPAGE="http://www.newmantelecom.com/asterisk/faxdetect/"
SRC_URI="mirror://gentoo/${MY_PN}-${PV}.tar.bz2"

IUSE=""

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc x86"

DEPEND=">=net-misc/asterisk-1.0.5-r1"

S="${WORKDIR}"/${MY_PN}-${PV}

src_unpack() {
	unpack ${A}

	cd "${S}"
	# use asterisk-config...
	epatch "${FILESDIR}"/app_nv_faxdetect-${PV}-astcfg.diff

	if has_version "<net-misc/asterisk-1.1.0"; then
		einfo "Building for Asterisk-1.0.x"
		# change callerid to asterisk stable
		epatch "${FILESDIR}"/app_nv_faxdetect-${PV}-ast10.diff
	else
		einfo "Building for Asterisk-1.2.x"
		epatch "${FILESDIR}"/app_nv_faxdetect-${PV}-ast12.diff
	fi
}

src_compile() {
	emake -j1 || die "emake failed"
}

src_install() {
	make DESTDIR="${D}" install || die
}

pkg_postinst() {
	elog "See"
	echo
	elog "  http://www.voip-info.org/wiki-NVFaxDetect"
	elog "  http://www.voip-info.org/wiki-NVBackgroundDetect"
	echo
	elog "for more information"
}