74861029d764e7cb0f7afe18a6d28484eb4c737c
[feed/packages.git] / utils / findutils / Makefile
1 #
2 # Copyright (C) 2006-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 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=findutils
10 PKG_VERSION:=4.6.0
11 PKG_RELEASE:=4
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
14 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
15 PKG_HASH:=ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d
16
17 PKG_MAINTAINER:=Daniel Dickinson <cshored@thecshore.com>
18 PKG_LICENSE:=GPL-3.0-or-later
19 PKG_LICENSE_FILES:=COPYING
20
21 PKG_BUILD_PARALLEL:=1
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/findutils/Default
27 TITLE:=GNU Find Utilities
28 SECTION:=utils
29 CATEGORY:=Utilities
30 URL:=https://www.gnu.org/software/findutils/
31 endef
32
33 define Package/findutils/description/Default
34 Replace busybox versions of findutils with full GNU versions.
35 This is normally not needed as busybox is smaller and provides
36 sufficient functionality, but some users may want or need
37 the full functionality of the GNU tools.
38 endef
39
40 define Package/findutils
41 $(call Package/findutils/Default)
42 TITLE+= (all)
43 DEPENDS:= \
44 +findutils-find \
45 +findutils-xargs \
46 +findutils-locate
47 endef
48
49 define Package/findutils-find
50 $(call Package/findutils/Default)
51 TITLE+= - find utility
52 ALTERNATIVES:=300:/usr/bin/find:/usr/libexec/findutils-find
53 endef
54
55 define Package/findutils-xargs
56 $(call Package/findutils/Default)
57 TITLE+= - xargs utility
58 ALTERNATIVES:=300:/usr/bin/xargs:/usr/libexec/findutils-xargs
59 endef
60
61 define Package/findutils-locate
62 $(call Package/findutils/Default)
63 TITLE+= - locate and updatedb utility
64 endef
65
66 CONFIGURE_ARGS += --localstatedir=/srv/var
67 CONFIGURE_VARS += ac_cv_path_SORT=sort
68
69 define Package/findutils/install
70 true
71 endef
72
73 define Package/findutils-find/install
74 $(INSTALL_DIR) $(1)/usr/libexec
75 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/find $(1)/usr/libexec/findutils-find
76 endef
77
78 define Package/findutils-xargs/install
79 $(INSTALL_DIR) $(1)/usr/libexec
80 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/xargs $(1)/usr/libexec/findutils-xargs
81 endef
82
83 define Package/findutils-locate/install
84 $(INSTALL_DIR) $(1)/usr/bin $(1)/srv/var
85 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/locate $(1)/usr/bin/
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/updatedb $(1)/usr/bin/
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib $(1)/usr/
88 endef
89
90 $(eval $(call BuildPackage,findutils))
91 $(eval $(call BuildPackage,findutils-find))
92 $(eval $(call BuildPackage,findutils-locate))
93 $(eval $(call BuildPackage,findutils-xargs))