# Maintainer: Aurélien Desbrières <aurelien@hackers.camp>

pkgname=mkinitcpio-paralogo
pkgver=0.0.2
pkgrel=1
pkgdesc="Add colored Parabola Linux ASCII art logo to early boot process"
arch=('any')
url=https://git.parabola.nu/mkinitcpio-paralogo.git/
license=('GPL')

depends=('mkinitcpio')
makedepends=('git')
backup=('etc/paralogo.conf')
install=mkinitcpio-paralogo.install
source=(git+https://git.parabola.nu/mkinitcpio-paralogo.git#tag=${pkgver})

sha256sums=('SKIP')


package()
{
  cd "${srcdir}"/mkinitcpio-paralogo/

  # install hook for plain old script based initramfs
  install -m0755 -d                       "${pkgdir}"/usr/lib/initcpio/hooks/
  install -m0755 hook/paralogo            "${pkgdir}"/usr/lib/initcpio/hooks/

  # install config
  install -m0755 -d                       "${pkgdir}"/etc/
  install -m0644 etc/paralogo.conf        "${pkgdir}"/etc/

  # install logos
  install -m0755 -d                       "${pkgdir}"/usr/share/paralogo/
  install -m0644 share/paralogo           "${pkgdir}"/usr/share/paralogo/
  install -m0644 share/paralogo2          "${pkgdir}"/usr/share/paralogo/
  install -m0644 share/paralogo3          "${pkgdir}"/usr/share/paralogo/
  install -m0644 share/paralogo4          "${pkgdir}"/usr/share/paralogo/
  install -m0644 share/paralogo5          "${pkgdir}"/usr/share/paralogo/

  # install README
  install -m0755 -d                       "${pkgdir}"/usr/share/doc/paralogo/
  install -m0644 README.md                "${pkgdir}"/usr/share/doc/paralogo/
}
