~singpolyma/asterisk

ref: 130ba7aeba07eb8bb3ea34418ca458bb58b05080 asterisk/contrib/docker/make-package.sh -rwxr-xr-x 1.8 KiB
130ba7ae — Bernhard Schmidt Import asterisk_16.2.1~dfsg.orig.tar.xz 3 years ago
                                                                                
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
#!/bin/bash
# This script intended to be run from the packager container. Please see the
# README.md file for more information on how this script is used.
#
set -ex
[ -n "$1" ]
mkdir -p /opt

# move into the application directory where Asterisk source exists
cd /application

# strip the source of any Git-isms
rsync -av --exclude='.git' . /tmp/application

# move to the build directory and build Asterisk
cd /tmp/application
./configure
cd menuselect
make menuselect
cd ..
make menuselect-tree

menuselect/menuselect --check-deps menuselect.makeopts

# Do not include sound files. You should be mounting these from and external
# volume.
sed -i -e 's/MENUSELECT_MOH=.*$/MENUSELECT_MOH=/' menuselect.makeopts
sed -i -e 's/MENUSELECT_CORE_SOUNDS=.*$/MENUSELECT_CORE_SOUNDS=/' menuselect.makeopts

# Build it!
make all install DESTDIR=/tmp/installdir

rm -rf /tmp/application
cd /build

# Use the Fine Package Management system to build us an RPM without all that
# reeking effort.
fpm -t rpm -s dir -n asterisk-custom --version "$1" \
    --depends libedit \
    --depends libxslt \
    --depends jansson \
    --depends pjproject \
    --depends openssl \
    --depends libxml2 \
    --depends unixODBC \
    --depends libcurl \
    --depends libogg \
    --depends libvorbis \
    --depends speex \
    --depends spandsp \
    --depends freetds \
    --depends net-snmp \
    --depends iksemel \
    --depends corosynclib \
    --depends newt \
    --depends lua \
    --depends sqlite \
    --depends freetds \
    --depends radiusclient-ng \
    --depends postgresql \
    --depends neon \
    --depends libical \
    --depends openldap \
    --depends sqlite2 \
    --depends mysql \
    --depends bluez \
    --depends gsm \
    --depends libuuid \
    --depends libsrtp \
    -C /tmp/installdir etc usr var

chown -R --reference /application/contrib/docker/make-package.sh .