summaryrefslogtreecommitdiff
path: root/classes/rpm_core.bbclass
blob: f28abbb1c3a5b774e81348205bd1d7847205b767 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
RPMBUILDPATH="${WORKDIR}/rpm"

RPMOPTS="--rcfile=${WORKDIR}/rpmrc"
RPMOPTS="--rcfile=${WORKDIR}/rpmrc --target ${TARGET_SYS}"
RPM="rpm ${RPMOPTS}"
RPMBUILD="rpmbuild --buildroot ${D} --short-circuit ${RPMOPTS}"

rpm_core_do_preprpm() {
	mkdir -p ${RPMBUILDPATH}/{SPECS,RPMS/{i386,i586,i686,noarch,ppc,mips,mipsel,arm},SRPMS,SOURCES,BUILD}
	echo 'macrofiles:/usr/lib/rpm/macros:${WORKDIR}/macros' > ${WORKDIR}/rpmrc
	echo '%_topdir ${RPMBUILDPATH}' > ${WORKDIR}/macros
	echo '%_repackage_dir ${WORKDIR}' >> ${WORKDIR}/macros
}

EXPORT_FUNCTIONS do_preprpm
addtask preprpm before do_fetch