summaryrefslogtreecommitdiffstats
path: root/utils/sed/Makefile
blob: 2dbd877a05ca58fbdbe39f8d2e7f85e91606224c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# Copyright (C) 2010-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=sed
PKG_VERSION:=4.10
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/sed
PKG_HASH:=b8e72182b2ec96a3574e2998c47b7aaa64cc20ce000d8e9ac313cc07cecf28c7

PKG_MAINTAINER:=Russell Senior <russell@personaltelco.net>
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:gnu:sed

PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

define Package/sed
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=sed stream editor utility - full version
  URL:=https://www.gnu.org/software/sed/
  ALTERNATIVES:=300:/bin/sed:/usr/libexec/sed-gnu
endef

define Package/sed/description
sed (stream editor) is a non-interactive command-line text editor. sed is commonly 
used to filter text, i.e., it takes text input, performs some operation (or set of 
operations) on it, and outputs the modified text. sed is typically used for 
extracting part of a file using pattern matching or substituting multiple 
occurrences of a string within a file.
endef

CONFIGURE_ARGS += \
	--disable-acl \
	--disable-xattr \
	--without-selinux

define Build/Compile
	sed -i 's/SUBDIRS = po . gnulib-tests/SUBDIRS = po ./' $(PKG_BUILD_DIR)/Makefile
	$(call Build/Compile/Default,)
endef

define Package/sed/install
	$(INSTALL_DIR) $(1)/usr/libexec
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sed $(1)/usr/libexec/sed-gnu
endef

$(eval $(call BuildPackage,sed))