summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ba7f8f309c6a84e5ba44ff4d590bd0b6b5061893 (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
# Maintainer: Darryl Pogue <darryl@dpogue.ca>

pkgbase=gplugin
_pkgname=gplugin
pkgname=(gplugin gplugin-docs)
pkgver=0.39.1
pkgrel=3
arch=('i868' 'x86_64')
license=("LGPL2")
url="https://keep.imfreedom.org/gplugin/gplugin"
pkgdesc="A GObject based library that implements a reusable plugin system"
depends=("gtk3" "gtk4" "glib-perl" "lua" "python")
makedepends=("meson"
             "mercurial"
             "gcc"
             "gobject-introspection"
             "pkg-config"
             "help2man"
             "gettext"
             "gi-docgen"
             "lua-lgi"
             "perl-glib-object-introspection"
             "python-gobject"
             "vala")
options=('strip' '!debug' 'staticlibs')
source=("$pkgname::hg+https://keep.imfreedom.org/$_pkgname/$_pkgname/#tag=v$pkgver")
sha256sums=('SKIP')

_pick() {
  local p="$1" f d; shift
  for f; do
    d="$srcdir/$p/${f#$pkgdir/}"
    mkdir -p "$(dirname "$d")"
    mv -v "$f" "$d"
    rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
  done
}

build() {
  arch-meson gplugin build
  ninja -C build
}

package_gplugin() {
  depends=("gtk3" "gtk4" "glib-perl" "lua" "python")
  DESTDIR="$pkgdir" ninja -C build install

  cd "$pkgdir"
  _pick docs usr/share/doc/gplugin*
}


package_gplugin-docs() {
  pkgdesc+=" (documentation)"
  depends=()
  mv docs/* "$pkgdir"
}