# Maintainer (AUR):  Tatsuyuki Ishi <ishitatsuyuki at gmail>
# Contributor (AUR): Ben Darwin <bcdarwin at gmail>
# Contributor (AUR): speps <speps at aur dot archlinux dot org>
# Contributor (AUR): Anton Bazhenov <anton.bazhenov at gmail>
# Contributor (AUR): Lone_Wolf <lonewolf@xs4all.nl>

# parabola changes and rationale:
#  - added missing makedepends: ocamlbuild ocaml-findlib

pkgname=zeroinstall-injector
_pkgname=0install
pkgver=2.11
pkgrel=1
pkgdesc="A decentralised loosely-coupled secure installation system"
arch=('i686' 'x86_64' 'armv7h')
url="http://0install.net"
license=('GPL2' 'LGPL')
depends=('ocaml-curl' 'ocaml-extlib' 'ocaml-lwt'
         'ocaml-ounit' 'ocaml-xmlm' 'ocaml-yojson')
makedepends=('ocamlbuild' 'ocaml-findlib')
optdepends=('ocaml-lablgtk: provides GUI features'
            'ocaml-obus: for DBUS, packagekit, and NetworkManager integration'
            'xdg-utils: desktop integration'
            'packagekit: packagekit integration')
install="$pkgname.install"
source=("http://downloads.sourceforge.net/zero-install/$_pkgname/$pkgver/$_pkgname-$pkgver.tar.bz2"
        "http://downloads.sourceforge.net/zero-install/$_pkgname/$pkgver/$_pkgname-$pkgver.tar.bz2.sig")
sha256sums=('194b675c48556a3b9aee6b4a2478a521fafa66c0d871ef64349dc3baede28006'
            'SKIP')
validpgpkeys=('5DD58D70899C454A966D6A5175133C8F94F6E0CC')

build() {
  cd $_pkgname-$pkgver
  make
}

package() {
  cd $_pkgname-$pkgver
  make DESTDIR="$pkgdir/" install_system
}
