blob: 3cf20e1fa720379c42832448d340a17247e48dd3 (
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
|
# Maintainer: BowDown097 <bowdown097 at sneed dot church>
_pkgname=qttube
pkgname=${_pkgname}-git
pkgver=0.1.r373.gb0f6161
pkgrel=1
pkgdesc="A Qt frontend for YouTube."
arch=('i686' 'x86_64' 'aarch64')
url="https://github.com/BowDown097/QtTube"
license=('GPL3')
depends=('qt6-base' 'qt6-webchannel' 'qt6-webengine')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
makedepends=('cmake' 'git')
optdepends=('libxss: for preventing the screen from sleeping while watching videos')
source=("git+https://github.com/BowDown097/QtTube"
"git+https://github.com/BowDown097/innertube-qt"
"git+https://github.com/woboq/verdigris")
sha256sums=('SKIP'
'SKIP'
'SKIP')
pkgver() {
# Switch this to "git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'"
# once there's some actual versioning going!
cd "${srcdir}/QtTube"
local _revision=$(git rev-list --count $(git rev-list --max-parents=0 HEAD)..HEAD)
local _commit=$(git rev-parse --short HEAD | sed 's/\([^-]*-g\)/r\1/;s/-/./g')
printf "0.1.r%s.g%s" "${_revision:?}" "${_commit:?}"
}
prepare() {
cd "${srcdir}/QtTube"
git submodule init
git config submodule.depends/innertube-qt.url "${srcdir}/innertube-qt"
git -c protocol.file.allow=always submodule update
cd "${srcdir}/QtTube/lib/innertube-qt"
git submodule init
git config submodule.depends/verdigris.url "${srcdir}/verdigris"
git -c protocol.file.allow=always submodule update
}
build() {
cmake -B build -S "${srcdir}/QtTube" \
-DCMAKE_BUILD_TYPE="None" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DQTTUBE_QT_VERSION_MAJOR="6" \
-Wno-dev
cmake --build build
}
package() {
DESTDIR="$pkgdir" cmake --install build
cd "${srcdir}/QtTube"
install -Dm644 "program_info/qttube.desktop" "$pkgdir/usr/share/applications/qttube.desktop"
install -Dm644 "res/qttube.svg" "$pkgdir/usr/share/pixmaps/qttube.svg"
}
|