# Compiling time: 0.04 SBU
# Maintainer: crazy <cray@frugalware.org>

## use git code
USE_DEVEL=${USE_DEVEL:-"y"}

pkgname=ion
if Fuse $USE_DEVEL; then
	pkgver=1.0.0_alpha
else
	pkgver=1.0.0
fi
pkgrel=3
pkgdesc="Ion is a modern system shell that features a simple, yet powerful, syntax"
url="https://github.com/redox-os/ion"
depends=('glibc' 'libgcc')
makedepends=('cargo' 'rust')
groups=('apps-extra')
archs=('x86_64')
_F_github_author="redox-os"
if Fuse $USE_DEVEL; then
	makedepends+=('git')
	_F_github_devel="yes"
	unset source
	unset sha1sums
else
	_F_github_tag="yes"
	

fi
Finclude github
options+=('scriptlet' 'force')

build() {

	if Fuse $USE_DEVEL; then
		Funpack_scm
	fi

	Fcd
	Fexec cargo build --release || Fdie
	Fexec cargo install --root "$Fdestdir"/usr || Fdie

	## wtf is wrong with rust peoples ?
	## do NOT install hidden files in /usr or rootfs
	Frm usr/.crates.toml
}


# optimization OK
