blob: 8dff6af6a0026cda1abe192057a54e4a5852b338 (
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
|
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
# Previous maintainer: Ivan Shapovalov <intelfx@intelfx.name>
# Contributor: Felix Yan <felixonmars@archlinux.org>
# Contributor: HÃ¥vard Pettersson <mail@haavard.me>
# Contributor: naxuroqa <naxuroqa at gmail.com>
# Contributor: Boohbah <boohbah at gmail.com>
# Contributor: Kevin MacMartin <prurigro at gmail dot com>
pkgname=toxcore-git
pkgver=0.2.21.r3.g679444751
pkgrel=1
pkgdesc="Peer to peer (serverless) instant messenger core"
arch=('i686' 'x86_64')
url="https://tox.chat/"
license=('GPL-3.0-or-later')
depends=('glibc' 'libconfig' 'libsodium' 'libvpx' 'msgpack-c' 'opus')
makedepends=('git' 'cmake')
provides=("toxcore=$pkgver" 'tox')
conflicts=('toxcore' 'tox')
backup=('etc/tox-bootstrapd.conf')
options=('staticlibs')
source=("git+https://github.com/TokTok/c-toxcore.git"
"toxcore.conf::https://gitlab.archlinux.org/archlinux/packaging/packages/toxcore/-/raw/main/toxcore.conf"
"toxcore.tmpfiles::https://gitlab.archlinux.org/archlinux/packaging/packages/toxcore/-/raw/main/toxcore.tmpfiles")
sha256sums=('SKIP'
'SKIP'
'SKIP')
prepare() {
cd "c-toxcore"
git submodule update --init --recursive
sed -i "s|/usr/local|/usr|" "other/bootstrap_daemon/tox-bootstrapd.service"
}
pkgver() {
cd "c-toxcore"
_tag=$(git tag -l --sort -v:refname | grep -E '^v?[0-9\.]+$' | head -n1)
_rev=$(git rev-list --count $_tag..HEAD)
_hash=$(git rev-parse --short HEAD)
printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/^v//'
}
build() {
cd "c-toxcore"
cmake \
-B "_build" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DCMAKE_INSTALL_LIBDIR="lib" \
./
cmake --build "_build"
}
check() {
cd "c-toxcore"
#cmake --build "_build" --target test
}
package() {
cd "c-toxcore"
DESTDIR="$pkgdir" cmake --install "_build"
install -Dm644 "$srcdir/toxcore.conf" -t "$pkgdir/usr/lib/sysusers.d"
install -Dm644 "$srcdir/toxcore.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/toxcore.conf"
install -Dm644 "other/bootstrap_daemon/tox-bootstrapd.service" -t "$pkgdir/usr/lib/systemd/system"
install -Dm644 "other/bootstrap_daemon/tox-bootstrapd.conf" -t "$pkgdir/etc"
}
|