summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMaxim Storchak <m.storchak@gmail.com>2014-06-27 10:54:59 +0300
committerMaxim Storchak <m.storchak@gmail.com>2014-06-27 13:19:46 +0300
commitbbf5f89801dfd009bdad389b49487de0284d444c (patch)
treee42bf9a684d1f05e54be7242c8f91251d25ce82d /utils
parent43d63745a4e7aae4e53bd760d903a3f15cf04b96 (diff)
attr: add xattr tools and libs
Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/attr/Makefile102
-rw-r--r--utils/attr/patches/100-no-gettext_configure.patch21
-rw-r--r--utils/attr/patches/101-no-gettext_autogen.patch9
-rw-r--r--utils/attr/patches/102-no-gettext_Makefile.patch13
4 files changed, 145 insertions, 0 deletions
diff --git a/utils/attr/Makefile b/utils/attr/Makefile
new file mode 100644
index 000000000..a770eb700
--- /dev/null
+++ b/utils/attr/Makefile
@@ -0,0 +1,102 @@
+#
+# Copyright (C) 2014 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:=attr
+PKG_REV:=50fc862d69984089ce09138b3350ee7762290403
+PKG_VERSION:=20140610
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=git://git.sv.gnu.org/attr.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_VERSION:=$(PKG_REV)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_MAINTAINER:=Maxim Storchak <m.storchak@gmail.com>
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/attr/Default
+ TITLE:=Extended attributes (xattr) manipulation
+ URL:=http://savannah.nongnu.org/projects/attr
+ SUBMENU:=Filesystem
+endef
+
+define Package/attr/Default/description
+ Extended attributes support
+endef
+
+define Package/attr
+$(call Package/attr/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE+=utils
+ DEPENDS:=+libattr
+endef
+
+define Package/libattr
+$(call Package/attr/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE+=library
+ KCONFIG:= \
+ CONFIG_CIFS_XATTR=y \
+ CONFIG_EXT4_FS_XATTR=y \
+ CONFIG_JFFS2_FS_XATTR=y \
+ CONFIG_REISERFS_FS_XATTR=y \
+ CONFIG_SQUASHFS_XATTR=y \
+ CONFIG_TMPFS_XATTR=y \
+
+endef
+
+define Package/libattr/description
+$(call Package/attr/Default/description)
+ This package provides libattr
+endef
+
+define Package/attr/description
+$(call Package/attr/Default/description)
+ This package provides xattr manipulation utilities
+ - attr
+ - getfattr
+ - setfattr
+endef
+
+CONFIGURE_ARGS += --enable-static --enable-shared
+
+define Build/Prepare
+ $(call Build/Prepare/Default)
+ (cd $(PKG_BUILD_DIR); ./autogen.sh;);
+endef
+
+define Package/attr/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+endef
+
+define Package/libattr/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(INSTALL_DIR) $(1)/etc
+ $(CP) $(PKG_INSTALL_DIR)/etc $(1)/
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+define Package/attr/conffiles
+/etc/xattr.conf
+endef
+
+define Build/InstallDev
+ mkdir -p $(1)/usr/include
+ mkdir -p $(1)/usr/lib/pkgconfig
+ $(CP) -r $(PKG_INSTALL_DIR)/usr/{include,lib} $(1)/usr/
+endef
+
+$(eval $(call BuildPackage,attr))
+$(eval $(call BuildPackage,libattr))
diff --git a/utils/attr/patches/100-no-gettext_configure.patch b/utils/attr/patches/100-no-gettext_configure.patch
new file mode 100644
index 000000000..2e8b4f4cd
--- /dev/null
+++ b/utils/attr/patches/100-no-gettext_configure.patch
@@ -0,0 +1,21 @@
+diff --git a/configure.ac b/configure.ac
+index 8a1ca39..ceee757 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -33,9 +33,6 @@ AC_FUNC_ALLOCA
+ AM_PROG_AR
+ LT_INIT
+
+-AM_GNU_GETTEXT_VERSION([0.18.2])
+-AM_GNU_GETTEXT([external])
+-
+ dnl Most people get these man(2) pages from the system now.
+ AC_ARG_ENABLE([man2],
+ [AS_HELP_STRING([--enable-man2], [Install man(2) pages])])
+@@ -59,6 +56,5 @@ AC_CONFIG_COMMANDS([include/attr],
+ AC_CONFIG_FILES([
+ libattr.pc
+ Makefile
+- po/Makefile.in
+ ])
+ AC_OUTPUT
diff --git a/utils/attr/patches/101-no-gettext_autogen.patch b/utils/attr/patches/101-no-gettext_autogen.patch
new file mode 100644
index 000000000..1fad67a13
--- /dev/null
+++ b/utils/attr/patches/101-no-gettext_autogen.patch
@@ -0,0 +1,9 @@
+diff --git a/autogen.sh b/autogen.sh
+index a98a3c5..982aff1 100755
+--- a/autogen.sh
++++ b/autogen.sh
+@@ -1,4 +1,2 @@
+ #!/bin/sh -ex
+-po/update-potfiles
+-autopoint --force
+ exec autoreconf -f -i
diff --git a/utils/attr/patches/102-no-gettext_Makefile.patch b/utils/attr/patches/102-no-gettext_Makefile.patch
new file mode 100644
index 000000000..76c8dcd3a
--- /dev/null
+++ b/utils/attr/patches/102-no-gettext_Makefile.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.am b/Makefile.am
+index a3e8353..381bb55 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -3,8 +3,6 @@ ACLOCAL_AMFLAGS = -I m4
+ EXTRA_DIST = \
+ exports
+
+-SUBDIRS = po
+-
+ AM_CPPFLAGS = \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \