summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c84497e0e35cd70933ad46903e1700fabdb3de5d (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
# Maintainer: Fredy GarcĂ­a <frealgagu at gmail dot com>

pkgname=linphone-desktop-all-git
pkgver=4.1.1.r415.efa3e107
pkgrel=3
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=("qt5-base" "qt5-graphicaleffects" "qt5-quickcontrols" "qt5-quickcontrols2" "qt5-svg" "qt5-tools")
makedepends=("cmake" "doxygen" "git" "graphviz" "ladspa" "python-pystache" "yasm")
conflicts=("linphone-dekstop")
source=("${pkgname%-all-git}::git://git.${pkgname%-desktop-all-git}.org/${pkgname%-all-git}"
        "${pkgname%-desktop-all-git}.desktop"
        "mediastreamer2.patch"
        "belle-sip.patch"
        "${pkgname%-desktop-all-git}.patch")
sha256sums=("SKIP"
            "346d983f503873811b3a4f72772e5afe4990275526c9e15c1b5cde2ad69a0544"
            "bc0589eb2739aee429db9c67aa4308fcd817324ef5248b1766efee717798a900"
            "8a365864cfa8c6eb517701bcb2a2a7d51009bf504c104884ed3fbd05a36b3a84"
            "2657947c9311cdb3fd5167526943346bccd05a9433a242a280d9ed7f49b6ae6d")

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

  msg2 "Synchronizing submodules..."
  git submodule sync

  msg2 "Updating submodules..."
  git submodule update --init --recursive
  
  patch -Np1 -i "../mediastreamer2.patch"
  patch -Np1 -i "../belle-sip.patch"
  patch -Np1 -i "../${pkgname%-desktop-all-git}.patch"
}

pkgver() {
  cd "${srcdir}/${pkgname%-all-git}"
  (
    set -o pipefail
    git describe --long --tags 2> /dev/null | sed "s/^[a-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}"

  msg2 "Preparing build..."
  ./prepare.py -c
  ./prepare.py --list-cmake-variables -DENABLE_RELATIVE_PREFIX=YES

  msg2 "Building..."
  make
}

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

  msg2 "Installing desktop file into /usr/share/applications/"
  install -D -m 0644 "${srcdir}/${pkgname%-desktop-all-git}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-desktop-all-git}.desktop"
  
  msg2 "Installing in /opt"
  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"

  #cp -r "OUTPUT/desktop" "${pkgdir}/usr"
  #Conflicting packages if installed in /usr
  #bcmatroska2-git
  #bctoolbox-git
  #belcard-git
  #belle-sip-git
  #belr-git
  #bzrtp-git
  #ffmpeg
  #gsm
  #libsrtp
  #libvpx
  #libxml2
  #linphone-desktop-git
  #linphone-git
  #mbedtls
  #mediastreamer-git
  #minizip-git
  #opus
  #ortp-git
  #speex
  #speexdsp
  #sqlite
  #v4l-utils
  #zlib
}