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/libusb-compat/default.bash

60 lines
911 B
Bash
Raw Normal View History

2013-07-13 17:19:22 +01:00
version=\
(
'0.1.5'
2013-07-13 17:19:22 +01:00
)
url=\
(
"http://downloads.sourceforge.net/libusb/libusb-compat-$version.tar.bz2"
)
md5=\
(
'2780b6a758a1e2c2943bdbf7faf740e4'
2013-07-13 17:19:22 +01:00
)
maintainer=\
(
'Ricardo Martins <rasm@fe.up.pt>'
)
requires=\
(
'libusb/default'
2013-07-13 17:19:22 +01:00
)
post_unpack()
{
patches=$(ls "$pkg_dir/patches/"*.patch)
2013-07-13 17:19:22 +01:00
if [ -n "$patches" ]; then
cat $patches | patch -p1
fi
}
configure()
{
"../libusb-compat-$version/configure" \
--prefix="$cfg_dir_toolchain_sysroot/usr" \
--target="$cfg_target_canonical" \
--host="$cfg_target_canonical" \
--build="$cfg_host_canonical" \
--disable-static \
--enable-shared
}
build()
{
$cmd_make
}
host_install()
{
$cmd_make install
}
target_install()
{
cp -a "$cfg_dir_toolchain_sysroot/usr/lib/libusb"*.so* "$cfg_dir_rootfs/lib" &&
$cmd_target_strip "$cfg_dir_rootfs/lib/libusb"*.so*
}