From d4e26d9c66063f1353db4a374e5977dd9573ff86 Mon Sep 17 00:00:00 2001 From: teldra Date: Tue, 12 Jul 2022 04:47:08 +0200 Subject: [PATCH] New package: asterisk-19.5.0 --- srcpkgs/asterisk/files/asterisk/run | 8 +++++ .../asterisk/patches/20-musl-astmm-fix.patch | 14 +++++++++ .../asterisk/patches/40-asterisk-cdefs.patch | 21 ++++++++++++++ srcpkgs/asterisk/template | 29 +++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 srcpkgs/asterisk/files/asterisk/run create mode 100644 srcpkgs/asterisk/patches/20-musl-astmm-fix.patch create mode 100644 srcpkgs/asterisk/patches/40-asterisk-cdefs.patch create mode 100644 srcpkgs/asterisk/template diff --git a/srcpkgs/asterisk/files/asterisk/run b/srcpkgs/asterisk/files/asterisk/run new file mode 100644 index 000000000000..7095c870ba11 --- /dev/null +++ b/srcpkgs/asterisk/files/asterisk/run @@ -0,0 +1,8 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf + +mkdir -p /var/run/asterisk +chown -R _asterisk:_asterisk /var/run/asterisk + +exec chpst -u _asterisk asterisk -f -i ${OPTS} + diff --git a/srcpkgs/asterisk/patches/20-musl-astmm-fix.patch b/srcpkgs/asterisk/patches/20-musl-astmm-fix.patch new file mode 100644 index 000000000000..e6f9d150e624 --- /dev/null +++ b/srcpkgs/asterisk/patches/20-musl-astmm-fix.patch @@ -0,0 +1,14 @@ +Add include file needed when compiling with musl + +diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h +index 8547283..476dc2a 100644 +--- a/include/asterisk/compat.h ++++ b/include/asterisk/compat.h +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_STDDEF_H + #include diff --git a/srcpkgs/asterisk/patches/40-asterisk-cdefs.patch b/srcpkgs/asterisk/patches/40-asterisk-cdefs.patch new file mode 100644 index 000000000000..6fc850125882 --- /dev/null +++ b/srcpkgs/asterisk/patches/40-asterisk-cdefs.patch @@ -0,0 +1,21 @@ +include depreciated cdefs.h as needed for compilation with alpine + +--- a/main/ast_expr2.c ++++ b/main/ast_expr2.c +@@ -95,6 +95,7 @@ + #include "asterisk.h" + + #include ++#include + #include + + #if defined(STANDALONE) || defined(STANDALONE2) +--- a/utils/db1-ast/include/db.h ++++ b/utils/db1-ast/include/db.h +@@ -37,6 +37,7 @@ + #define _DB_H 1 + + #include ++#include + + #include diff --git a/srcpkgs/asterisk/template b/srcpkgs/asterisk/template new file mode 100644 index 000000000000..03dd2abba94a --- /dev/null +++ b/srcpkgs/asterisk/template @@ -0,0 +1,29 @@ +# Template file for 'asterisk' +pkgname=asterisk +version=19.5.0 +revision=1 +build_style=gnu-configure +conf_files="/etc/asterisk/*.conf" +make_dirs="/var/log/asterisk 0755 _asterisk _asterisk + /var/cache/asterisk 0755 _asterisk _asterisk + /var/lib/asterisk 0755 _asterisk _asterisk + /var/spool/asterisk 0755 _asterisk _asterisk" +hostmakedepends="curl tar pkg-config" +makedepends="openssl-devel libedit-devel libuuid-devel jansson-devel + libxml2-devel sqlite-devel speex-devel libvorbis-devel libgsm-devel + alsa-lib-devel libbluetooth-devel libsrtp-devel" +short_desc="Complete PBX solution" +maintainer="teldra " +license="GPL-2.0-or-later" +homepage="https://asterisk.org" +changelog="https://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-19-current" +distfiles="https://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${version}.tar.gz" +checksum=f1775738fe9679d6602f83a96ec6735324fe7a50800fc09c97a70cc7c7cf00c8 +python_version=3 +system_accounts="_asterisk" + +post_install() { + make DESTDIR="${DESTDIR}" samples + chmod -R 0755 ${DESTDIR}/var/*/asterisk + vsv asterisk +}