summaryrefslogtreecommitdiff
path: root/net-misc/dahdi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-22 20:28:19 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-22 20:28:19 +0000
commitabaa75b10f899ada8dd05b23cc03205064394bc6 (patch)
treeeca3dd248b73b92013cba00a0fcc1edf2696e19a /net-misc/dahdi
parent24fd814c326e282c4321965c31f341dad77e270d (diff)
gentoo resync : 22.01.2021
Diffstat (limited to 'net-misc/dahdi')
-rw-r--r--net-misc/dahdi/Manifest2
-rw-r--r--net-misc/dahdi/dahdi-3.1.0-r3.ebuild107
2 files changed, 109 insertions, 0 deletions
diff --git a/net-misc/dahdi/Manifest b/net-misc/dahdi/Manifest
index 4d07f273fe2e..a2a533a44f84 100644
--- a/net-misc/dahdi/Manifest
+++ b/net-misc/dahdi/Manifest
@@ -17,6 +17,8 @@ DIST dahdi-fw-vpmoct032-1.12.0.tar.gz 443985 BLAKE2B f7f1b5240dafeea42c25c19e3bd
DIST dahdi-fwload-vpmadt032-1.25.0.tar.gz 149360 BLAKE2B bb754b1abf794d918d1c457792a0432adc57dabf73e67868dd7a72995f2e9240a528a357427ae8602b10907c813cc50da4c35b8c060bdc7ece399f096ce6519b SHA512 3534f0bab0e142ae94b9b5c401a5c314bab43bc1ca9283600ca82b1746afa514eff6a965ccc6b48774d577beaddb12d165f66221b3b6457df68ccbcede812047
DIST dahdi-linux-3.1.0.tar.gz 1645832 BLAKE2B 27ea6b68318750639fd90f2061e2e9e128e3faa8cc195b368f7157947f5b522f86b871a3b793016945c9faaed20b38a185adafa29b2fc04019063257f578169e SHA512 440f5e44c933c609f2b3cfcf013c84bcd0c37929a43d69aac0276b11484cb890cd5939c5ac5950cad54d934d27ee6ff0b18f2bdd58477ed9be8055de107727b4
DIST gentoo-dahdi-patchset-3.1.0-r1-v2.tar.bz2 104683 BLAKE2B 6ad6ede1163baa40e0bc265af5bfba5781bc61bfcabaccb0b8579d8ea8b778a06e2acf4b3d57b5419f3ad406e32d3cbe63cea6b2ee5960644e1458636462decd SHA512 b3acfb0e614073ce8e3a009f5685959f6c226607ba6c50a4657ed1dda808345e745e13005de95e61ac1ed47a2c6da3ce678c5881f5eff945434b8b79551dd304
+DIST gentoo-dahdi-patchset-3.1.0-r3.tar.bz2 107738 BLAKE2B 9c6a846f744753ae133c24425224675fdbeab5c1b1bc70dd621c615af2f13eec6eb4981ec160c813be62d9d69cd8af6b2cd517005399e24f78fa30da5e20c464 SHA512 75d6562783adc5584966cba38d92a7d1aba3f448cac486be454f9810bb8380009a71a56261a0820a5eb5e13a2c0b49768c1d6adc2310f0be2133140e9e9ae3de
DIST jnet-dahdi-drivers-1.0.14.tar.gz 64860 BLAKE2B c8bbb007cd1a76d02b758af35d1d6a26d5617018ad1de8c69dd9bdf7d781d66b85031706efe55edb32eec1d00f3877fe8a2edd4f9899f367824875cd5fe93984 SHA512 419352897d39bae6b51ee302723de6ca3c8041546a1273fa0691cf169e16f37fc730f3033fed4e5f564dce6dcc097e93f609208af8c38d03b9aee96b95037d66
EBUILD dahdi-3.1.0-r2.ebuild 4797 BLAKE2B 0678c138c04c0d18e7b1220150615cc19bedc684ba8e22129439e938c80eed8af614314849e2d86811e18bacd78eb0baf4403784f658e5be4b473e66af0528ef SHA512 5846b09fe4cb0103c97f7eab2ae4e4a2ae4ad4872bb36979dac84378095611cfee432b1ff326d8fabb3d9d4d877fbbaa81a1fed93118c8acc7787d3159753101
+EBUILD dahdi-3.1.0-r3.ebuild 4807 BLAKE2B 9634d7bff8eeac90a2463d1461679712e0c529ba55ff33b5c352074424899d5323359814b874380cfd34109ab0765c3025b8c7117f6bb684d5d55de2766ac748 SHA512 8ee0db6a8c26604ae5638d86d0ed5c9aead14545268444f556367b1d01287de78b8c57a8ca1bf711e4f5613dd665c10c30f0ee5e70a2316a5e0ab4bc69c892fe
MISC metadata.xml 539 BLAKE2B a0ce99924eb45e3ab924bdf354a54b185775fdf86e412dd53b2f2ad00772376e7e191c9166b9417dc81d0e05dccdaa1e6eb1e72b937a8a125b948f023129624e SHA512 41033deb3d149daf967524383856a8e45eebfc6b6c721ae5a9bb6fcc18c5f1371e49f5f52f403ff9f192911c3345a52ae11b03b4d0fa1d3cf753ec5efd570c5c
diff --git a/net-misc/dahdi/dahdi-3.1.0-r3.ebuild b/net-misc/dahdi/dahdi-3.1.0-r3.ebuild
new file mode 100644
index 000000000000..6a86455478f1
--- /dev/null
+++ b/net-misc/dahdi/dahdi-3.1.0-r3.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic linux-mod linux-info toolchain-funcs
+
+MY_P="${P/dahdi/dahdi-linux}"
+JNET=1.0.14
+GENTOO=3.1.0-r3
+S="${WORKDIR}/${MY_P}"
+
+JNET_DRIVERS="cwain qozap ztgsm"
+
+DESCRIPTION="Kernel modules for Digium compatible hardware (formerly known as Zaptel)"
+HOMEPAGE="https://www.asterisk.org"
+SRC_URI="https://downloads.asterisk.org/pub/telephony/dahdi-linux/releases/${MY_P}.tar.gz
+ https://www.junghanns.net/downloads/jnet-dahdi-drivers-${JNET}.tar.gz
+ https://downloads.uls.co.za/gentoo/dahdi/gentoo-dahdi-patchset-${GENTOO}.tar.bz2
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fwload-vpmadt032-1.25.0.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4a-a0017.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a4b-d001e.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8a-1d0017.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-a8b-1f001e.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-hx8-2.06.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-032-1.05.01.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-064-1.05.01.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-128-1.05.01.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-oct6114-256-1.05.01.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-tc400m-MR6.12.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te133-7a001e.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te134-780017.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te435-13001e.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te436-10017.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-te820-1.76.tar.gz
+ https://downloads.digium.com/pub/telephony/firmware/releases/dahdi-fw-vpmoct032-1.12.0.tar.gz
+"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+IUSE="flash oslec"
+
+PATCHES=( "${WORKDIR}/dahdi-patchset" )
+
+CONFIG_CHECK="MODULES PCI ~CRC_CCITT"
+
+pkg_pretend() {
+ use oslec && CONFIG_CHECK+=" ECHO"
+ check_extra_config
+}
+
+src_unpack() {
+ unpack ${A}
+ # Copy the firmware tarballs over, the makefile will try and download them otherwise
+ for file in ${A} ; do
+ [[ "${file}" = dahdi-fw* ]] || continue
+ cp "${DISTDIR}"/${file} "${MY_P}"/drivers/dahdi/firmware/ ||
+ die "Error copying ${file} to ${S}/${MY_P}/drivers/dahdi/firmware/"
+ done
+ # But without the .bin's it'll still fall over and die, so copy those too.
+ mv *.bin "${MY_P}"/drivers/dahdi/firmware/ ||
+ die "Error moving firmware files into the right folders."
+
+ for drv in ${JNET_DRIVERS}; do
+ ln "${WORKDIR}/jnet-dahdi-drivers-${JNET}/${drv}/${drv}.c" "${MY_P}/drivers/dahdi/" ||
+ die "Error linking ${drv}.c from jnet to DAHDI."
+ ln "${WORKDIR}/jnet-dahdi-drivers-${JNET}/${drv}/${drv}.h" "${MY_P}/drivers/dahdi/" ||
+ die "Error linking ${drv}.h from jnet to DAHDI."
+ done
+}
+
+src_prepare() {
+ if use flash; then
+ sed -i -e "s:/\* #define FXSFLASH \*/:#define FXSFLASH:" include/dahdi/dahdi_config.h ||
+ die "Failed to define FXSFLASH"
+ sed -i -e "s:/\* #define SHORT_FLASH_TIME \*/:#define SHORT_FLASH_TIME:" \
+ include/dahdi/dahdi_config.h || die "Failed to define SHORT_FLASH_TIME"
+ fi
+ if use oslec; then
+ sed -i -e 's:^#include .*oslec[.]h:#include "/usr/src/linux/drivers/misc/echo/oslec.h:' \
+ drivers/dahdi/dahdi_echocan_oslec.c || die "Failed to prepare oslec source files."
+ fi
+ default
+}
+
+src_compile() {
+ unset ARCH
+ emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" KSRC="${KV_OUT_DIR}" \
+ DAHDI_MODULES_EXTRA="${JNET_DRIVERS// /.o }.o$(usex oslec " dahdi_echocan_oslec.o" "")" \
+ LDFLAGS="$(raw-ldflags)" all
+}
+
+src_install() {
+ einfo "Installing kernel module"
+ emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" KSRC="${KV_OUT_DIR}" DESTDIR="${D}" \
+ DAHDI_MODULES_EXTRA="${JNET_DRIVERS// /.o }.o$(usex oslec " dahdi_echocan_oslec.o" "")" \
+ LDFLAGS="$(raw-ldflags)" install
+
+ # Remove the blank "version" files (these files are all empty, and root owned).
+ find "${ED}/lib/firmware" -name ".*" -delete || die "Error removing empty firmware version files"
+
+ # If the kernel sources have a System.map, and there a suitable depmod
+ # available (seemingly when we're not cross-compiling), then the kernel
+ # sources depmod kicks in. Remove the files caused by that.
+ find "${ED}/lib/modules" -name "modules.*" -delete || die "Error deleting bogus modules.* files"
+}