diff options
Diffstat (limited to 'packages/meta/meta-sdk.bb')
-rw-r--r-- | packages/meta/meta-sdk.bb | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/packages/meta/meta-sdk.bb b/packages/meta/meta-sdk.bb index 6640815217..cc163448ea 100644 --- a/packages/meta/meta-sdk.bb +++ b/packages/meta/meta-sdk.bb @@ -1,9 +1,9 @@ DESCRIPTION = "Meta package for bare SDK package" LICENSE = "MIT" DEPENDS = "ipkg-native ipkg-utils-native fakeroot-native sed-native" -PR = "r13" +PR = "r14" -inherit sdk meta +inherit rootfs_ipk sdk meta SDK_DIR = "${WORKDIR}/sdk" SDK_OUTPUT = "${SDK_DIR}/image" @@ -23,25 +23,31 @@ TARGET_INSTALL = "\ RDEPENDS = "${TARGET_INSTALL} ${HOST_INSTALL}" +sdk_do_indexes () { + set -ex + rootfs_ipk_do_indexes + sdk_ipk_do_indexes + set +ex +} + do_populate_sdk() { - touch ${DEPLOY_DIR_IPK}/Packages - ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK} + sdk_do_indexes + echo "Creating host.conf..." rm -rf ${SDK_OUTPUT} mkdir -p ${SDK_OUTPUT} - cat <<EOF >${SDK_DIR}/ipkg-host.conf -src oe file:${DEPLOY_DIR_IPK} -EOF - cat <<EOF >${SDK_DIR}/ipkg-target.conf -src oe file:${DEPLOY_DIR_IPK} -EOF - ipkgarchs="${PACKAGE_ARCHS}" priority=1 for arch in $ipkgarchs; do echo "arch $arch $priority" >> ${SDK_DIR}/ipkg-target.conf - echo "arch ${BUILD_ARCH}-$arch-sdk $priority" >> ${SDK_DIR}/ipkg-host.conf + echo "arch ${BUILD_ARCH}-$arch-sdk $priority" >> ${SDK_DIR}/ipkg-host.conf priority=$(expr $priority + 5) + if [ -e ${DEPLOY_DIR_IPK}/$arch/Packages ] ; then + echo "src oe-$arch file:${DEPLOY_DIR_IPK}/$arch" >> ${SDK_DIR}/ipkg-target.conf + fi + if [ -e ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages ] ; then + echo "src oe-$arch-sdk file:${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk" >> ${SDK_DIR}/ipkg-host.conf + fi done rm -r ${SDK_OUTPUT} @@ -70,19 +76,19 @@ EOF echo 'GROUP ( libpthread.so.0 libpthread_nonshared.a )' > ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libpthread.so echo 'GROUP ( libc.so.6 libc_nonshared.a )' > ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libc.so # remove unwanted housekeeping files - mv ${SDK_OUTPUT}${libdir}/../${TARGET_ARCH}-${TARGET_OS}/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status + mv ${SDK_OUTPUT}${libdir}/../${TARGET_SYS}/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status rm -rf ${SDK_OUTPUT}${libdir}/ipkg # remove unwanted executables rm -rf ${SDK_OUTPUT}/${prefix}/sbin ${SDK_OUTPUT}/${prefix}/etc # remove broken .la files - rm ${SDK_OUTPUT}/${prefix}/${TARGET_ARCH}-${TARGET_OS}/lib/*.la + rm ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/*.la # fix pkgconfig data files - cd ${SDK_OUTPUT}/${prefix}/${TARGET_ARCH}-${TARGET_OS}/lib/pkgconfig + cd ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/pkgconfig for f in *.pc ; do - sed -i 's%=/usr%=${prefix}/${TARGET_ARCH}-${TARGET_OS}%g' "$f" + sed -i 's%=/usr%=${prefix}/${TARGET_SYS}%g' "$f" done for f in *.pc ; do sed -i 's%${STAGING_DIR}%/usr/local/${TARGET_ARCH}/oe%g' "$f" |