summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3b7eec0de868f302b051296bee60f49ee5c99913 (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
# Maintainer: Amin Vakil <info AT aminvakil DOT com>
# Contributor: Jack Rubacha  <rubacha.jack03@gmail.com>
# Contributor: Paul Nicholson <brenix@gmail.com>
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Chris <seitz.christoph@gmail.com>
# Contributor: m0ikz <ndelatorre@moikz.com.ar>
# Contributor: atweiden <archbaum@gmail.com>

pkgname=ansible-core-git
pkgver=r51467.a30c55f68a
pkgrel=1
pkgdesc='Radically simple IT automation platform'
arch=('any')
url='https://github.com/ansible/ansible'
license=('GPL3')
depends=('python' 'python-pyyaml' 'python-paramiko' 'python-jinja' 'python-resolvelib' 'python-typing-extensions')
provides=('ansible-core' 'python-ansible')
replaces=('ansible-core' 'python-ansible')
conflicts=('ansible-core' 'python-ansible')
optdepends=('sshpass: for ssh connections with password'
            'python-passlib: crypt values for vars_prompt'
            'python-netaddr: for the ipaddr filter'
            'python-systemd: log to journal'
            'python-pywinrm: connect to Windows machines'
            'python-dnspython: for dig lookup'
            'python-jmespath: json_query support'
            'python-pip: for module to manage Python libarary dependencies'
            'python-setuptools: for module to manage Python libarary dependencies')
makedepends=('python-build' 'python-docutils' 'python-installer' 'python-setuptools' 'python-straight.plugin' 'python-wheel' 'git')
backup=('etc/ansible/ansible.cfg')
source=($pkgname::git+https://github.com/ansible/ansible.git)
sha512sums=('SKIP')

prepare() {
  cd "$pkgname"
  # remove the resolvelib upper boundary (at least for < 0.9.0): https://github.com/ansible/ansible/pull/79399
  sed -e 's/resolvelib.*/resolvelib/' -i requirements.txt
}

pkgver() {
  cd "$pkgname"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${srcdir}"/${pkgname}
  python -m build --wheel --no-isolation

  make docs
}

package() {
  cd ${pkgname}
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 COPYING -t "${pkgdir}"/usr/share/doc/${pkgname}/
  install -Dm644 examples/ansible.cfg -t "${pkgdir}"/etc/ansible/
  install -Dm644 examples/{ansible.cfg,hosts} -t "${pkgdir}"/usr/share/ansible/doc/examples/
  install -Dm644 docs/man/man1/*.1 -t "${pkgdir}"/usr/share/man/man1/
}