summaryrefslogtreecommitdiffstats
path: root/utils/findutils/Makefile
blob: 25c46ce27997e5bcb0635241fe54c9c5f8d26750 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#
# Copyright (C) 2006-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:=findutils
PKG_VERSION:=4.7.0
PKG_RELEASE:=2

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

PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_CPE_ID:=cpe:/a:gnu:findutils

PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1

include $(INCLUDE_DIR)/package.mk

define Package/findutils/Default
	TITLE:=GNU Find Utilities
	SECTION:=utils
	CATEGORY:=Utilities
	URL:=https://www.gnu.org/software/findutils/
endef

define Package/findutils/description/Default
Replace busybox versions of findutils with full GNU versions.
This is normally not needed as busybox is smaller and provides
sufficient functionality, but some users may want or need
the full functionality of the GNU tools.
endef

define Package/findutils
	$(call Package/findutils/Default)
	TITLE+= (all)
	DEPENDS:= \
	+findutils-find \
	+findutils-xargs \
	+findutils-locate
endef

define Package/findutils-find
	$(call Package/findutils/Default)
	TITLE+= - find utility
	ALTERNATIVES:=300:/usr/bin/find:/usr/libexec/findutils-find
endef

define Package/findutils-xargs
	$(call Package/findutils/Default)
	TITLE+= - xargs utility
	ALTERNATIVES:=300:/usr/bin/xargs:/usr/libexec/findutils-xargs
endef

define Package/findutils-locate
	$(call Package/findutils/Default)
	TITLE+= - locate and updatedb utility
endef

CONFIGURE_ARGS += \
	--localstatedir=/srv/var \
	--without-selinux
CONFIGURE_VARS += ac_cv_path_SORT=sort

define Package/findutils/install
	true
endef

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

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

define Package/findutils-locate/install
	$(INSTALL_DIR) $(1)/usr/bin $(1)/srv/var
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/locate $(1)/usr/bin/
	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/updatedb $(1)/usr/bin/
	$(CP) $(PKG_INSTALL_DIR)/usr/lib $(1)/usr/
endef

$(eval $(call BuildPackage,findutils))
$(eval $(call BuildPackage,findutils-find))
$(eval $(call BuildPackage,findutils-locate))
$(eval $(call BuildPackage,findutils-xargs))