# $Id: rpm2targz-9.0-r9.smage2 3335 2009-10-19 23:11:28Z niro $ PNAME="rpm2targz" PVER="9.0" PBUILD="r10" PCATEGORIE="app-arch" STATE="unstable" DESCRIPTION="rpm2targz converts .rpm archives to .tar.gz archives." HOMEPAGE="http://www.slackware.com/config/packages.php" DEPEND=">= virtual/glibc >= app-arch/cpio-2.11 >= sys-apps/file-4 >= sys-apps/util-linux-2.18 >= sys-apps/which-2.20" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools SRC_URI=( mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-${PVER}-gentoo.patch mirror://${PNAME}/${PNAME}-${PVER}-bzip2.patch mirror://${PNAME}/${PNAME}-${PVER}-bzip2_rpm2targz.patch ) src_prepare() { install -d ${SRCDIR} || die munpack ${SRCFILE} ${SRCDIR} || die cd ${SRCDIR} # makes rpm2targz extract in current dir (gentoo) mpatch ${PNAME}-${PVER}-gentoo.patch || die # adds bzip2 detection (gentoo) mpatch ${PNAME}-${PVER}-bzip2.patch || die # adds bzip2 decompression to rpm2targz (gentoo) mpatch ${PNAME}-${PVER}-bzip2_rpm2targz.patch || die } src_compile() { cd ${SRCDIR} gcc ${CFLAGS} -o rpmoffset rpmoffset.c || die } src_install() { cd ${SRCDIR} # prepare some directories minstalldir /usr/bin || die # install needed files only minstallexec rpmoffset || die minstallexec rpm2targz || die minstalldocs rpm2targz.README || die }