# Maintainer: Parabola Hackers <dev@lists.parabola.nu>


pkgname=yggdrasil-openrc
pkgver=0.4.7
pkgrel=1
pkgdesc="OpenRC init script for 'yggdrasil' service"
arch=(any)
license=(custom:yggdrasil-LGPL3)

depends=(yggdrasil)
source=(https://raw.githubusercontent.com/yggdrasil-network/yggdrasil-go/v${pkgver}/contrib/openrc/yggdrasil)

sha256sums=('3f83382204f1c0cc807a0873c3d4f024445965a552da251ca48d87744dec07cd')


package()
{
  install -d                           "${pkgdir}"/etc/init.d
  install -Dm755 "${srcdir}"/yggdrasil "${pkgdir}"/etc/init.d/${pkgname}

  install -d                           "${pkgdir}"/usr/share/licenses/${pkgname}
  ln -s ../yggdrasil/LICENSE           "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}
