aboutsummaryrefslogtreecommitdiff
path: root/utils/findutils/Makefile
blob: 74861029d764e7cb0f7afe18a6d28484eb4c737c (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
#
# 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.6.0
PKG_RELEASE:=4

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

PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING

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
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))