summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f90fc91910af276fbb055d441d1290a793479915 (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
# Maintainer: Trougnouf (Benoit Brummer) <trougnouf at gmail dot com>
pkgname='darktable-plugin-dtmediawiki-git'
_name='dtMediaWiki'
pkgver=r59.4045142
pkgrel=2
pkgdesc='MediaWiki export plugin for darktable '
url="https://github.com/trougnouf/${_name}"
depends=('darktable' 'lua-luajson' 'lua-sec' 'lua-multipart-post')
makedepends=()
license=('GPL3')
arch=('x86_64')
source=(git+"${url}.git")
sha256sums=('SKIP')

# to enable:
# $ echo 'require "contrib/dtMediaWiki/dtMediaWiki"' >> ~/.config/darktable/luarc

pkgver() {
  cd ${_name}
  ( set -o pipefail
    git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
  )
}

package() {
	mkdir -p "${pkgdir}/usr/share/darktable/lua/contrib"
	cp -r "${srcdir}/${_name}" "${pkgdir}/usr/share/darktable/lua/contrib"
	mkdir -p "${pkgdir}/usr/share/ansel/lua/contrib"
	ln -s "/usr/share/darktable/lua/contrib/${_name}" "${pkgdir}/usr/share/ansel/lua/contrib/"
}