diff options
author | TBK <tbk@jjtc.eu> | 2019-04-10 15:04:11 +0200 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-04-14 21:13:47 +0000 |
commit | 9fe3d51ca4341836d86347d7cb288af4650afad8 (patch) | |
tree | bc8d68e53234f67fe55344a6032309cdfdfa9f5b /testing | |
parent | 2a6d0b1775b65fabeec4e02e8714b31e857a6179 (diff) | |
download | aports-9fe3d51ca4341836d86347d7cb288af4650afad8.tar.bz2 aports-9fe3d51ca4341836d86347d7cb288af4650afad8.tar.xz |
testing/rpm2cpio: new aport
Diffstat (limited to 'testing')
-rw-r--r-- | testing/rpm2cpio/APKBUILD | 26 | ||||
-rw-r--r-- | testing/rpm2cpio/rpm2cpio.sh | 17 |
2 files changed, 43 insertions, 0 deletions
diff --git a/testing/rpm2cpio/APKBUILD b/testing/rpm2cpio/APKBUILD new file mode 100644 index 0000000000..95f47c711d --- /dev/null +++ b/testing/rpm2cpio/APKBUILD @@ -0,0 +1,26 @@ +# Contributor: TBK <alpine@jjtc.eu> +# Maintainer: TBK <alpine@jjtc.eu> +pkgname=rpm2cpio +pkgver=1.4 +pkgrel=0 +pkgdesc="Convert .rpm files to cpio format" +url="https://www.freshports.org/archivers/rpm2cpio/" +arch="noarch" +license="BSD-2-Clause" +depends="libarchive-tools" +checkdepends="cpio curl" +source="rpm2cpio.sh" + +check() { + echo "Getting bookmarks.rpm:" + curl -#o bookmarks.rpm http://mirror.centos.org/centos/7/os/x86_64/Packages/centos-bookmarks-7-1.el7.noarch.rpm + echo "Testing cpio extraction:" + sh rpm2cpio.sh bookmarks.rpm > bookmarks.cpio || exit 1 + cpio -it < bookmarks.cpio || exit 1 +} + +package() { + install -Dm755 rpm2cpio.sh "$pkgdir"/usr/bin/rpm2cpio +} + +sha512sums="8d8394ad0673d1f30738f8d7c6c90dc1584a79dd3b91e97c17324741fa16ab65990983eb68398d7011bcb74ddb795e442520637cf436030c5aeaf5f148a9a1ba rpm2cpio.sh" diff --git a/testing/rpm2cpio/rpm2cpio.sh b/testing/rpm2cpio/rpm2cpio.sh new file mode 100644 index 0000000000..ff014bce28 --- /dev/null +++ b/testing/rpm2cpio/rpm2cpio.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +# NB! needs bsdtar/libarchive v2.8+ + +PATH=/bin:/usr/bin + +if [ $# -eq 0 -a ! -t 0 ]; then + f=/dev/stdin +elif [ $# -eq 1 ]; then + f=$1 +else + echo Usage: rpm2cpio [file.rpm] + echo dumps the contents to stdout as a GNU cpio archive + exit 0 +fi + +bsdtar cf - --format=newc @- < ${f}
\ No newline at end of file |