1 PKG_DISTRIBUTECOMMAND[func] = "1"
2 python do_distribute_packages () {
3 cmd = bb.data.getVar('PKG_DISTRIBUTECOMMAND', d, 1)
5 raise bb.build.FuncFailed("Unable to distribute packages, PKG_DISTRIBUTECOMMAND not defined")
6 bb.build.exec_func('PKG_DISTRIBUTECOMMAND', d)
9 addtask distribute_packages before do_build after do_fetch
11 PKG_DIST_LOCAL ?= "symlink"
12 PKG_DISTRIBUTEDIR ?= "${DEPLOY_DIR}/packages"
14 PKG_DISTRIBUTECOMMAND () {
17 mkdir -p ${PKG_DISTRIBUTEDIR}
18 case "${PKG_DIST_LOCAL}" in
20 # use this weird tar command to copy because we want to
21 # exclude the BitKeeper directories
22 test -e ${PKG_DISTRIBUTEDIR}/${d} || mkdir ${PKG_DISTRIBUTEDIR}/${d};
23 (cd ${p}; tar -c --exclude SCCS -f - . ) | tar -C ${PKG_DISTRIBUTEDIR}/${d} -xpf -
26 ln -sf $p ${PKG_DISTRIBUTEDIR}/