# $Id: Portfile 88422 2012-01-02 01:18:04Z ryandesign@macports.org $

PortSystem 1.0

name			rpm2cpio
version			5.2.1
set branch		[join [lrange [split ${version} .] 0 1] .]
platforms		darwin freebsd linux
categories		archivers
maintainers		mac.com:n3npq afb
description		Extract cpio archive from rpm package
long_description	rpm2cpio converts the .rpm file specified as a \
			single argument to a cpio archive on standard out.
conflicts		rpm rpm45 rpm50 rpm51 rpm52

homepage		http://rpm5.org
master_sites		${homepage}/files/rpm/rpm-${branch}/
distname		rpm-${version}
dist_subdir		rpm52
checksums		md5 71f825ede4a2ddc191132ae017c9a6e4 \
			sha1 77f2d1b24301ed3743d8bbc57e57710c0eff7bc8 \
			rmd160 a66017c6b8a7e0a1de6be945e3823a7ab2051c75

depends_run		bin:gunzip:gzip \
			bin:bunzip2:bzip2 \
			bin:unlzma:xz \
			bin:unxz:xz

use_configure		no
supported_archs		noarch

build {}

destroot {
	xinstall ${worksrcpath}/scripts/rpm2cpio \
	         ${destroot}${prefix}/bin/
}


livecheck.type	regex
# get the last modified tarball
livecheck.url	${master_sites}
livecheck.regex	rpm-(\[0-9\\.\]+)${extract.suffix}
