# SliTaz package receipt.

PACKAGE="acl"
VERSION="2.2.53"
CATEGORY="system-tools"
SHORT_DESC="Commands for Manipulating POSIX Access Control Lists."
MAINTAINER="rcx@zoominternet.net"
DEPENDS="glibc-base attr"
BUILD_DEPENDS="attr-dev bash libtool"
TARBALL="${PACKAGE}-${VERSION}.tar.gz"
WEB_SITE="http://savannah.nongnu.org/projects/acl/"
WGET_URL="http://nongnu.askapache.com/$PACKAGE/$TARBALL"


# Rules to configure and make the package.
compile_rules()
{
	# Need bash as /bin/sh to compile
	mv /bin/sh /bin/sh.bak
	ln -s /bin/bash /bin/sh

	cd $src
	{
		INSTALL_USER=root  \
		INSTALL_GROUP=root \
		./configure \
			--prefix=/usr \
			--libexecdir=/usr/lib \
			$CONFIGURE_ARGS &&
		make &&
		make DESTDIR=$install install
	} || {
		mv -f /bin/sh.bak /bin/sh; return 1
	}

	mv -f /bin/sh.bak /bin/sh
	# .so and .la files must be executable
	find $install -type f -name '*.[sl][oa]*' -exec chmod a+x \{\} \;
	sed -i "s|libdir='/lib'|libdir='/usr/lib'|" $install/usr/lib/libacl.la
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/lib
	cp -a $install/usr/lib/*.so* $fs/usr/lib
	cp -a $install/usr/bin $fs/usr
}