Browse Source

attr: add xattr tools and libs

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
Maxim Storchak 10 years ago
parent
commit
bbf5f89801

+ 102
- 0
utils/attr/Makefile View File

@@ -0,0 +1,102 @@
1
+#
2
+# Copyright (C) 2014 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:=attr
11
+PKG_REV:=50fc862d69984089ce09138b3350ee7762290403
12
+PKG_VERSION:=20140610
13
+PKG_RELEASE:=1
14
+
15
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16
+PKG_SOURCE_URL:=git://git.sv.gnu.org/attr.git
17
+PKG_SOURCE_PROTO:=git
18
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
19
+PKG_SOURCE_VERSION:=$(PKG_REV)
20
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21
+PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
22
+PKG_INSTALL:=1
23
+
24
+include $(INCLUDE_DIR)/package.mk
25
+
26
+define Package/attr/Default
27
+  TITLE:=Extended attributes (xattr) manipulation
28
+  URL:=http://savannah.nongnu.org/projects/attr
29
+  SUBMENU:=Filesystem
30
+endef
31
+
32
+define Package/attr/Default/description
33
+  Extended attributes support
34
+endef
35
+
36
+define Package/attr
37
+$(call Package/attr/Default)
38
+  SECTION:=utils
39
+  CATEGORY:=Utilities
40
+  TITLE+=utils
41
+  DEPENDS:=+libattr
42
+endef
43
+
44
+define Package/libattr
45
+$(call Package/attr/Default)
46
+  SECTION:=libs
47
+  CATEGORY:=Libraries
48
+  TITLE+=library
49
+  KCONFIG:= \
50
+    CONFIG_CIFS_XATTR=y \
51
+    CONFIG_EXT4_FS_XATTR=y \
52
+    CONFIG_JFFS2_FS_XATTR=y \
53
+    CONFIG_REISERFS_FS_XATTR=y \
54
+    CONFIG_SQUASHFS_XATTR=y \
55
+    CONFIG_TMPFS_XATTR=y \
56
+
57
+endef
58
+
59
+define Package/libattr/description
60
+$(call Package/attr/Default/description)
61
+ This package provides libattr
62
+endef
63
+
64
+define Package/attr/description
65
+$(call Package/attr/Default/description)
66
+ This package provides xattr manipulation utilities
67
+ - attr
68
+ - getfattr
69
+ - setfattr
70
+endef
71
+
72
+CONFIGURE_ARGS += --enable-static --enable-shared
73
+
74
+define Build/Prepare
75
+	$(call Build/Prepare/Default)
76
+	(cd $(PKG_BUILD_DIR); ./autogen.sh;);
77
+endef
78
+
79
+define Package/attr/install
80
+	$(INSTALL_DIR) $(1)/usr/bin
81
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
82
+endef
83
+
84
+define Package/libattr/install
85
+	$(INSTALL_DIR) $(1)/usr/lib
86
+	$(INSTALL_DIR) $(1)/etc
87
+	$(CP) $(PKG_INSTALL_DIR)/etc $(1)/
88
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
89
+endef
90
+
91
+define Package/attr/conffiles
92
+/etc/xattr.conf
93
+endef
94
+
95
+define Build/InstallDev
96
+	mkdir -p $(1)/usr/include
97
+	mkdir -p $(1)/usr/lib/pkgconfig
98
+	$(CP) -r $(PKG_INSTALL_DIR)/usr/{include,lib} $(1)/usr/
99
+endef
100
+
101
+$(eval $(call BuildPackage,attr))
102
+$(eval $(call BuildPackage,libattr))

+ 21
- 0
utils/attr/patches/100-no-gettext_configure.patch View File

@@ -0,0 +1,21 @@
1
+diff --git a/configure.ac b/configure.ac
2
+index 8a1ca39..ceee757 100644
3
+--- a/configure.ac
4
++++ b/configure.ac
5
+@@ -33,9 +33,6 @@ AC_FUNC_ALLOCA
6
+ AM_PROG_AR
7
+ LT_INIT
8
+ 
9
+-AM_GNU_GETTEXT_VERSION([0.18.2])
10
+-AM_GNU_GETTEXT([external])
11
+-
12
+ dnl Most people get these man(2) pages from the system now.
13
+ AC_ARG_ENABLE([man2],
14
+ 	[AS_HELP_STRING([--enable-man2], [Install man(2) pages])])
15
+@@ -59,6 +56,5 @@ AC_CONFIG_COMMANDS([include/attr],
16
+ AC_CONFIG_FILES([
17
+ 	libattr.pc
18
+ 	Makefile
19
+-	po/Makefile.in
20
+ ])
21
+ AC_OUTPUT

+ 9
- 0
utils/attr/patches/101-no-gettext_autogen.patch View File

@@ -0,0 +1,9 @@
1
+diff --git a/autogen.sh b/autogen.sh
2
+index a98a3c5..982aff1 100755
3
+--- a/autogen.sh
4
++++ b/autogen.sh
5
+@@ -1,4 +1,2 @@
6
+ #!/bin/sh -ex
7
+-po/update-potfiles
8
+-autopoint --force
9
+ exec autoreconf -f -i

+ 13
- 0
utils/attr/patches/102-no-gettext_Makefile.patch View File

@@ -0,0 +1,13 @@
1
+diff --git a/Makefile.am b/Makefile.am
2
+index a3e8353..381bb55 100644
3
+--- a/Makefile.am
4
++++ b/Makefile.am
5
+@@ -3,8 +3,6 @@ ACLOCAL_AMFLAGS = -I m4
6
+ EXTRA_DIST = \
7
+ 	exports
8
+ 
9
+-SUBDIRS = po
10
+-
11
+ AM_CPPFLAGS = \
12
+ 	-I$(top_builddir)/include \
13
+ 	-I$(top_srcdir)/include \