summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7a75d09ba7ce7d620c50c0170478eae8af85b5a7 (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
# Maintainer: Gary Wang <wzc782970009@gmail.com>

pkgname=pineapple-pictures-git
pkgver=r312.fd5929b
pkgrel=1
pkgdesc='Yet another lightweight image viewer'
arch=('x86_64' 'aarch64')
url='https://github.com/BLumia/pineapple-pictures/'
license=('MIT')
conflicts=('pineapple-pictures')
depends=(
    'qt5-svg'
    'exiv2'
)
makedepends=(
    'git'
    'qt5-tools'
    'cmake'
)
optdepends=(
    'kimageformats5: XCF, EXR, PSD and other extra image format support'
    'qt5-imageformats: TIFF, WEBP, and other extra image formats'
)
source=(
    'git+https://github.com/BLumia/pineapple-pictures.git'
)
md5sums=(
    'SKIP'
)

pkgver() {
    cd ${srcdir}/pineapple-pictures

    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build () {
    cd ${srcdir}/pineapple-pictures
    cmake -DCMAKE_INSTALL_PREFIX=/usr .
    cmake --build . -j`nproc`
}

package() {
    make -C ${srcdir}/pineapple-pictures DESTDIR="$pkgdir" install
    cd ${srcdir}/pineapple-pictures
    #make INSTALL_ROOT="$pkgdir" install
    #install -Dm755 ./ppic ${pkgdir}/usr/bin/ppic
    mkdir -p ${pkgdir}/usr/share/licenses/pineapple-pictures-git
    install ./LICENSE ${pkgdir}/usr/share/licenses/pineapple-pictures-git/LICENSE
}