#!/bin/bash
# shellcheck disable=SC2034
#Packager: Didier Spaier didieratslintdotfr

pkgname=btdu
pkgver=0.5.1
pkgrel=1slint
source=("${pkgname}-${pkgver}.tar.gz" "${pkgname}"-static-x86_64)
docs=("ARCHITECTURE.html" "CONCEPTS.html" "README.html" "COPYING")
url=https://github.com/CyberShadow/btdu
options=('nosrcpack')

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"btdu (sampling disk usage profiler for btrfs)"
)


build() {
	cd "$pkgname-$pkgver" || exit 1
	for i in ARCHITECTURE CONCEPTS README; do
		pandoc -f gfm -t html5 -o "${i}".html "${i}".md
	done
	mkdir -p "$PKG"/usr/sbin "$PKG"/usr/man/man1
	cp btdu.1 "$PKG"/usr/man/man1
	cp "$SRC"/"${pkgname}"-static-x86_64 "$PKG"/usr/sbin/btdu
	chmod 755 "$PKG"/usr/sbin/btdu
} 
