# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=rpm2cpio
pkgver=1.4
pkgrel=3
pkgdesc="Convert .rpm files to cpio format"
url="https://www.freshports.org/archivers/rpm2cpio/"
arch="noarch"
license="BSD-2-Clause"
depends="libarchive-tools"
source="rpm2cpio.sh
	https://vault.centos.org/7.9.2009/os/x86_64/Packages/centos-bookmarks-7-1.el7.noarch.rpm
	"
builddir="$srcdir"

check() {
	sh rpm2cpio.sh "$srcdir"/centos-bookmarks-7-1.el7.noarch.rpm > bookmarks.cpio || exit 1
	cpio -it < bookmarks.cpio || exit 1
}

package() {
	install -Dm755 rpm2cpio.sh "$pkgdir"/usr/bin/rpm2cpio
}

sha512sums="
8d8394ad0673d1f30738f8d7c6c90dc1584a79dd3b91e97c17324741fa16ab65990983eb68398d7011bcb74ddb795e442520637cf436030c5aeaf5f148a9a1ba  rpm2cpio.sh
afcaf6edcf6f87892497d6eb51cc5f5c066ac678a9dd63307ed1d424302a266c64e4b6fc8b7c66a83f2a8d5e420d6751a224b781c5213a9742228b9309af34d2  centos-bookmarks-7-1.el7.noarch.rpm
"
