This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
lsts_glued/rules/lvm2/default.bash

43 lines
1006 B
Bash
Raw Normal View History

source $pkg_common
2013-07-13 17:19:22 +01:00
configure()
{
cd "../LVM2.${version}"
./configure \
--prefix="${cfg_dir_toolchain_sysroot}/usr" \
--build="${cfg_host_canonical}" \
--host="${cfg_target_canonical}"
}
build()
{
cd "../LVM2.${version}"
export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
# Configuration is buggy so we have to do this...
export CC="$cfg_target_canonical-gcc"
export CXX="$cfg_target_canonical-g++"
export AR="$cfg_target_canonical-ar"
export RANLIB="$cfg_target_canonical-ranlib"
$cmd_make
}
host_install()
{
cd "../LVM2.${version}"
sed "s#\$(confdir)/\$(CONFDEST)#${cfg_dir_toolchain_sysroot}\$(confdir)/\$(CONFDEST)#g" "doc/Makefile" -i
$cmd_make install
}
target_install()
{
$cmd_mkdir "${cfg_dir_rootfs}/etc/lvm"
$cmd_cp "${cfg_dir_toolchain_sysroot}/etc/lvm" "${cfg_dir_rootfs}/etc/lvm"
$cmd_cp "${cfg_dir_toolchain_sysroot}/usr/lib/"libdevmapper* "${cfg_dir_rootfs}/usr/lib"
# More to be done.
}