summaryrefslogtreecommitdiff
path: root/packaging/arch/PKGBUILD
blob: 3d6ba90c67adc46712d0ef2ddfbd9c8ef43fb3eb (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
#Maintainer: Michel Blanc <mblanc@erasme.org>
pkgname=ansible-git
pkgver=20130430
pkgrel=1
pkgdesc="A radically simple deployment, model-driven configuration management, and command execution framework"
arch=('any')
url="http://ansible.cc"
license=('GPL3')
depends=('python2' 'python2-paramiko' 'python2-jinja' 'python2-yaml')
makedepends=('git' 'asciidoc' 'fakeroot')
conflicts=('ansible')
source=("python-binary.diff")
md5sums=("ab81876d8d4c86c27d137e3d86c25a3a")

_gitroot="https://github.com/ansible/ansible"
_gitname="ansible"

build() {
  cd "$srcdir"
  msg "Connecting to GIT server...."

  if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin
    msg "The local files are updated."
  else
    git clone $_gitroot $_gitname
  fi

  msg "GIT checkout done or server timeout"


  cd "$srcdir/$_gitname"
  patch -p1 -i $srcdir/python-binary.diff
  make
}

package() {
  cd "$srcdir/$_gitname"

  mkdir -p ${pkgdir}/usr/share/ansible
  cp -r ./library/* ${pkgdir}/usr/share/ansible/
  cp -r ./examples ${pkgdir}/usr/share/ansible

  python2 setup.py install -O1 --root=${pkgdir}

  install -D docs/man/man1/ansible.1 ${pkgdir}/usr/share/man/man1/ansible.1
  install -D docs/man/man1/ansible-playbook.1 ${pkgdir}/usr/share/man/man1/ansible-playbook.1
  install -D docs/man/man1/ansible-pull.1 ${pkgdir}/usr/share/man/man1/ansible-pull.1
  install -D docs/man/man1/ansible-doc.1 ${pkgdir}/usr/share/man/man1/ansible-doc.1

  gzip -9 ${pkgdir}/usr/share/man/man1/ansible.1
  gzip -9 ${pkgdir}/usr/share/man/man1/ansible-playbook.1
  gzip -9 ${pkgdir}/usr/share/man/man1/ansible-pull.1
  gzip -9 ${pkgdir}/usr/share/man/man1/ansible-doc.1
}