aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan Bellamy <dunk@denkimushi.com>2020-06-07 09:15:45 +0000
committerTimo Teräs <timo.teras@iki.fi>2020-06-15 17:45:34 +0300
commit25ffac29e0a3e87794220e04795def02f66a3e81 (patch)
treeb8b714b71d6064a63751a0f8fad272835982cab5
parent900671f7180288df1c2f943af8147aa3395428de (diff)
downloadaports-25ffac29e0a3e87794220e04795def02f66a3e81.tar.gz
aports-25ffac29e0a3e87794220e04795def02f66a3e81.tar.bz2
aports-25ffac29e0a3e87794220e04795def02f66a3e81.tar.xz
main/asterisk: upgrade to 16.11.0
* compile with CFLAGS='-DENABLE_SRTP_AES_256', from #11609 * update APKBUILD to use amove * update license from SPDX * add missing descriptions to patches, and openrc sub package * remove empty doc sub package function * make single line sub package format the same * add support for unbound
-rw-r--r--main/asterisk/10-musl-mutex-init.patch (renamed from main/asterisk/musl-mutex-init.patch)2
-rw-r--r--main/asterisk/20-musl-astmm-fix.patch (renamed from main/asterisk/musl-astmm-fix.patch)2
-rw-r--r--main/asterisk/30-asterisk-mariadb.patch (renamed from main/asterisk/asterisk-mariadb.patch)2
-rw-r--r--main/asterisk/40-asterisk-cdefs.patch22
-rw-r--r--main/asterisk/APKBUILD129
5 files changed, 61 insertions, 96 deletions
diff --git a/main/asterisk/musl-mutex-init.patch b/main/asterisk/10-musl-mutex-init.patch
index 891d3fd10a..16b7fccbd9 100644
--- a/main/asterisk/musl-mutex-init.patch
+++ b/main/asterisk/10-musl-mutex-init.patch
@@ -1,3 +1,5 @@
+fix for compiling with musl
+
diff -ru asterisk-12.4.0.orig/include/asterisk/lock.h asterisk-12.4.0/include/asterisk/lock.h
--- asterisk-12.4.0.orig/include/asterisk/lock.h 2013-11-02 06:05:24.000000000 -0200
+++ asterisk-12.4.0/include/asterisk/lock.h 2014-08-04 16:00:29.811967599 -0300
diff --git a/main/asterisk/musl-astmm-fix.patch b/main/asterisk/20-musl-astmm-fix.patch
index 86e3e29713..e6f9d150e6 100644
--- a/main/asterisk/musl-astmm-fix.patch
+++ b/main/asterisk/20-musl-astmm-fix.patch
@@ -1,3 +1,5 @@
+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
diff --git a/main/asterisk/asterisk-mariadb.patch b/main/asterisk/30-asterisk-mariadb.patch
index dab4d988a7..ae9e1aa23b 100644
--- a/main/asterisk/asterisk-mariadb.patch
+++ b/main/asterisk/30-asterisk-mariadb.patch
@@ -1,3 +1,5 @@
+Use mariadb instead of mysql
+
diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index 00c75dd..bc405bb 100644
--- a/addons/cdr_mysql.c
diff --git a/main/asterisk/40-asterisk-cdefs.patch b/main/asterisk/40-asterisk-cdefs.patch
new file mode 100644
index 0000000000..7cf22c84d8
--- /dev/null
+++ b/main/asterisk/40-asterisk-cdefs.patch
@@ -0,0 +1,22 @@
+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 <sys/types.h>
++#include <sys/cdefs.h>
+ #include <stdio.h>
+
+ #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 <sys/types.h>
++#include <sys/cdefs.h>
+
+ #include <limits.h>
+
diff --git a/main/asterisk/APKBUILD b/main/asterisk/APKBUILD
index 0a44a4af68..615fbb7fd5 100644
--- a/main/asterisk/APKBUILD
+++ b/main/asterisk/APKBUILD
@@ -1,44 +1,42 @@
+# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Timo Teras <timo.teras@iki.fi>
# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=asterisk
-pkgver=16.7.0
+pkgver=16.11.0
pkgrel=0
pkgdesc="Asterisk: A Module Open Source PBX System"
pkgusers="asterisk"
pkggroups="asterisk"
url="http://www.asterisk.org/"
arch="all"
-license="GPL-2.0"
-depends=
+license="GPL-2.0-only"
options="!check" # Test suite is separate, and require separate build
-makedepends="findutils tar wget bsd-compat-headers libtool
+makedepends="findutils tar bsd-compat-headers libtool
ncurses-dev popt-dev newt-dev zlib-dev libedit-dev tiff-dev curl-dev
openssl-dev lua-dev libcap-dev jansson-dev util-linux-dev
sqlite-dev postgresql-dev unixodbc-dev freetds-dev mariadb-connector-c-dev
alsa-lib-dev pjproject-dev dahdi-tools-dev libpri-dev libsrtp-dev
spandsp-dev libresample speex-dev speexdsp-dev libogg-dev
- bluez-dev libxml2-dev imap-dev"
+ bluez-dev libxml2-dev imap-dev unbound-dev"
install="$pkgname.pre-install $pkgname.pre-upgrade"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc $pkgname-pgsql $pkgname-odbc
- $pkgname-tds $pkgname-fax $pkgname-sample-config:sample:noarch
+ $pkgname-tds $pkgname-fax $pkgname-sample-config:config:noarch
$pkgname-sounds-moh:sound_moh:noarch $pkgname-sounds-en:sound_en:noarch
$pkgname-mobile $pkgname-curl:_curl $pkgname-srtp $pkgname-dahdi
- $pkgname-speex $pkgname-alsa $pkgname-cdr-mysql:cdr_mysql"
+ $pkgname-speex $pkgname-alsa $pkgname-cdr-mysql:cdr_mysql $pkgname-openrc"
_download="https://downloads.asterisk.org/pub/telephony/asterisk/releases"
source="$_download/asterisk-$pkgver.tar.gz
https://dev.alpinelinux.org/~tteras/asterisk-addon-mp3-r201.patch.gz
- musl-mutex-init.patch
- musl-astmm-fix.patch
- asterisk-mariadb.patch
-
+ 10-musl-mutex-init.patch
+ 20-musl-astmm-fix.patch
+ 30-asterisk-mariadb.patch
+ 40-asterisk-cdefs.patch
asterisk.initd
asterisk.confd
asterisk.logrotate"
-builddir="$srcdir/$pkgname-${pkgver/_/-}"
-
# secfixes:
# 16.6.2-r0:
# - CVE-2019-18610
@@ -62,7 +60,6 @@ prepare() {
}
build() {
- cd "$builddir"
SHA1SUM="$PWD"/build_tools/sha1sum-sh ./configure \
--build=$CBUILD \
--host=$CHOST \
@@ -95,7 +92,8 @@ build() {
--with-libcurl \
--with-libedit \
--with-srtp \
- --with-imap=system
+ --with-imap=system \
+ CFLAGS="$CFLAGS -DENABLE_SRTP_AES_256"
# get default modules to build
rm -f menuselect.makeopts
@@ -111,11 +109,10 @@ build() {
menuselect.makeopts
# build
- make ASTCFLAGS="$CFLAGS" ASTLDFLAGS="$LDFLAGS" LDCONFIG=
+ make LDCONFIG=
}
package() {
- cd "$builddir"
make -j1 DESTDIR="$pkgdir" LDCONFIG_FLAGS="-n" install
install -d "$pkgdir"/var/run/asterisk
@@ -131,30 +128,6 @@ package() {
chmod -R u=rwX,g=rX,o= "$pkgdir"/etc/asterisk
}
-_move_dir() {
- for DIR in "$@"; do
- local dest=`dirname "$subpkgdir/$DIR"`
- echo mkdir -p $dest
- mkdir -p "$dest"
- echo mv "$pkgdir"/$DIR $dest
- mv "$pkgdir"/"$DIR" "$dest"
- done
-}
-
-_find_and_move() {
- local pattern="$1"
- cd "$pkgdir"
- find . -name "$pattern" -type f | while read f; do
- local dest="$subpkgdir/${f%/*}"
- mkdir -p "$dest"
- mv "$f" "$dest"
- done
-}
-
-doc() {
- default_doc
-}
-
dev() {
default_dev
depends="asterisk"
@@ -164,54 +137,19 @@ dev() {
mv "$subpkgdir"/usr/lib/libasteriskssl.so "$pkgdir"/usr/lib/libasteriskssl.so
}
-pgsql() {
- depends=
- install=
- _find_and_move '*_pgsql*'
-}
-
-odbc() {
- depends=
- install=
- _find_and_move '*odbc*'
-}
-
-tds() {
- depends=
- install=
- _find_and_move '*_tds*'
-}
-
-fax() {
- depends=
- install=
- _find_and_move '*_fax*'
-}
-
-mobile() {
- depends=
- install=
- _find_and_move '*_mobile*'
-}
-
-_curl() {
- depends=
- install=
- _find_and_move '*_curl*'
-}
-
-cdr_mysql() {
- depends=
- install=
- _find_and_move '*cdr_mysql*'
-}
-
-srtp() { _find_and_move '*_srtp*'; }
-dahdi() { _find_and_move '*_dahdi*'; }
-speex() { _find_and_move '*_speex*'; }
-alsa() { _find_and_move '*_alsa*'; }
+pgsql() { amove usr/lib/asterisk/modules/*_pgsql*; }
+odbc() { amove usr/lib/asterisk/modules/*_odbc*; }
+tds() { amove usr/lib/asterisk/modules/*_tds*; }
+fax() { amove usr/lib/asterisk/modules/*_fax*; }
+mobile() { amove usr/lib/asterisk/modules/*_mobile*; }
+_curl() { amove usr/lib/asterisk/modules/*_curl*; }
+cdr_mysql() { amove usr/lib/asterisk/modules/*cdr_mysql*; }
+srtp() { amove usr/lib/asterisk/modules/*_srtp*; }
+dahdi() { amove usr/lib/asterisk/modules/*_dahdi*; }
+speex() { amove usr/lib/asterisk/modules/*_speex*; }
+alsa() { amove usr/lib/asterisk/modules/*_alsa*; }
-sample() {
+config() {
pkgdesc="Sample configuration files for asterisk"
cd "$builddir"
mkdir -p "$subpkgdir"/var/lib/asterisk/phoneprov
@@ -225,24 +163,23 @@ sample() {
sound_moh() {
pkgdesc="Default on-hold music files for asterisk"
depends=
- install=
- _move_dir var/lib/asterisk/moh
+ amove var/lib/asterisk/moh
chown -R asterisk:asterisk "$subpkgdir"/var/*/asterisk
}
sound_en() {
pkgdesc="English sound files for asterisk"
depends=
- install=
- _move_dir var/lib/asterisk/sounds/en
+ amove var/lib/asterisk/sounds/en
chown -R asterisk:asterisk "$subpkgdir"/var/*/asterisk
}
-sha512sums="4b06b7879031abf072d8db5e5be32870be65e726d2e02ef38cce48fa4fd006fe8885c95c649ee6f79280c00dc8b0c2252894cb86cfe3011fcc92e2165f3d0213 asterisk-16.7.0.tar.gz
+sha512sums="1b138c6a4ac442504d05c1f9a327cdc1396669a328f86678252fe578dc0e3cccf5b4d7856937862f7cc531a0618e3b7e6eebc041ab435efe676cd89e6d877ee6 asterisk-16.11.0.tar.gz
aacef3f4796fb1abd33266998b53909cb4b36e7cc5ad2f7bac68bdc43e9a9072d9a4e2e7e681bddfa31f3d04575eb248afe6ea95da780c67e4829c1e22adfe1b asterisk-addon-mp3-r201.patch.gz
-f72c2e04de80d3ed9ce841308101383a1655e6da7a3c888ad31fffe63d1280993e08aefcf8e638316d439c68b38ee05362c87503fca1f36343976a01af9d6eb1 musl-mutex-init.patch
-fdac3868ed2ba566397e3a71314568787e4a84d37738f210a6e288c4285215879756c576e2fd064be9cf5169a7e08dbbfd341f50a87e4e6dbfae20e19bcc4d71 musl-astmm-fix.patch
-c76a882588194372d0c45a2bd1a9a946543f2dc07fde9240b3e600682e9737337c7602da35bfaeddb4d9fe568daa668016237c6f7986e7c44cf5a8dbba291e1f asterisk-mariadb.patch
+771237ba6d42ab62d914f2702234b23fd0bc8c22f2aa33b0e745c9170163c8046f6d48ecb299faab3d6fb397f1aa046421083c3cc88510c9779861c522f357dd 10-musl-mutex-init.patch
+0fae11b42894ab3d405bc50e9275b9084712b482fbf9b4259ea938667fc5cbe413655f3ff83da0f607151bb2b6e49c2f741b5ada6944dbb478f076ef8d86380a 20-musl-astmm-fix.patch
+a43239189a1170d23d8f99d7658d8e064d4cc8149dd92d68e80d7af7a8fe181e0b111860ab13f12a91172c1e7f370c1a86679081b9ced98f4932fdfc64f04a49 30-asterisk-mariadb.patch
+ba33f11169284f190b7dabab1da7d2751cb65d7976408db635a892fa17d7552e1660350017e7aada3464ecc7d9d6e99d6ad76d66c0036de062a386cffbc948e6 40-asterisk-cdefs.patch
0044c5db468ec8f2385d18d476f89976f6d036448583a4ef8017ce7a6f8f72105337e6b20037ffe47f561d2877fc9c86720aef23ab037df89b36dc140a5924c4 asterisk.initd
ab6b6f08ff43268cbb1abb7ed7d678949991ba495682a644bbaeb017d6adbff0a43297905fd73ae8db1786a28d5b5904f1bc253209a0e388c8a27f26c6ce14ed asterisk.confd
7591d2faf539d05d9ee4e431c78a5e20686721fd79221ad94dffeeaff9282220b09cb9aec214bd7a8d12affaec0276c9c91e6e21af8b6712c0a9502b60b02f2b asterisk.logrotate"