summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ecf72ea74a74ee9452c48349aee0eb002f84b475 (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
# Maintainer: DrRac27 <drrac27 at riseup.net>

pkgname=moment-git
_name=moment
pkgver=v0.7.3.r32.2af33fce
pkgrel=1
pkgdesc='A customizable, keyboard-operable Matrix client. Fork of Mirage'
arch=('x86_64' 'i686' 'aarch64')
url='https://mx-moment.xyz/'
license=('LGPL3')
depends=(
    'qt5-base'
    'qt5-declarative'
    'qt5-quickcontrols2'
    'qt5-svg'
    'qt5-graphicaleffects'
    'qt5-imageformats'
    'python'
    'python-pyotherside'
    'libolm'
    'libjpeg-turbo'
    'zlib'
    'libtiff'
    'libwebp'
    'openjpeg2'
    'libmediainfo'
    'python-pillow'
    'python-pymediainfo'
    'python-cairosvg'
    'python-aiofiles'
    'python-appdirs'
    'python-filetype'
    'python-html-sanitizer'
    'python-lxml'
    'python-mistune>=2'
    'python-matrix-nio'
    'libxss'
    'python-plyer'
    'python-sortedcontainers'
    'python-watchgod'
    'python-redbaron'
    'dbus-python'
    'python-hsluv'
    'python-pycryptodome'
    'python-simpleaudio'
    'python-olm'
    'python-cachetools'
    'python-atomicwrites'
    'python-peewee'
)
makedepends=('cmake' 'git')
provides=('moment')
conflicts=('moment')
source=('git+https://gitlab.com/mx-moment/moment.git')
sha256sums=('SKIP')

prepare() {
    cd "${srcdir}/${_name}"
    git submodule update --init --recursive
}

pkgver() {
    cd "${srcdir}/${_name}"
    local tag=$(git tag --sort=-v:refname | head -1)
    local commits_since=$(git rev-list $tag..HEAD --count)
    echo "$tag.r$commits_since.$(git log --pretty=format:'%h' -n 1)"
}

build() {
    cd "${srcdir}/${_name}"
    make clean || true
    qmake PREFIX=/usr moment.pro
    make
}

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