void-packages/srcpkgs/libarchive/template

90 lines
2.1 KiB
Plaintext
Raw Normal View History

# Template file for 'libarchive'
pkgname=libarchive
version=3.1.2
2014-07-14 11:07:38 +02:00
revision=7
bootstrap=yes
build_style=gnu-configure
configure_args="--without-xml2 --without-nettle --disable-rpath ac_cv_func_lchmod=no"
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/"
2011-09-07 11:17:19 +02:00
license="BSD"
distfiles="http://www.libarchive.org/downloads/libarchive-${version}.tar.gz"
checksum=eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e
2013-02-06 17:10:58 +01:00
if [ -z "$CHROOT_READY" ]; then
CFLAGS+=" -I${XBPS_MASTERDIR}/usr/include"
LDFLAGS+=" -L${XBPS_MASTERDIR}/usr/lib"
fi
if [ "$CROSS_BUILD" ]; then
hostmakedepends="libtool"
pre_configure() {
libtoolize -f
}
2013-02-06 17:10:58 +01:00
fi
# Package build options
build_options="acl expat lzo ssl"
# 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"
2014-07-14 11:07:38 +02:00
makedepends+=" libressl-devel"
else
configure_args+=" --without-openssl"
fi
bsdtar_package() {
short_desc="BSD tar(1) using libarchive"
pkg_install() {
vmove usr/bin/bsdtar
vmove usr/share/man/man1/bsdtar.1
vmove usr/share/man/man5/tar.5
}
}
bsdcpio_package() {
short_desc="BSD cpio(1) using libarchive"
pkg_install() {
vmove usr/bin/bsdcpio
vmove usr/share/man/man1/bsdcpio.1
vmove usr/share/man/man5/cpio.5
}
}
libarchive-devel_package() {
2014-07-14 11:07:38 +02:00
depends="${makedepends} 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
}
}