summaryrefslogtreecommitdiff
blob: 1e14e7a6b8319bc0eaf2760a8443393c468c76e1 (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5
inherit base multilib toolchain-funcs

DESCRIPTION="Proxy for the Asterisk manager interface"
HOMEPAGE="https://github.com/davies147/astmanproxy/"
SRC_URI="https://github.com/davies147/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

IUSE=""

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

DEPEND=""
PATCHES=( "${FILESDIR}/${P}-gentoo.diff" )

src_prepare() {
	base_src_prepare

	# Fix multilib
	sed -i -e "s#/usr/lib/#/usr/$(get_libdir)/#" "${S}/Makefile" \
		|| die "multilib sed failed"
}

src_compile() {
	emake CC="$(tc-getCC)" \
		LDFLAGS="${LDFLAGS}" \
		LD="$(tc-getLD)" \
		RAWLDFLAGS="$(raw-ldflags)"
}

src_install() {
	dosbin astmanproxy

	dodoc README VERSIONS

	docinto samples
	dodoc samples/*

	insinto /etc/asterisk
	doins configs/astmanproxy.conf
	doins configs/astmanproxy.users

	newinitd "${FILESDIR}"/astmanproxy.rc6 astmanproxy
}