summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c01e668525e3cfe13d30cc617cd0513c7aa2e18c (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
# Maintainer: Bernd Schöler <besc@here-be-braces.bom>
# Contributor: Lukas Jirkovsky <l.jirkovsky AT gmail.com>

# The Photivo-to-Gimp GIMP plugin (ptGimp) is not built
# because it became obsolete with GIMP 2.10
# see: https://photivo.org/download/gimp#photivo_to_gimp

pkgname=photivo-git
pkgver=20200822_49eed94
pkgrel=1
epoch=1
pkgdesc="Free and open source photo processor"
arch=('x86_64')
url="https://photivo.org/"
license=('custom:GPL3 only')
depends=(
    'exiv2' 'fftw' 'graphicsmagick' 'lcms2' 'lensfun' 'liblqr'
    'libraw' 'qt5-base' 'shared-mime-info'
)
makedepends=('cmake' 'git')
optdepends=('gimp: Gimp plugins' 'python2: Gimp to Photivo plugin')
provides=('photivo')
conflicts=('photivo')
source=('git+https://bitbucket.org/Photivo/photivo.git')
md5sums=('SKIP')

pkgver() {
    cd photivo
    git log -1 --format='%cd_%h' --date=short | tr -d -
}

build() {
    cmake -S photivo -B "build-$pkgver" \
          -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
    cd "build-$pkgver"
    make
}

package() {
    cd "build-$pkgver"
    make DESTDIR="$pkgdir/" install
    cd ..

    # GIMP plugin *Export to Photivo*
    install -Dm 755 \
            "photivo/mm extern photivo.py" \
            "$pkgdir/usr/lib/gimp/2.0/plug-ins/mm-extern-photivo.py"

    # licence because Arch does not provide a *GPL3 only* one
    sed -n '/Photivo is free software/,//p'  "photivo/README" > "build-$pkgver/LICENSE"
    cat "photivo/COPYING" >> "build-$pkgver/LICENSE"
    install -Dm 644 "build-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}