summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7293cd86f324fbc9725f6a2e896c5e959b490d57 (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
# Maintainer: BowDown097 <bowdown097 at sneed dot church>

_pkgname=qttube
pkgname=${_pkgname}-git
pkgver=3ecb147
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() {
    cd "${srcdir}/QtTube"
    git rev-parse --short HEAD | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

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"
}