# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>

pkgname=shutdown
pkgver=2.0.0
pkgrel=1
pkgdesc="Shutdown, reboot, hibernate or suspend the machine"
arch=('i686' 'x86_64')
url="https://cygwin.com/git/?p=cygwin-apps/shutdown.git"
makedepends=(
  'git'
  'gcc'
  'make'
)
msys2_repository_url="https://cygwin.com/git/?p=cygwin-apps/shutdown.git"
msys2_references=(
  'cygwin: shutdown'
)
license=('spdx:GPL-3.0-or-later')
_tag="v2.0.0-2"
source=("git+https://cygwin.com/git/cygwin-apps/shutdown.git#tag=$_tag")
sha256sums=('c2259165b66f77ab633b464693aeadfbd6849df717136ba213ff01d286125503')

build () {
  mkdir "build-${CHOST}" && cd "build-${CHOST}"

  make -f "../${pkgname}"/Makefile SRCDIR="../${pkgname}"
}

package () {
  cd "build-${CHOST}"

  make install -f ../"${pkgname}"/Makefile \
       SRCDIR=../"${pkgname}" \
       DESTDIR="${pkgdir}"
}
