-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKGBUILD
88 lines (77 loc) · 2.63 KB
/
PKGBUILD
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
76
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer: Nigel Kukard <[email protected]>
# Maintainer: Caleb Maclennan <[email protected]>
# Contributor: Maxim Kurnosenko <[email protected]>
# Contributor: Xavier Devlamynck <[email protected]>
# Contributor: Alessio Biancalana <[email protected]>
# Contributor: Maik Broemme <[email protected]>
# Contributor: Denis 'GNUtoo' Carikli <[email protected]>
pkgname=asterisk
pkgver=18.10.1
pkgrel=1
pkgdesc='A complete PBX solution'
arch=('x86_64' 'i686' 'aarch64' 'armv7h')
url='https://www.asterisk.org'
license=('GPL')
depends=('alsa-lib'
'curl'
'imap'
'jansson'
'libedit'
'libvorbis'
'libxml2'
'libxslt'
'opus'
'popt'
'speex')
makedepends=('gsm'
'sqlite3')
optdepends=('dahdi'
'libpri'
'libsrtp'
'libss7'
'lua51'
'openr2'
'postgresql'
'unixodbc')
install=$pkgname.install
source=("https://downloads.asterisk.org/pub/telephony/$pkgname/releases/$pkgname-$pkgver.tar.gz"
"$pkgname.sysusers"
"$pkgname.logrotated"
"$pkgname.tmpfile")
sha256sums=('f92fe24c28fb068e6bc91e806d28aa5c8ec169aec47a88b0dd53604f9cd734cb'
'fc2e42f79e1672cc25b9b8ad2ba99616fbba0047641c986d30718655d0e7d4d8'
'caa24cfec5c6b4f8cea385269e39557362acad7e2a552994c3bc24080e3bdd4e'
'673c0c55bce8068c297f9cdd389402c2d5d5a25e2cf84732cb071198bd6fa78a')
build() {
cd "$pkgname-$pkgver"
# Work around Cyrus bug #2629
export LDFLAGS="${LDFLAGS/,--as-needed}"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--sbindir=/usr/bin \
--with-imap=system
make menuselect.makeopts
./menuselect/menuselect --disable BUILD_NATIVE
make
}
package(){
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
make DESTDIR="$pkgdir" install-headers
make DESTDIR="$pkgdir" samples
# Note you must build the package before you can update meta data!
backup=($(cd "$pkgdir" && echo "etc/$pkgname/"*))
sed -i -e 's,/var/run,/run,' "$pkgdir/etc/asterisk/asterisk.conf"
install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname/examples" "$pkgdir/etc/asterisk/"*
mv "$pkgdir/var/run" "$pkgdir"
# Remove stray /tmp
rmdir "$pkgdir/tmp"
pushd contrib/systemd
install -Dm644 -t "$pkgdir/usr/lib/systemd/system/" "$pkname"*.{service,socket}
pushd "$srcdir"
install -Dm644 "$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
install -Dm644 "$pkgname.logrotated" "$pkgdir/etc/logrotate.d/$pkgname"
install -Dm644 "$pkgname.tmpfile" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}