37 lines
1.0 KiB
Bash
37 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
. ./scripts/colors.sh
|
|
. ./scripts/funcs.sh
|
|
. ./scripts/config.sh
|
|
|
|
mtd-utils() {
|
|
pkgname=mtd-utils
|
|
pkgver=2.3.0
|
|
srcurl=ftp://ftp.infradead.org/pub/mtd-utils/${pkgname}-${pkgver}.tar.bz2
|
|
print_info "** Building and installing ${pkgname}"
|
|
[ -d $build/${pkgname} ] && return 0
|
|
mkdir -p $build/${pkgname}
|
|
cd $build/${pkgname}
|
|
if [ ! -f $root/downloads/${pkgname}-${pkgver}.tar.bz2 ]; then
|
|
print_info "** Downloading $srcurl"
|
|
cd $root/downloads
|
|
wget $srcurl
|
|
check $? "download $srcurl"
|
|
cd -
|
|
fi
|
|
tar -xf $root/downloads/${pkgname}-${pkgver}.tar.bz2
|
|
check $? "Extract ${pkgname}"
|
|
cd ${pkgname}-${pkgver}
|
|
./configure \
|
|
--prefix=/usr \
|
|
--host=${CROSS_COMPILE} \
|
|
--without-tests \
|
|
--without-ubifs \
|
|
--disable-ubihealthd
|
|
check $? "Configure ${pkgname}"
|
|
make $makeflags
|
|
check $? "Build ${pkgname}"
|
|
make DESTDIR=$rootfspath install
|
|
check $? "Installing to rootfs ${pkgname}"
|
|
}
|