### this file is sourced not run
PKGVER=2.0.10
PKGBUILD=1
PKGARCH=x86_64

# source: step
# install an external ruby gem

TARBALL=asciidoctor-${PKGVER}.gem
MD5SUM=1be613f34f6b3c03dc7d6d78ac209307
SRC_URL=https://rubygems.org/downloads/$TARBALL
BUNDLE=

SLACKREQ='ruby'
SLACKDESC="asciidoctor: asciidoctor $PKGVER (asciidoc converter)
asciidoctor:
asciidoctor: Asciidoctor is a fast, open source text processor and publishing toolchain for
asciidoctor: converting AsciiDoc content to HTML5, DocBook, PDF, and other formats.
asciidoctor: Asciidoctor is a drop-in replacement for its predecessor, AsciiDoc Python.
asciidoctor:
asciidoctor: This package does not include documentation files.
asciidoctor:
asciidoctor: https://asciidoctor.org/
asciidoctor: https://github.com/asciidoctor/asciidoctor
asciidoctor: https://rubygems.org/gems/asciidoctor
"
#PKG_NOMAKEPKG=yes

### default pkg_download
### prepare
pkg_prepare() {
	if pkg_check $SRC_DIR $TARBALL $MD5SUM; then
		cp $SRC_DIR/$TARBALL tmp/pkg
	else
		return 1
	fi
}
### default pkg_package
### build
pkg_build() {
	gem install --local /tmp/pkg/$TARBALL &&
	cd "/usr/lib64/ruby/gems/$(basename $(gem environment gempath))" &&
	# delete ~5MB of documents
	rm -r "doc/asciidoctor-$PKGVER" &&
	rm -r "cache/$TARBALL" &&
	pkg_build_slackdesc
}

# vim:ft=sh:

