libarchive: convert to use build options (acl ~expat ~lzo ssl).

This commit is contained in:
Juan RP 2013-10-18 08:15:42 +02:00
parent 5de3ba29bb
commit 37c04f6532

View file

@ -1,10 +1,10 @@
# Template file for 'libarchive'
pkgname=libarchive
version=3.1.2
revision=3
revision=4
build_style=gnu-configure
configure_args="--without-xml2 --without-nettle --disable-rpath --with-lzo2"
makedepends="zlib-devel lzo-devel bzip2-devel acl-devel openssl-devel liblzma-devel expat-devel"
configure_args="--without-xml2 --without-nettle --disable-rpath"
makedepends="zlib-devel bzip2-devel liblzma-devel"
short_desc="Library to read/write several different streaming archive formats"
maintainer="Juan RP <xtraeme@gmail.com>"
homepage="http://www.libarchive.org/"
@ -13,12 +13,50 @@ distfiles="http://www.libarchive.org/downloads/libarchive-${version}.tar.gz"
checksum=eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e
if [ "$CROSS_BUILD" ]; then
hostmakedepends="libtool automake"
hostmakedepends="libtool"
pre_configure() {
./build/autogen.sh
libtoolize -f
}
fi
# Package build options
build_options="acl lzo ssl expat"
desc_option_acl="Enable support for ACLs and Extended Attributes"
desc_option_expat="Enable support for XAR format through expat"
desc_option_lzo="Enable support for LZO format"
desc_option_ssl="Enable support for mtree/XAR hashes"
# Enable acl and ssl by default.
build_options_default="acl ssl"
if [ "$build_option_acl" ]; then
configure_args+=" --enable-xattr --enable-acl"
makedepends+=" acl-devel"
else
configure_args+=" --disable-xattr --disable-acl"
fi
if [ "$build_option_expat" ]; then
configure_args+=" --with-expat"
makedepends+=" expat-devel"
else
configure_args+=" --without-expat"
fi
if [ "$build_option_lzo" ]; then
configure_args+=" --with-lzo2"
makedepends+=" lzo-devel"
else
configure_args+=" --without-lzo2"
fi
if [ "$build_option_ssl" ]; then
configure_args+=" --with-openssl"
makedepends+=" openssl-devel"
else
configure_args+=" --without-openssl"
fi
bsdtar_package() {
short_desc="BSD tar(1) using libarchive"
pkg_install() {
@ -38,12 +76,25 @@ bsdcpio_package() {
}
libarchive-devel_package() {
depends="acl-devel zlib-devel lzo-devel bzip2-devel liblzma-devel
openssl-devel expat-devel libarchive>=${version}"
depends="zlib-devel bzip2-devel liblzma-devel"
if [ "$build_option_acl" ]; then
depends+=" acl-devel"
fi
if [ "$build_option_expat" ]; then
depends+=" expat-devel"
fi
if [ "$build_option_lzo" ]; then
depends+=" lzo-devel"
fi
if [ "$build_option_ssl" ]; then
depends+=" openssl-devel"
fi
depends+=" libarchive>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vmove usr/lib/pkgconfig
vmove usr/share
}
@ -51,6 +102,6 @@ libarchive-devel_package() {
libarchive_package() {
pkg_install() {
vmove usr
vmove all
}
}