# Template file for 'attr'
pkgname=attr
version=2.6.0
revision=1
bootstrap=yes
build_style=gnu-configure
checkdepends="perl"
short_desc="Extended attribute support library for ACL support"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.1-or-later"
homepage="http://savannah.nongnu.org/projects/attr"
changelog="https://cgit.git.savannah.nongnu.org/cgit/attr.git/plain/doc/CHANGES"
distfiles="${NONGNU_SITE}/attr/attr-${version}.tar.gz"
checksum="d42fa374513180bb48cb11a46696f488240e5124ff1e6ad88b0abff706985612"

conf_files="/etc/xattr.conf"

pre_check() {
	# musl error string differ from glibc
	# EXPECTED: Operation not supported
	# RECIEVED: Not supported
	if [ "$XBPS_TARGET_LIBC" = "musl"  ]; then
		vsed -e 's|f: Operation n|f: N|g' -i test/attr.run
	fi
}

attr-devel_package() {
	depends="attr-${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove "usr/lib/*.a"
		vmove "usr/lib/*.so"
		vmove usr/share/man/man3
		vmove usr/share/doc
		vmove usr/lib/pkgconfig
	}
}

attr-progs_package() {
	short_desc+=" - utilities"
	license="GPL-2.0-or-later"
	pkg_install() {
		vmove usr/bin
		vmove usr/share/man/man1
		vmove usr/share/locale
	}
}
