Advertisement
Guest User

Untitled

a guest
Jun 20th, 2017
534
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. SUMMARY = "Recipe to build the nano editor"
  2.  
  3. PN = "nano"
  4. PV = "2.2.6"
  5.  
  6. SITE = "http://www.nano-editor.org/dist"
  7. PV_MAJOR = "${@bb.data.getVar('PV',d,1).split('.')[0]}"
  8. PV_MINOR = "${@bb.data.getVar('PV',d,1).split('.')[1]}"
  9. SRC_URI = "${SITE}/v${PV_MAJOR}.${PV_MINOR}/${PN}-${PV}.tar.gz"
  10. SRC_URI[md5sum] = "03233ae480689a008eb98feb1b599807"
  11. SRC_URI[sha256sum] = "be68e133b5e81df41873d32c517b3e5950770c00fc5f4dd23810cd635abce67a"
  12.  
  13. python do_fetch() {
  14. bb.plain("Downloading source tarball from ${SRC_URI} ...")
  15. src_uri = (d.getVar('SRC_URI', True) or "").split()
  16. bb.plain("debug")
  17. if len(src_uri) == 0:
  18. bb.fatal("Empty URI")
  19. try:
  20. fetcher = bb.fetch2.Fetch(src_uri, d)
  21. fetcher.download()
  22. except bb.fetch2.BBFetchException:
  23. bb.fatal("Could not fetch source tarball.")
  24. bb.plain("Download successful.")
  25. }
  26.  
  27. addtask fetch before do_build
  28.  
  29. python do_unpack() {
  30. bb.plain("Unpacking source tarball ...")
  31. os.system("tar x -C ${WORKDIR} -f ${DL_DIR}/${P}.tar.gz")
  32. bb.plain("Unpacked source tarball.")
  33. }
  34.  
  35. addtask unpack before do_build after do_fetch
  36.  
  37. python do_configure() {
  38. bb.plain("Configuring source package ...")
  39. os.system("cd ${WORKDIR}/${P} && ./configure")
  40. bb.plain("Configured source package.")
  41. }
  42.  
  43. addtask configure before do_build after do_unpack
  44.  
  45. python do_compile() {
  46. bb.plain("Compiling package...")
  47. os.system("cd ${WORKDIR}/${P} && make")
  48. bb.plain("Compiled package.")
  49. }
  50.  
  51. addtask compile before do_build after do_configure
  52.  
  53. do_clean[nostamp] = "1"
  54. do_clean() {
  55. rm -rf ${WORKDIR}/${P}
  56. rm -f ${TMPDIR}/stamps/*
  57. }
  58.  
  59. addtask clean
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement