# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the CC0 1.0 License.
# Maintainer: Parabola Hackers <dev@lists.parabola.nu>

pkgname=debuerreotype
pkgver=0.15
pkgrel=1
pkgdesc="Create reproducible rootfs with debootstrap"
arch=('any')
url='https://github.com/debuerreotype/debuerreotype'
license=('expat')
depends=('debootstrap'
         'util-linux') # for unshare
source=("https://github.com/debuerreotype/debuerreotype/archive/refs/tags/0.15.tar.gz")
sha512sums=('4708df711bd091af8865588c6578d68d4a1e2fae07fc1515a1b2951e059c3cd8c40417c1c66cddd67c1298d3f2ce691c1d166cc875294a919424ff20e1a7e64f')

package(){
	cd "${pkgname}-${pkgver}"

	install -d "${pkgdir}/usr/bin/"
	for script in scripts/* scripts/.*.sh scripts/.*clude* ; do
		echo $script
		install -m755 ${script} -t "${pkgdir}/usr/bin/"
	done

	install           -d "${pkgdir}/usr/share/doc/${pkgname}/"
	install README.md -t "${pkgdir}/usr/share/doc/${pkgname}/"

	install           -d "${pkgdir}/usr/share/licenses/${pkgname}/"
	install LICENSE   -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
