summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4ffce84ba468d53cc9357f224eae43e206784af9 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# Maintainer: Fredy GarcĂ­a <frealgagu at gmail dot com>

pkgname=linphone-desktop-all-git
pkgver=4.1.1.r663.4a43f00e
pkgrel=1
pkgdesc="A free VoIP and video softphone based on the SIP protocol (Installed in /opt with all deps included)."
arch=("x86_64")
url="https://www.${pkgname%-desktop-all-git}.org/"
license=("GPL2")
depends=("alsa-utils" "desktop-file-utils" "glew" "gsm" "java-runtime" "libbsd" "pulseaudio" "qt5-graphicaleffects" "qt5-quickcontrols" "qt5-quickcontrols2" "qt5-speech" "qt5-svg" "qt5-tools" "v4l-utils")
makedepends=("cmake" "doxygen" "git" "graphviz" "ladspa" "nasm" "python-pystache" "python-setuptools" "yasm")
provides=("${pkgname%-all-git}" "${pkgname%-git}")
conflicts=("${pkgname%-desktop-all-git}" "${pkgname%-all-git}" "${pkgname%-git}")
source=(
  "${pkgname%-all-git}::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/${pkgname%-all-git}.git"
  "bcg729::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/bcg729.git"
  "bcmatroska2::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/bcmatroska2.git"
  "bctoolbox::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/bctoolbox.git"
  "bcunit::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/bcunit.git"
  "belcard::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/belcard.git"
  "belle-sip::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/belle-sip.git"
  "belr::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/belr.git"
  "bzrtp::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/bzrtp.git"
  "bv16-floatingpoint::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/bv16-floatingpoint.git"
  "codec2::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/codec2.git"
  "decaf::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/decaf.git"
  "ffmpeg::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/ffmpeg.git"
  "gsm::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/gsm.git"
  "libjpeg-turbo::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/libjpeg-turbo.git"
  "libvpx::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/libvpx.git"
  "libxml2::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/libxml2.git"
  "libxsd::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/libxsd.git"
  "mbedtls::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/mbedtls.git"
  "minizip::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/minizip.git"
  "opencore-amr::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/opencore-amr.git"
  "openh264::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/openh264.git"
  "opus::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/opus.git"
  "soci::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/soci.git"
  "speex::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/speex.git"
  "sqlite3::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/sqlite3.git"
  "srtp::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/srtp.git"
  "vo-amrwbenc::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/vo-amrwbenc.git"
  "xerces-c::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/xerces-c.git"
  "zlib::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/zlib.git"
  "zxing-cpp::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/zxing-cpp.git"
  "lime::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/lime.git"
  "${pkgname%-desktop-all-git}-cmake-builder::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/${pkgname%-desktop-all-git}-cmake-builder.git"
  "${pkgname%-desktop-all-git}-sdk::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/${pkgname%-desktop-all-git}-sdk.git"
  "${pkgname%-desktop-all-git}::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/${pkgname%-desktop-all-git}.git"
  "mediastreamer2::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/mediastreamer2.git"
  "msamr::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/msamr.git"
  "mscodec2::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/mscodec2.git"
  "msopenh264::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/msopenh264.git"
  "mssilk::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/mssilk.git"
  "mswasapi::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/mswasapi.git"
  "mswebrtc::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/mswebrtc.git"
  "ortp::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/ortp.git"
  "webrtc::git+https://gitlab.${pkgname%-desktop-all-git}.org/BC/public/external/webrtc.git"
  "${pkgname%-desktop-all-git}.desktop"
  "${pkgname%-all-git}.patch"
  "${pkgname%-desktop-all-git}.patch"
  "belle-sip.patch"
  "ortp.patch"
  "soci.patch"
)
sha256sums=(
  "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP"
  "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP"
  "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP"
  "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP" "SKIP"
  "346d983f503873811b3a4f72772e5afe4990275526c9e15c1b5cde2ad69a0544"
  "e7574cdb0a5f8d334b1ed1d938fd6c7639e5785b80f01d39e81a682595af4171"
  "c1f54c0634c2d42d091890ed5a73bcecf8c7c2d0c7f052a0014840ab36c64a01"
  "093fa135a00916f171e96f53695de5fb03b2306e2f54b17dc693cb1527591e15"
  "502564a8be79920604abf41b5d5bd2dde12c8c42adb3d92bcd23dcbab8eaf5fb"
  "61a9a107267658971348343433a0709af7e1160d4227867faa8decd255f0289c"
)

prepare() {
  cd "${srcdir}/${pkgname%-all-git}"

  git submodule init
  git config submodule.submodules/externals/minizip.url "${srcdir}/minizip"
  git config submodule.${pkgname%-desktop-all-git}-sdk.url "${srcdir}/${pkgname%-desktop-all-git}-sdk"
  git submodule update --init
  patch -Np1 -i "${srcdir}/${pkgname%-all-git}.patch"

  cd "${srcdir}/${pkgname%-all-git}/${pkgname%-desktop-all-git}-sdk"

  git config submodule.bcg729.url "${srcdir}/bcg729"
  git config submodule.bcmatroska2.url "${srcdir}/bcmatroska2"
  git config submodule.bctoolbox.url "${srcdir}/bctoolbox"
  git config submodule.bcunit.url "${srcdir}/bcunit"
  git config submodule.belcard.url "${srcdir}/belcard"
  git config submodule.belle-sip.url "${srcdir}/belle-sip"
  git config submodule.belr.url "${srcdir}/belr"
  git config submodule.bzrtp.url "${srcdir}/bzrtp"
  git config submodule.external/bv16-floatingpoint.url "${srcdir}/bv16-floatingpoint"
  git config submodule.external/codec2.url "${srcdir}/codec2"
  git config submodule.external/decaf.url "${srcdir}/decaf"
  git config submodule.external/ffmpeg.url "${srcdir}/ffmpeg"
  git config submodule.external/gsm.url "${srcdir}/gsm"
  git config submodule.external/libjpeg-turbo.url "${srcdir}/libjpeg-turbo"
  git config submodule.external/libvpx.url "${srcdir}/libvpx"
  git config submodule.external/libxml2.url "${srcdir}/libxml2"
  git config submodule.external/libxsd.url "${srcdir}/libxsd"
  git config submodule.external/mbedtls.url "${srcdir}/mbedtls"
  git config submodule.external/opencore-amr.url "${srcdir}/opencore-amr"
  git config submodule.external/openh264.url "${srcdir}/openh264"
  git config submodule.external/opus.url "${srcdir}/opus"
  git config submodule.external/soci.url "${srcdir}/soci"
  git config submodule.external/speex.url "${srcdir}/speex"
  git config submodule.external/sqlite3.url "${srcdir}/sqlite3"
  git config submodule.external/srtp.url "${srcdir}/srtp"
  git config submodule.external/vo-amrwbenc.url "${srcdir}/vo-amrwbenc"
  git config submodule.external/xerces-c.url "${srcdir}/xerces-c"
  git config submodule.external/zlib.url "${srcdir}/zlib"
  git config submodule.external/zxing-cpp.url "${srcdir}/zxing-cpp"
  git config submodule.lime.url "${srcdir}/lime"
  git config submodule.cmake-builder.url "${srcdir}/${pkgname%-desktop-all-git}-cmake-builder"
  git config submodule.${pkgname%-desktop-all-git}.url "${srcdir}/${pkgname%-desktop-all-git}"
  git config submodule.mediastreamer2.url "${srcdir}/mediastreamer2"
  git config submodule.msamr.url "${srcdir}/msamr"
  git config submodule.mscodec2.url "${srcdir}/mscodec2"
  git config submodule.msopenh264.url "${srcdir}/msopenh264"
  git config submodule.mssilk.url "${srcdir}/mssilk"
  git config submodule.mswasapi.url "${srcdir}/mswasapi"
  git config submodule.mswebrtc.url "${srcdir}/mswebrtc"
  git config submodule.ortp.url "${srcdir}/ortp"
  git submodule update --init

  cd "${srcdir}/${pkgname%-all-git}/${pkgname%-desktop-all-git}-sdk/mswebrtc"

  git config submodule.webrtc.url "${srcdir}/webrtc"
  git submodule update --init

  cd "${srcdir}/${pkgname%-all-git}/${pkgname%-desktop-all-git}-sdk/${pkgname%-desktop-all-git}"

  patch -Np1 -i "${srcdir}/${pkgname%-desktop-all-git}.patch"

  cd "${srcdir}/${pkgname%-all-git}/${pkgname%-desktop-all-git}-sdk/belle-sip"

  patch -Np1 -i "${srcdir}/belle-sip.patch"

  cd "${srcdir}/${pkgname%-all-git}/${pkgname%-desktop-all-git}-sdk/ortp"

  patch -Np1 -i "${srcdir}/ortp.patch"

  cd "${srcdir}/${pkgname%-all-git}/${pkgname%-desktop-all-git}-sdk/external/soci"

  patch -Np1 -i "${srcdir}/soci.patch"
}

pkgver() {
  cd "${srcdir}/${pkgname%-all-git}"
  (
    set -o pipefail
    git describe --long --tags 2> /dev/null | sed "s/^[A-Za-z\.\-]*//;s/\([^-]*-\)g/r\1/;s/-/./g" || 
    printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 
  )
}

build() {
  cd "${srcdir}/${pkgname%-all-git}"

  ./prepare.py -c
  ./prepare.py --all-codecs
  make
}

package() {
  cd "${srcdir}/${pkgname%-all-git}"

  install -D -m 0644 "${srcdir}/${pkgname%-desktop-all-git}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-desktop-all-git}.desktop"
  install -d "${pkgdir}/opt"
  cp -r "OUTPUT/desktop" "${pkgdir}/opt/${pkgname%-all-git}"

  install -d "${pkgdir}/usr/share"
  mv "${pkgdir}/opt/${pkgname%-all-git}/share/icons" "${pkgdir}/usr/share"
}