grep_3.12.bb 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. SUMMARY = "GNU grep utility"
  2. HOMEPAGE = "http://savannah.gnu.org/projects/grep/"
  3. DESCRIPTION = "Grep searches one or more input files for lines containing a match to a specified pattern. By default, grep prints the matching lines."
  4. BUGTRACKER = "http://savannah.gnu.org/bugs/?group=grep"
  5. SECTION = "console/utils"
  6. LICENSE = "GPL-3.0-only"
  7. LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464"
  8. SRC_URI = "${GNU_MIRROR}/grep/grep-${PV}.tar.xz"
  9. SRC_URI[sha256sum] = "2649b27c0e90e632eadcd757be06c6e9a4f48d941de51e7c0f83ff76408a07b9"
  10. inherit autotools gettext texinfo pkgconfig
  11. do_configure:prepend () {
  12. sed -i -e '1s,#!@SHELL@,#!/bin/sh,' ${S}/src/egrep.sh
  13. rm -f ${S}/m4/init.m4
  14. }
  15. do_install () {
  16. autotools_do_install
  17. if [ "${base_bindir}" != "${bindir}" ]; then
  18. install -d ${D}${base_bindir}
  19. mv ${D}${bindir}/grep ${D}${base_bindir}/grep
  20. mv ${D}${bindir}/egrep ${D}${base_bindir}/egrep
  21. mv ${D}${bindir}/fgrep ${D}${base_bindir}/fgrep
  22. rmdir ${D}${bindir}/
  23. fi
  24. }
  25. inherit update-alternatives
  26. PACKAGECONFIG ??= "pcre"
  27. PACKAGECONFIG[pcre] = "--enable-perl-regexp,--disable-perl-regexp,libpcre2"
  28. ALTERNATIVE_PRIORITY = "100"
  29. ALTERNATIVE:${PN} = "grep egrep fgrep"
  30. ALTERNATIVE_LINK_NAME[grep] = "${base_bindir}/grep"
  31. ALTERNATIVE_LINK_NAME[egrep] = "${base_bindir}/egrep"
  32. ALTERNATIVE_LINK_NAME[fgrep] = "${base_bindir}/fgrep"
  33. BBCLASSEXTEND = "nativesdk"