summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4cebf3abd7572e1a0e69bff47dff81af2391808b (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
# Maintainer: Flat <flat@imo.uto.moe>
pkgname=imgbrd-grabber-git
pkgver=v7.6.2.r128.46db5730
pkgrel=1
pkgdesc="Very customizable imageboard/booru downloader with powerful filenaming features."
arch=('i686' 'x86_64')
url="https://github.com/Bionus/imgbrd-grabber"
license=('Apache')
depends=('qt5-multimedia' 'qt5-declarative' 'nodejs' 'qt5-networkauth' 'hicolor-icon-theme')
makedepends=('git' 'cmake' 'qt5-tools' 'npm')
optdepends=('openssl: used for HTTPS sources')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/Bionus/imgbrd-grabber.git#branch=develop' 'Grabber.desktop')
md5sums=('SKIP' 'SKIP')


pkgver() {
    cd "$srcdir/${pkgname%-git}"
    printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
}

prepare() {
    cd "$srcdir/${pkgname%-git}"
    git submodule update --init --recursive
}

build() {
    cmake -B build -S "${pkgname%-git}/src" \
        -DCMAKE_BUILD_TYPE='None' \
        -DCMAKE_INSTALL_PREFIX='/usr' \
        -DUSE_QSCINTILLA=0 \
        -DUSE_BREAKPAD=O \
        -Wno-dev
    make -C build
}

package() {
    cd "$srcdir/build"
    make DESTDIR="$pkgdir/" install
    install -Dm644 "$srcdir/${pkgname%-git}/src/gui/resources/images/icon.png" "$pkgdir/usr/share/pixmaps/Grabber.png"
    install -Dm644 "$srcdir/Grabber.desktop" "$pkgdir/usr/share/applications/Grabber.desktop"
    touch "$pkgdir/usr/share/Grabber/settings.ini"
}