summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a7c429946372a4356e3d9cde2475926913f6d844 (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: weearc <q19981121@163.com>
pkgname=tencentvideo
_pkgname=$'\u817e\u8baf\u89c6\u9891'
pkgver=1.0.10
pkgrel=1
epoch=
pkgdesc="China's leading online video media platform."
arch=("x86_64")
url="https://v.qq.com"
license=('custom')
groups=()
depends=(
	 'gtk3'
	 'libxcb'
	 'electron'
	)
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=('tenvideo')
replaces=()
backup=()
options=()
install=
changelog=
source=(
	"https://dldir1.qq.com/qqtv/linux/Tenvideo_universal-$pkgver.$arch.rpm"
	"https://www.qq.com/contract20180827.htm")
noextract=()
sha256sums=('5f26f0cf722dac9dd764abbb860d709de3122f756e8e29e20944b40ac2e17fd1'
            'SKIP')
validpgpkeys=()

prepare() {
	cd ${srcdir}/
	mv opt/$_pkgname opt/tencentvideo
    echo "[Desktop Entry]
Name=tencentvideo
Name[zh_CN]=$_pkgname
Exec=/usr/bin/tencentvideo %U
Terminal=false
Type=Application
Icon=TencentVideo
Comment=
Comment[zh_CN]=不负好时光
Categories=AudioVideo;" > usr/share/applications/TencentVideo.desktop
}


package() {
	install -d ${pkgdir}/opt
	install -d ${pkgdir}/usr/bin
	install -d ${pkgdir}/usr/share/icons
	install -d ${pkgdir}/usr/share/applications
	install -d ${pkgdir}/usr/share/licenses
	
	echo "#!/bin/bash
electron /opt/tencentvideo/app.asar \$@" > ${pkgdir}/usr/bin/tencentvideo && chmod a+x ${pkgdir}/usr/bin/tencentvideo
	
	mkdir ${pkgdir}/opt/tencentvideo
	install -Dm644 ${srcdir}/opt/tencentvideo/resources/app.asar ${pkgdir}/opt/tencentvideo/app.asar
	install -Dm644 ${srcdir}/usr/share/applications/TencentVideo.desktop ${pkgdir}/usr/share/applications/TencentVideo.desktop
	
	mkdir ${pkgdir}/usr/share/licenses/tencent
	install -Dm644 "contract20180827.htm" "${pkgdir}/usr/share/licenses/tencent/contract.htm"
	
	for i in 16 22 24 32 36 48 64 72 96 128 256
	do
        mkdir -p ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps
        install ${srcdir}/usr/share/icons/hicolor/${i}x${i}/apps/TencentVideo.png ${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/TencentVideo.png
    done
}