summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2d5b676bbd54c7d42cfffde45f8253508b252188 (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: Brian Bidulock <bidulock@openss7.org>
# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>

_pkgname=gcr
pkgname=gcr-nogtk
pkgver=3.41.0
pkgrel=1
pkgdesc="A library for bits of crypto UI and parsing (without GTK)"
url="https://gitlab.gnome.org/GNOME/gcr"
arch=(x86_64 i686)
license=(GPL2)
depends=(dconf libgcrypt p11-kit openssh libsecret)
makedepends=(gobject-introspection vala libxslt git gtk-doc meson)
provides=(libgck-1.so libgcr-{base,ui}-3.so ${_pkgname}=${pkgver}-${pkgrel})
_commit=f5026a8c9c7d78372b3efeca3412b0e40011ce11  # tags/3.41.0^0
backup=(etc/security/limits.d/10-gcr.conf)
install=gcr.install
source=("git+https://gitlab.gnome.org/GNOME/gcr.git#commit=$_commit")
sha256sums=('SKIP')
conflicts=(${_pkgname})

pkgver() {
  cd $_pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $_pkgname
}

build() {
  arch-meson -D gtk=false -D gtk_doc=false $_pkgname build
  meson compile -C build
}

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

package() {
  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
}

# vim:set ts=2 sw=2 et: