aboutsummaryrefslogtreecommitdiff
path: root/linux/makepkg/PKGBUILD
blob: 31b2e9b0086971f112b0323d28e2945a07cc86da (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
# Maintainer: Aqua-sama <aqua@iserlohn-fortress.net>

pkgname=smolbote-git
pkgver=0.0.0
pkgrel=1
pkgdesc='Yet another Qt browser'
url="https://neueland.iserlohn-fortress.net/smolbote"

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

depends=('qt5-base' 'qt5-webengine')
makedepends=('git' 'qt5-tools' 'qbs' 'libconfig' 'pkg-config')

source=("git+git://neueland.iserlohn-fortress.net/smolbote.git")
sha512sums=('SKIP')

# qmake location for your Qt version
# Useful if you have another Qt version installed in a specific location
_qmake='/usr/bin/qmake-qt5'

# compiler profile for the qt profile
_compiler='clang'

# Target architecture: x86 x86_64 arm
_architecture='x86_64'
# Optimization level: none, fast, small
_optimization='fast'

# install root, ex: '/usr' or '/usr/local'
# Should this install in /usr/bin, or in /usr/local/bin, or perhaps in /somewhere/else/bin?
_installroot='/usr/local'

pkgver() {
    cd smolbote
    echo "$(git describe --long --tags | tr - .)"
}

prepare() {
    # Prepare qbs toolchain
    # qbs config location
    rm -rf config
    mkdir config

    qbs-setup-toolchains --settings-dir config --detect
    qbs-setup-qt --settings-dir config ${_qmake} qt

    # set a custom compiler profile
    #qbs-config --settings-dir config profiles.${_compiler}.qbs.architecture ${_architecture}
    qbs-config --settings-dir config profiles.${_compiler}.qbs.optimization ${_optimization}
    qbs-config --settings-dir config profiles.qt.baseProfile ${_compiler}

    # Clear out the build folder
    rm -rf build
    mkdir build
}

build() {
    cd smolbote
    qbs build --settings-dir ../config -d ../build -p poi profile:qt release
}

package() {
    cd smolbote
    qbs install --settings-dir ../config -d ../build -p poi --install-root "${pkgdir}${_installroot}" profile:qt release
}