mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 06:27:18 +08:00
toxcore: added to official repository as for gitlab issue #15
This commit is contained in:
parent
c13ec5b46d
commit
872684c1f0
46
toxcore/PKGBUILD
Normal file
46
toxcore/PKGBUILD
Normal file
@ -0,0 +1,46 @@
|
||||
pkgname=toxcore
|
||||
_pkgname=c-toxcore
|
||||
pkgver=0.1.11
|
||||
pkgrel=1
|
||||
pkgdesc="A FOSS instant messaging application aimed to replace Skype"
|
||||
arch=('x86_64')
|
||||
url="https://tox.chat/"
|
||||
screenshot='http://siliconangle.com/files/2013/08/tox-im-logo.jpg'
|
||||
license=('GPL3')
|
||||
depends=('systemd' 'libconfig' 'libsodium' 'libvpx' 'opus')
|
||||
makedepends=('check' 'cmake')
|
||||
conflicts=('tox-git')
|
||||
provides=('tox' 'toxcore')
|
||||
install='toxcore.install'
|
||||
source=("${_pkgname}-v${pkgver}.tar.gz::https://github.com/TokTok/${_pkgname}/releases/download/v${pkgver}/${_pkgname}-${pkgver}.tar.gz"
|
||||
'toxcore.conf')
|
||||
sha512sums=('4cc853c549c9ea9e2b48cf144b2a5f5d43e79c1103911beb0e8a827d24e40520907c2cef3c1eb05a37a7d0223b33dee352a3fc7a48e76a1a4947989b17f44e88'
|
||||
'aa1dcfbdf9b613f5d89e238ff5d01e0ea150ad3162792acb806f51ce07fd9ade1270b310b1285a828dcdf578549b95a89fd9bd198fb205c83f5a5be2c969ea63')
|
||||
|
||||
prepare() {
|
||||
cd $_pkgname-$pkgver
|
||||
sed -i "s|/usr/local|/usr|" other/bootstrap_daemon/tox-bootstrapd.service
|
||||
sed -i "/Rpath/d;/RPATH/d" CMakeLists.txt
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $_pkgname-$pkgver
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DDHT_BOOTSTRAP=on \
|
||||
-DBOOTSTRAP_DAEMON=on \
|
||||
-DBUILD_NTOX=off
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd $_pkgname-$pkgver
|
||||
make test
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $_pkgname-$pkgver
|
||||
make DESTDIR="$pkgdir" install
|
||||
install -Dm644 ../toxcore.conf $pkgdir/usr/lib/sysusers.d/toxcore.conf
|
||||
install -Dm644 ./other/bootstrap_daemon/tox-bootstrapd.service $pkgdir/usr/lib/systemd/system/tox-bootstrapd.service
|
||||
install -Dm644 ./other/bootstrap_daemon/tox-bootstrapd.conf $pkgdir/etc/tox-bootstrapd.conf
|
||||
}
|
2
toxcore/toxcore.conf
Normal file
2
toxcore/toxcore.conf
Normal file
@ -0,0 +1,2 @@
|
||||
u tox-bootstrapd 199 "Tox bootstrapd"
|
||||
g tox-bootstrapd 199
|
16
toxcore/toxcore.install
Normal file
16
toxcore/toxcore.install
Normal file
@ -0,0 +1,16 @@
|
||||
post_install() {
|
||||
[[ -d var/lib/tox-bootstrapd ]] || install -dm 750 -o 199 -g 199 var/lib/tox-bootstrapd
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
(( $(vercmp $2 '3523-3') < 0 )) && (
|
||||
[[ -d var/lib/tox-bootstrapd ]] || install -dm 750 -o 199 -g 199 var/lib/tox-bootstrapd
|
||||
) || true
|
||||
(( $(vercmp $2 '1:0.1.4-2') < 0 )) && (
|
||||
# remove previously created tox-bootstrapd user
|
||||
userdel tox-bootstrapd || true
|
||||
# chown to new tox-bootstrapd that will be created by sysusers.d
|
||||
chown -R 199:199 var/lib/tox-bootstrapd
|
||||
) || true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user