summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b7716ee39fd01ada91b04b6754b2bb11a1cbec97 (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
# Maintainer:
# Contributor: Midov <midov@midov.pl>

_pkgname="matrix-mirage"
pkgname="$_pkgname-git"
pkgver=0.7.2.r0.g9a4ababd
pkgrel=2
pkgdesc='A fancy, customizable, keyboard-operable Matrix chat client for encrypted and decentralized communication.'
arch=('x86_64')
url='https://github.com/mirukana/mirage'
license=('LGPL3')

depends=(
  'hicolor-icon-theme'
  'libxss'
  'qt5-base'
  'qt5-declarative'
  'qt5-quickcontrols2'

  # Runtime
  'python-hsluv'
  'python-matrix-nio'
  #   'python-aiofiles'
  'python-pymediainfo'
  'python-pyotherside'
  'python-sortedcontainers'
  'python-watchgod'

  'dbus-python'
  'python-appdirs'
  'python-async_generator'
  'python-cairosvg'
  'python-filetype'
  'python-hsluv'
  'python-lxml'
  'python-pillow'

  # AUR
  'python-html-sanitizer'
  'python-mistune1'
  'python-plyer'
  # 'python-pyfastcopy'
  'python-redbaron'
  #   'python-baron'
  #     'python-rply'
  'python-simpleaudio'
)

makedepends=(
  'cmake'
  'git'
)

provides=(
  'mirage-matrix'
  'matrix-mirage'
)
conflicts=(${provides[@]})

source=(
  "$_pkgname"::"git+$url"

  'RadialBarDemo'::'git+https://github.com/mirukana/RadialBarDemo'
  'SortFilterProxyModel'::'git+https://github.com/oKcerG/SortFilterProxyModel'
  'gel'::'git+https://github.com/Cutehacks/gel'
  'hsluv-c'::'git+https://github.com/hsluv/hsluv-c'
  'qsyncable'::'git+https://github.com/benlau/qsyncable'
)
sha256sums=(
  'SKIP'

  'SKIP'
  'SKIP'
  'SKIP'
  'SKIP'
  'SKIP'
)

pkgver() {
  cd "$srcdir/$_pkgname"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$srcdir/$_pkgname"
  _submodules=(
    'submodules/RadialBarDemo'
    'submodules/SortFilterProxyModel'
    'submodules/gel'
    'submodules/hsluv-c'
    'submodules/qsyncable'
  )
  for submodule in ${_submodules[@]} ; do
    mkdir -p "$submodule"
    git submodule init ${submodule}
    git submodule set-url ${submodule} "${srcdir}/${submodule##*/}"
    git -c protocol.file.allow=always submodule update ${submodule}
  done

  sed -Ei 's@collections\.Mapping@collections.abc.Mapping@g' "$srcdir/$_pkgname/src/backend/utils.py"
}

build() {
  cd "$srcdir/$_pkgname"
  qmake PREFIX=/usr mirage.pro
  make
}

package() {
  cd "$srcdir/$_pkgname"
  make INSTALL_ROOT="$pkgdir" install 
}