summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8e9cdcbe450cdb540460a1b0be1511026fc39157 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Maintainer: GT610 <myddz1005@163.com>
# Contributer: Veli Tasalı (tasali) <me@velitasali.com>

pkgbase=gcr-git
pkgname=(
  gcr-git
  gcr-docs-git
)
pkgver=4.3.0+r5+g78e5f89
pkgrel=1
pkgdesc="A library for bits of crypto UI and parsing"
url="https://gitlab.gnome.org/GNOME/gcr"
arch=(x86_64)
license=(GPL2)
depends=(
  glib2
  libgcrypt
  libsecret
  openssh
  p11-kit
  systemd
)
makedepends=(
  gi-docgen
  git   
  gobject-introspection
  gtk4
  meson
  vala
  libxslt
  glib2-devel
)
_commit=78e5f89016635b4c4922e63f599b8ec81ea4b923
source=("git+https://gitlab.gnome.org/GNOME/gcr.git")
b2sums=('SKIP')

pkgver() {
  cd gcr
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd gcr
}

build() {
  arch-meson gcr build
  meson compile -C build
}

check() {
  # Secure memory tests fail
  dbus-run-session meson test -C build --print-errorlogs || :
}

package_gcr-git() {
  provides=(
    libgck-2.so
    libgcr-4.so
  )
  conflicts=(gcr-4)
  backup=(etc/security/limits.d/10-gcr.conf)
  install=gcr.install

  meson install -C build --destdir "$pkgdir"

  # gcr wants to lock some memory to prevent swapping out private keys
  # https://bugs.archlinux.org/task/32616
  # https://bugzilla.gnome.org/show_bug.cgi?id=688161
  install -Dm644 /dev/stdin "$pkgdir/etc/security/limits.d/10-gcr.conf" <<END
@users - memlock 1024
END

  mkdir -p doc/usr/share
  mv {"${pkgdir}",doc}/usr/share/doc
}

package_gcr-docs-git() {
  provides=(gcr-docs)
  conflicts=(gcr-4-docs)
  pkgdesc+=" (documentation)"
  depends=()

  mv doc/* "$pkgdir"
}

# vim:set sw=2 sts=-1 et: