aboutsummaryrefslogtreecommitdiff
path: root/linux/makepkg/PKGBUILD
blob: 9c47f919919ace84d70a8cbb54235728a1f80300 (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
# Maintainer: xiannox <xiannox@iserlohn-fortress.net>

pkgname=smolbote-git
pkgver=0.1.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'
# install root, ex: '/usr' or '/usr/local'
# Should this install in /usr/bin, or in /usr/local/bin, or perhaps in /somewhere/else/bin?
_iroot='/usr/local'

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

prepare() {
    # Prepare the qbs modules
    rm -rf config
    mkdir config
    qbs-setup-toolchains --settings-dir config --detect
    qbs-setup-qt --settings-dir config ${_qmake} qt

    # 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}${_iroot}" profile:qt release
}