Fix asterisk & asterisk: 13.6.0 -> 14.1.2 (#20788)
* fix/asterisk-module: use unix-group for asterisk-files * fix/asterisk-module: add configOption to use some default config-files * fix/asterisk-module: correction of skel copy * fix/asterisk-module: use /etc/asterisk as configDir * fix/asterisk-module: add reload; do not restart unit * asterisk: 13.6.0 -> 14.1.2 * fix/asterisk: compile with lua, pjsip, format_mp3 * fix/asterisk: fix indentation * fix/asterisk: remove broken flag
This commit is contained in:
committed by
Joachim Schiele
parent
d479639187
commit
81d8a457ed
@@ -1,20 +1,25 @@
|
||||
{ stdenv, fetchurl, fetchgit, jansson, libxml2, libxslt, ncurses, openssl, sqlite, utillinux }:
|
||||
|
||||
{ stdenv, pkgs, fetchurl, fetchgit,
|
||||
jansson, libxml2, libxslt, ncurses, openssl, sqlite,
|
||||
utillinux, dmidecode, libuuid, binutils, newt,
|
||||
lua,
|
||||
srtp, wget, curl,
|
||||
subversionClient
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
name = "asterisk-${version}";
|
||||
version = "13.6.0";
|
||||
version = "14.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-${version}.tar.gz";
|
||||
sha256 = "0nh0fnqx84as92kk9d73s0386cndd17l06y1c72jl2bdjhyba0ca";
|
||||
sha256 = "0w9s4334rwvpyxm169grmnb4k9yq0l2al73dyh4cb8769qcs0ij8";
|
||||
};
|
||||
|
||||
# Note that these sounds are included with the release tarball. They are
|
||||
# provided here verbatim for the convenience of anyone wanting to build
|
||||
# Asterisk from other sources.
|
||||
coreSounds = fetchurl {
|
||||
url = http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-gsm-1.4.26.tar.gz;
|
||||
sha256 = "2300e3ed1d2ded6808a30a6ba71191e7784710613a5431afebbd0162eb4d5d73";
|
||||
url = http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-core-sounds-en-gsm-1.5.tar.gz;
|
||||
sha256 = "01xzbg7xy0c5zg7sixjw5025pvr4z64kfzi9zvx19im0w331h4cd";
|
||||
};
|
||||
mohSounds = fetchurl {
|
||||
url = http://downloads.asterisk.org/pub/telephony/sounds/releases/asterisk-moh-opsound-wav-2.03.tar.gz;
|
||||
@@ -22,7 +27,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
# TODO: Sounds for other languages could be added here
|
||||
|
||||
buildInputs = [ jansson libxml2 libxslt ncurses openssl sqlite utillinux ];
|
||||
buildInputs = [ jansson libxml2 libxslt ncurses openssl sqlite utillinux dmidecode libuuid binutils newt lua srtp wget curl subversionClient ];
|
||||
|
||||
patches = [
|
||||
# Disable downloading of sound files (we will fetch them
|
||||
@@ -38,14 +43,24 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Use the following preConfigure section when building Asterisk from sources
|
||||
# other than the release tarball.
|
||||
# preConfigure = ''
|
||||
# ln -s ${coreSounds} sounds/asterisk-core-sounds-en-gsm-1.4.26.tar.gz
|
||||
# ln -s ${mohSounds} sounds/asterisk-moh-opsound-wav-2.03.tar.gz
|
||||
# '';
|
||||
# preConfigure = ''
|
||||
# ln -s ${coreSounds} sounds/asterisk-core-sounds-en-gsm-1.5.tar.gz
|
||||
# ln -s ${mohSounds} sounds/asterisk-moh-opsound-wav-2.03.tar.gz
|
||||
#'';
|
||||
|
||||
# The default libdir is $PREFIX/usr/lib, which causes problems when paths
|
||||
# compiled into Asterisk expect ${out}/usr/lib rather than ${out}/lib.
|
||||
configureFlags = "--libdir=\${out}/lib";
|
||||
configureFlags = [
|
||||
"--libdir=\${out}/lib"
|
||||
"--with-lua=${lua}/lib"
|
||||
"--with-pjproject-bundled"
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
make menuselect.makeopts
|
||||
substituteInPlace menuselect.makeopts --replace 'format_mp3 ' ""
|
||||
./contrib/scripts/get_mp3_source.sh
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Install sample configuration files for this version of Asterisk
|
||||
@@ -56,9 +71,6 @@ stdenv.mkDerivation rec {
|
||||
description = "Software implementation of a telephone private branch exchange (PBX)";
|
||||
homepage = http://www.asterisk.org/;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ auntie ];
|
||||
# Marked as broken due to needing an update for security issues.
|
||||
# See: https://github.com/NixOS/nixpkgs/issues/18856
|
||||
broken = true;
|
||||
maintainers = with maintainers; [ auntie DerTim1 ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
diff -ruN asterisk-13.2.0/sounds/Makefile asterisk-13.2.0-patched/sounds/Makefile
|
||||
--- asterisk-13.2.0/sounds/Makefile 2014-09-09 14:01:11.000000000 -0600
|
||||
+++ asterisk-13.2.0-patched/sounds/Makefile 2015-03-31 16:12:00.549133670 -0600
|
||||
@@ -89,7 +89,7 @@
|
||||
diff -ruN asterisk-14.1.2/sounds/Makefile asterisk-14.1.2-patched/sounds/Makefile
|
||||
--- asterisk-14.1.2/sounds/Makefile 2016-11-10 20:43:02.000000000 +0100
|
||||
+++ asterisk-14.1.2-patched/sounds/Makefile 2016-11-16 10:08:46.591615147 +0100
|
||||
@@ -90,7 +90,7 @@
|
||||
) && touch "$(1)$(if $(3),/$(3),)/$$@"; \
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
diff -rupN asterisk-13.3.2/build_tools/make_defaults_h asterisk-13.3.2-patched/build_tools/make_defaults_h
|
||||
--- asterisk-13.3.2/build_tools/make_defaults_h 2012-01-30 14:21:16.000000000 -0700
|
||||
+++ asterisk-13.3.2-patched/build_tools/make_defaults_h 2015-04-15 19:07:46.760351155 -0600
|
||||
diff -rupN asterisk-14.1.2/build_tools/make_defaults_h asterisk-14.1.2-patched/build_tools/make_defaults_h
|
||||
--- asterisk-14.1.2/build_tools/make_defaults_h 2016-11-10 20:43:02.000000000 +0100
|
||||
+++ asterisk-14.1.2-patched/build_tools/make_defaults_h 2016-11-16 10:09:04.189625495 +0100
|
||||
@@ -1,4 +1,13 @@
|
||||
#!/bin/sh
|
||||
+
|
||||
|
||||
Reference in New Issue
Block a user