You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2010-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=sed
  9. PKG_VERSION:=4.8
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNU/sed
  13. PKG_HASH:=f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633
  14. PKG_MAINTAINER:=Russell Senior <russell@personaltelco.net>
  15. PKG_LICENSE:=GPL-3.0-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:gnu:sed
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/sed
  22. SECTION:=utils
  23. CATEGORY:=Utilities
  24. TITLE:=sed stream editor utility - full version
  25. DEPENDS:=+libpcre
  26. URL:=https://www.gnu.org/software/sed/
  27. endef
  28. define Package/sed/description
  29. sed (stream editor) is a non-interactive command-line text editor. sed is commonly
  30. used to filter text, i.e., it takes text input, performs some operation (or set of
  31. operations) on it, and outputs the modified text. sed is typically used for
  32. extracting part of a file using pattern matching or substituting multiple
  33. occurrences of a string within a file.
  34. endef
  35. define Package/sed/install
  36. $(INSTALL_DIR) $(1)/usr/bin
  37. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
  38. endef
  39. CONFIGURE_ARGS+= --disable-acl
  40. define Package/sed/postinst
  41. #!/bin/sh
  42. [ -L "$${IPKG_INSTROOT}/bin/sed" ] && rm -f "$${IPKG_INSTROOT}/bin/sed"
  43. exit 0
  44. endef
  45. define Package/sed/prerm
  46. $${IPKG_INSTROOT}/bin/busybox sed -h 2>&1 | grep -q BusyBox && \
  47. ln -sf busybox $${IPKG_INSTROOT}/bin/sed
  48. exit 0
  49. endef
  50. $(eval $(call BuildPackage,sed))