opkg_0.4.3.bb 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. SUMMARY = "Open Package Manager"
  2. SUMMARY_libopkg = "Open Package Manager library"
  3. SECTION = "base"
  4. HOMEPAGE = "http://code.google.com/p/opkg/"
  5. BUGTRACKER = "http://code.google.com/p/opkg/issues/list"
  6. LICENSE = "GPLv2+"
  7. LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
  8. file://src/opkg.c;beginline=4;endline=18;md5=d6200b0f2b41dee278aa5fad333eecae"
  9. DEPENDS = "libarchive"
  10. PE = "1"
  11. SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
  12. file://opkg.conf \
  13. file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
  14. file://run-ptest \
  15. "
  16. SRC_URI[md5sum] = "86ec5eee9362aca0990994a402e077e9"
  17. SRC_URI[sha256sum] = "dda452854bc0cd1334f7ba18a66003d1c12a98600c894111b56919b1ea434718"
  18. # This needs to be before ptest inherit, otherwise all ptest files end packaged
  19. # in libopkg package if OPKGLIBDIR == libdir, because default
  20. # PTEST_PATH ?= "${libdir}/${BPN}/ptest"
  21. PACKAGES =+ "libopkg"
  22. inherit autotools pkgconfig ptest
  23. target_localstatedir := "${localstatedir}"
  24. OPKGLIBDIR ??= "${target_localstatedir}/lib"
  25. PACKAGECONFIG ??= "libsolv"
  26. PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\
  27. gnupg gpgme libgpg-error,\
  28. ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\
  29. "
  30. PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
  31. PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
  32. PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl"
  33. PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
  34. PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
  35. EXTRA_OECONF += " --disable-pathfinder"
  36. EXTRA_OECONF_class-native = "--localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
  37. do_install_append () {
  38. install -d ${D}${sysconfdir}/opkg
  39. install -m 0644 ${WORKDIR}/opkg.conf ${D}${sysconfdir}/opkg/opkg.conf
  40. echo "option lists_dir ${OPKGLIBDIR}/opkg/lists" >>${D}${sysconfdir}/opkg/opkg.conf
  41. # We need to create the lock directory
  42. install -d ${D}${OPKGLIBDIR}/opkg
  43. }
  44. do_install_ptest () {
  45. sed -i -e '/@echo $^/d' ${D}${PTEST_PATH}/tests/Makefile
  46. sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
  47. }
  48. RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_update-alternatives} opkg-arch-config libarchive"
  49. RDEPENDS_${PN}_class-native = ""
  50. RDEPENDS_${PN}_class-nativesdk = ""
  51. RDEPENDS_${PN}-ptest += "make binutils python3-core python3-compression"
  52. RREPLACES_${PN} = "opkg-nogpg opkg-collateral"
  53. RCONFLICTS_${PN} = "opkg-collateral"
  54. RPROVIDES_${PN} = "opkg-collateral"
  55. FILES_libopkg = "${libdir}/*.so.* ${OPKGLIBDIR}/opkg/"
  56. BBCLASSEXTEND = "native nativesdk"
  57. CONFFILES_${PN} = "${sysconfdir}/opkg/opkg.conf"