/[gentoo-x86]/net-misc/dahdi/dahdi-2.7.0.1.ebuild
Gentoo

Contents of /net-misc/dahdi/dahdi-2.7.0.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Thu Feb 12 16:09:35 2015 UTC (4 years, 9 months ago) by chainsaw
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Scavenge upstream commit as identified by Erich Seifert in bug #539594 to allow building against 3.19 kernels.

(Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key 0xB5058F9A)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/net-misc/dahdi/dahdi-2.7.0.1.ebuild,v 1.6 2014/08/10 20:43:50 slyfox Exp $
4
5 EAPI=5
6
7 inherit base linux-mod eutils flag-o-matic toolchain-funcs
8
9 MY_P="${P/dahdi/dahdi-linux}"
10 JNET=1.0.14
11 S="${WORKDIR}/${MY_P}"
12
13 DESCRIPTION="Kernel modules for Digium compatible hardware (formerly known as Zaptel)"
14 HOMEPAGE="http://www.asterisk.org"
15 SRC_URI="http://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/${MY_P}.tar.gz
16 http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz
17 http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.12.0.tar.gz
18 http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-032-1.05.01.tar.gz
19 http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-064-1.05.01.tar.gz
20 http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-128-1.05.01.tar.gz
21 http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-256-1.05.01.tar.gz
22 http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-tc400m-MR6.12.tar.gz
23 http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-hx8-2.06.tar.gz
24 http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te133-6f0017.tar.gz
25 http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te134-6f0017.tar.gz
26 http://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te820-1.76.tar.gz
27 mirror://gentoo/gentoo-dahdi-patchset-1.1.6.tar.bz2
28 http://www.junghanns.net/downloads/jnet-dahdi-drivers-${JNET}.tar.gz"
29
30 LICENSE="LGPL-2.1"
31 SLOT="0"
32 KEYWORDS="amd64 x86"
33 IUSE="flash"
34 RESTRICT="test"
35
36 DEPEND=""
37 RDEPEND=""
38
39 EPATCH_SUFFIX="diff"
40 PATCHES=( "${WORKDIR}/dahdi-patchset" )
41
42 CONFIG_CHECK="MODULES ~CRC_CCITT"
43
44 src_unpack() {
45 unpack ${A}
46 # Copy the firmware tarballs over, the makefile will try and download them otherwise
47 for file in ${A} ; do
48 cp "${DISTDIR}"/${file} "${MY_P}"/drivers/dahdi/firmware/
49 done
50 # But without the .bin's it'll still fall over and die, so copy those too.
51 cp *.bin "${MY_P}"/drivers/dahdi/firmware/
52 cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/cwain/*.[ch] "${MY_P}"/drivers/dahdi/
53 cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/qozap/*.[ch] "${MY_P}"/drivers/dahdi/
54 cp -p "${WORKDIR}"/jnet-dahdi-drivers-${JNET}/ztgsm/*.[ch] "${MY_P}"/drivers/dahdi/
55 }
56
57 src_prepare() {
58 if use flash; then
59 sed -i -e "s:/\* #define FXSFLASH \*/:#define FXSFLASH:" include/dahdi/dahdi_config.h || die "Failed to define FXSFLASH"
60 sed -i -e "s:/\* #define SHORT_FLASH_TIME \*/:#define SHORT_FLASH_TIME:" include/dahdi/dahdi_config.h || die "Failed to define SHORT_FLASH_TIME"
61 fi
62 base_src_prepare
63 }
64
65 src_compile() {
66 unset ARCH
67 emake V=1 CC=$(tc-getCC) LD=$(tc-getLD) KSRC="${KV_OUT_DIR}" DESTDIR="${D}" DAHDI_MODULES_EXTRA="cwain.o qozap.o ztgsm.o" all
68 }
69
70 src_install() {
71 einfo "Installing kernel module"
72 emake V=1 CC=$(tc-getCC) LD=$(tc-getLD) KSRC="${KV_OUT_DIR}" DESTDIR="${D}" DAHDI_MODULES_EXTRA="cwain.o qozap.o ztgsm.o" install
73 rm -rf "$D"/lib/modules/*/modules.*
74 }

  ViewVC Help
Powered by ViewVC 1.1.20