Skip to content

Commit

Permalink
package: add ansible pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjorgef committed May 22, 2020
1 parent 0a010e3 commit abe2a8d
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions ansible/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Maintainer: Alexandre Ferreira <alex.jorge.m@gmail.com>

pkgname=ansible
pkgver=2.9.7
pkgrel=1
pkgdesc='Radically simple IT automation platform'
arch=('x86_64')
url='https://www.ansible.com'
license=('GPL3')
depends=('python3')
provides=('python-ansible')
optdepends=('sshpass: for ssh connections with password')
makedepends=('tar' 'gcc' 'python3' 'python3-pip' 'libffi' 'libffi-devel' 'libcrypt' 'libcrypt-devel' 'openssl' 'openssl-devel')
backup=('etc/ansible/ansible.cfg')
source=("https://releases.ansible.com/ansible/ansible-${pkgver}.tar.gz")
sha512sums=('ce029441bcafdc5b44c9fda69f183d4defea84ead5628164caf87306cb97efec68c11b2cce728e90f28290640c320549486a6b4e823710f638d1d2e7c35675a4')
noextract=("${pkgname}-${pkgver}.tar.gz")

prepare() {
[[ -d ${pkgname}-${pkgver} ]] && rm -rf ${pkgname}-${pkgver}
export MSYS=winsymlinks:lnk
tar zxf "${srcdir}/${pkgname}-${pkgver}.tar.gz"
}

build() {
cd "${srcdir}/${pkgname}-${pkgver}"
python setup.py build
}

package() {
cd ${pkgname}-${pkgver}
python setup.py install -O1 --root="${pkgdir}"
install -Dm644 COPYING "${pkgdir}"/usr/share/doc/ansible/COPYING

install -d "${pkgdir}"/usr/share/ansible/doc
cp -dpr --no-preserve=ownership ./examples "${pkgdir}"/usr/share/ansible/doc/
install -Dm644 examples/ansible.cfg "${pkgdir}"/etc/ansible/ansible.cfg

install -d "${pkgdir}"/usr/share/man/man1
cp -dpr --no-preserve=ownership docs/man/man1/*.1 "${pkgdir}"/usr/share/man/man1
}

0 comments on commit abe2a8d

Please sign in to comment.