lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (1352B)


      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 
      8 include $(TOPDIR)/rules.mk
      9 
     10 PKG_NAME:=grep
     11 PKG_VERSION:=2.26
     12 PKG_RELEASE:=1
     13 
     14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
     15 PKG_SOURCE_URL:=@GNU/grep
     16 PKG_MD5SUM:=afdd61c7221434722671baf002ac9267
     17 
     18 PKG_LICENSE:=GPL-3.0
     19 PKG_LICENSE_FILES:=COPYING
     20 PKG_MAINTAINER:=Julen Landa Alustiza <julen@zokormazo.info>
     21 
     22 PKG_INSTALL:=1
     23 PKG_BUILD_PARALLEL:=1
     24 
     25 include $(INCLUDE_DIR)/package.mk
     26 
     27 TARGET_CFLAGS+=--std=gnu99
     28 
     29 define Package/grep
     30   SECTION:=utils
     31   CATEGORY:=Utilities
     32   TITLE:=grep search utility - full version
     33   DEPENDS:=+libpcre
     34   URL:=http://www.gnu.org/software/grep/
     35 endef
     36 
     37 define Package/grep/description
     38 The grep command searches one or more input files for lines
     39 containing a match to a specified pattern. By default, grep
     40 prints the matching lines.
     41 endef
     42 
     43 define Package/grep/install
     44 	$(INSTALL_DIR) $(1)/usr/bin
     45 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/grep $(1)/usr/bin/grep
     46 endef
     47 
     48 define Package/grep/postinst
     49 #!/bin/sh
     50 [ -L "$${IPKG_INSTROOT}/bin/grep" ] && rm -f "$${IPKG_INSTROOT}/bin/grep"
     51 exit 0
     52 endef
     53 
     54 define Package/grep/prerm
     55 $${IPKG_INSTROOT}/bin/busybox grep -h 2>&1 | grep -q BusyBox && \
     56 ln -sf busybox $${IPKG_INSTROOT}/bin/grep
     57 exit 0
     58 endef
     59 
     60 $(eval $(call BuildPackage,grep))