aboutsummaryrefslogtreecommitdiff
path: root/linux/makepkg/PKGBUILD
blob: efdea159816211aa8d5537bdb838e584109d4646 (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
# Maintainer: Aqua-sama <aqua at iserlohn-fortress dot net>

## not-use flags
# install prefix
_prefix='/usr'

pkgname=smolbote-git
pkgdesc='Yet another no-frills browser'
pkgver=0
pkgrel=1

url="https://neueland.iserlohn-fortress.net/cgit/smolbote"
install="smolbote.install"

arch=('x86_64' 'aarch64')
license=('GPL3')

depends=('qt6-svg' 'qt6-webengine' 'spdlog' 'fmt')
makedepends=('git' 'cmake' 'openssl' 'qt6-tools' 'scdoc')
optdepends=('firejail: launch a sandboxed instance')

# use git+file:///path/to/your/repo to build from a local repo
source=("git+https://neueland.iserlohn-fortress.net/cgit/smolbote"
        "SingleApplication-v3.4.1.tar.gz::https://github.com/itay-grudev/SingleApplication/archive/refs/tags/v3.4.1.tar.gz")

b2sums=('SKIP'
        'fe320ccb0390b13b1c7b0c017cff34b02f5138bd6643457843a7200374c8a994a37a1b00a65c70e83ba5bdc61f157ccfaa8cdfc0eee7b2149df4acda06173669')

validpgpkeys=(BB1C090188E3E32B375C13FD095DE26BC16D2E98) # Aqua-sama <aqua@iserlohn-fortress.net>

prepare() {
    msg2 "Populate third_party packages..."
    mkdir "$srcdir/smolbote/third_party"
    ln -s "$srcdir/SingleApplication-3.4.1" "$srcdir/smolbote/third_party/SingleApplication"

    msg2 "Configure..."
    cmake -S $srcdir/smolbote -B $srcdir/build \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DINSTALL_MANPAGES=ON
}

pkgver() {
    cd smolbote
    # Without version tag
    echo r$(git rev-list --count HEAD)-$(git rev-parse --short HEAD) | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cmake --build $srcdir/build -- ${MAKEFLAGS}
    cmake --build $srcdir/build --target manpages -- ${MAKEFLAGS}
}

check() {
    ctest --test-dir $srcdir/build
}

package() {
    DESTDIR="$pkgdir" cmake --install $srcdir/build --strip
}