summaryrefslogtreecommitdiffstats
path: root/main/asterisk-addons/APKBUILD
blob: 92fb199000a172d764f7b6524b3605a55053c9fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Contributor: Carlo Landmeter
# Maintainer: 
pkgname=asterisk-addons
pkgver=1.6.2.1
pkgrel=1
pkgdesc="Asterisk addons"
url="http://www.asterisk.org"
license="GPL2"
makedepends="mysql-dev asterisk-dev autoconf automake"
install=
subpackages="$pkgname-mysql $pkgname-mp3 $pkgname-ooh323 $pkgname-saycountpl"
depends="$subpackages"
source="http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-addons-1.6.2.1.tar.gz"

_builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	cd "$_builddir"
	./bootstrap.sh
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	
	make -j1 || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir" install
	make -j1 DESTDIR="$pkgdir" samples
	# we are not building the mobile module because aports does not have bluez so we delete mobile.conf
	rm -rf "$pkgdir"/etc
}

_find_and_move() {
        local pattern="$1"
        cd "$pkgdir" || return 1
        find -name "$pattern" -type f | while read f; do
                local dest="$subpkgdir/${f%/*}"
                mkdir -p "$dest"
                mv "$f" "$dest"
        done
}

mysql() {
	pkgdesc="Asterisk mysql addons"
	depends="asterisk"
	_find_and_move '*mysql*'
}

mp3() {
	pkgdesc="Asterisk mp3 addon"
	depends="asterisk"
	_find_and_move '*mp3*'
}

ooh323() {
	pkgdesc="Asterisk h323 channel driver"
	depends="asterisk"
	_find_and_move '*ooh323*'
}

saycountpl() {
	pkgdesc="Asterisk say count pl application"
	depends="asterisk"
	_find_and_move '*saycountpl*'
	mv "$pkgdir"/var "$subpkgdir"
}

md5sums="95e33f22f53d58ac95c54d2c8b8d9d76  asterisk-addons-1.6.2.1.tar.gz"