summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 575476ae81eb5586c0ed1862c83409efd4b45baf (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
89
90
91
92
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>

# shellcheck disable=SC2034
_pkg="libsoup"
_pkgbase="${_pkg}3"
pkgbase="${_pkgbase}-git"
pkgname=("${pkgbase}" "${_pkgbase}-docs-git")
pkgver=3.2.0+r1+g3be74a58
pkgrel=1
pkgdesc="HTTP client/server library for GNOME"
url="https://wiki.gnome.org/Projects/${_pkg}"
arch=(x86_64)
license=(LGPL)
depends=(
  brotli
  glib-networking 
  glib2 
  krb5
  libnghttp2
  libpsl
  libsysprof-capture
  sqlite
)
makedepends=(
  gi-docgen
  git
  gobject-introspection
  meson
  python-quart
  samba
  vala
)
checkdepends=(
  apache
  php-apache
)
options=(debug)
source=("git+https://gitlab.gnome.org/GNOME/${_pkg}.git")
sha256sums=('SKIP')

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

prepare() {
  cd "${_pkg}" || exit
}

build() {
  local meson_options=(
    -D autobahn=disabled
  )
  arch-meson "${_pkg}" build "${meson_options[@]}"
  meson compile -C build
}

check() {
  # Python's output buffering messes with the tests reading stdout lines from
  # http2-server.py through a pipe
  PYTHONUNBUFFERED=1 meson test -C build --print-errorlogs
}

package_libsoup3-git() {
  depends+=(
    libbrotlidec.so
    libgssapi_krb5.so
    libg{lib,object,io}-2.0.so
    libpsl.so
  )
  optdepends=('samba: Windows Domain SSO')
  provides+=("${_pkg}-3.0.so"
             "${_pkgbase}")
  conflicts+=("${_pkgbase}")

  # shellcheck disable=SC2154
  meson install -C build --destdir "${pkgdir}"

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

package_libsoup3-docs-git() {
  pkgdesc+=" (documentation)"
  depends=()
  conflicts+=("${_pkgbase}-docs-git")

  mv doc/* "${pkgdir}"
}

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