aboutsummaryrefslogtreecommitdiff
path: root/utils/which/Makefile
blob: f7817c63e25a6940e3c6f2f9c4ed17e991ddc575 (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
include $(TOPDIR)/rules.mk

PKG_NAME:=which
PKG_VERSION:=2.21
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/which
PKG_HASH:=f4a245b94124b377d8b49646bf421f9155d36aa7614b6ebf83705d3ffc76eaad

PKG_MAINTAINER:=Huangbin Zhan <zhanhb88@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING

PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/package.mk

define Package/which
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=which utility - full version
  URL:=https://carlowood.github.io/which/
  ALTERNATIVES:=300:/usr/bin/which:/usr/libexec/which-gnu
endef

define Package/which/description
 The which command shows the full pathname of a specified program, if the specified program is in your PATH.
endef

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

$(eval $(call BuildPackage,which))