# Maintainer: Chocobo1 # Previous maintainer: Ivan Shapovalov # Contributor: Felix Yan # Contributor: HÃ¥vard Pettersson # Contributor: naxuroqa # Contributor: Boohbah # Contributor: Kevin MacMartin pkgname=toxcore-git pkgver=0.2.18.r281.gad4921dba 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" git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' } build() { cd "c-toxcore" cmake \ -B "_build" \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DCMAKE_INSTALL_LIBDIR="lib" \ ./ make -C "_build" } check() { cd "c-toxcore" make -C "_build" test } package() { cd "c-toxcore" make -C "_build" DESTDIR="$pkgdir" install 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" }