summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 70af5036e0298cd0e7347297a3002e64388d895e (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
# Maintainer: Andrew Werner <aur@andrewwerner.com>
pkgname=scantailor-universal-git
pkgdesc="ScanTailor Universal - a fork based on Enhanced+Featured+Master versions of ST"
pkgver=r1552.f280e04a
pkgrel=2
arch=("x86_64")
url="https://github.com/trufanov-nok/scantailor-universal"
license=("GPL3")
depends=(
    "boost-libs"
    "libjpeg"
    "libpng"
    "libtiff"
    "qt5-base"
    "qt5-svg"
    "zlib"
)
makedepends=(
    "boost"
    "cmake"
    "qt5-tools"
    "git"
    "ninja"
)
provides=("scantailor" "scantailor-universal")
conflicts=("scantailor-universal" "scantailor" "scantailor-advanced" "scantailor-advanced-git")
source=("scantailor-universal::git+https://github.com/trufanov-nok/scantailor-universal.git")
sha256sums=('SKIP')

pkgver() {
    cd "scantailor-universal"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

prepare() {
    # This is the NEW part that fixes your error.
    # It initializes the submodules (BreezeStyleSheets) so they actually download.
    cd "scantailor-universal"
    git submodule update --init --recursive
}

build() {
    cd "${srcdir}/scantailor-universal"

    cmake -B build -S . \
        -GNinja \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr

    cmake --build build
}

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

    # Create the symlink for the GUI
    # This makes 'scantailor' launch 'scantailor-universal'
    ln -s scantailor-universal "${pkgdir}/usr/bin/scantailor"
}