# Maintainer: LIU Hao <lh_mouse@126.com>

_realname=trash
pkgname=${_realname}
pkgver=1.1
pkgrel=1
pkgdesc="Moves files and directories into the Recycle Bin of the current user"
arch=('i686' 'x86_64')
license=('spdx:BSD-2-Clause')
url='https://github.com/lhmouse/msys2-trash'
msys2_repository_url='https://github.com/lhmouse/msys2-trash'
makedepends=('git' 'gcc' 'msys2-w32api-headers' 'msys2-w32api-runtime')
source=("git+https://github.com/lhmouse/msys2-trash.git#tag=v${pkgver}")
sha256sums=('bcac3dd94d67fa1780e55972c0783df992d67eeb66174764873bcef6e7ef0aa2')

build() {
  cd "${srcdir}/msys2-trash"
  ${CC:-gcc} ${CPPFLAGS} ${CFLAGS} trash.c ${LDFLAGS} -o trash.exe
}

package() {
  cd "${srcdir}/msys2-trash"
  install -Dm755 trash.exe "${pkgdir}/usr/bin/trash.exe"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${_realname}/LICENSE"
}
