mirror of
https://github.com/kevin-leptons/lfs-auto.git
synced 2026-01-12 15:39:47 +00:00
69 lines
1.2 KiB
Bash
Executable File
69 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# using : build findutils
|
|
# params : none
|
|
# return : 0 on success, 1 on error
|
|
# author : kevin.leptons@gmail.com
|
|
|
|
# locate location of this script
|
|
__dir__="$(dirname "$0")"
|
|
script_dir="$(dirname $__dir__)"
|
|
|
|
# libs
|
|
source $script_dir/configuration.sh
|
|
source $script_dir/util.sh
|
|
|
|
# variables
|
|
package_name="sys.findutils"
|
|
source_file="../findutils-4.4.2.tar.gz"
|
|
source_dir="findutils-4.4.2"
|
|
|
|
|
|
# step.verify
|
|
step_verify() {
|
|
[ -f $source_file ]
|
|
}
|
|
|
|
# step.extract
|
|
step_extract() {
|
|
tar -vxf $source_file
|
|
}
|
|
|
|
# step.configure
|
|
step_configure() {
|
|
./configure --prefix=/usr --localstatedir=/var/lib/locate
|
|
}
|
|
|
|
# step.build
|
|
step_build() {
|
|
make
|
|
}
|
|
|
|
# step.test
|
|
step_test() {
|
|
make check
|
|
}
|
|
|
|
# step.install
|
|
step_install() {
|
|
make install
|
|
}
|
|
|
|
# step.exec.mv
|
|
step_exec_mv() {
|
|
mv -v /usr/bin/find /bin &&
|
|
sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb
|
|
}
|
|
|
|
# run
|
|
cd $root_system_sources
|
|
run_step "$package_name.verify" step_verify
|
|
run_step "$package_name.extract" step_extract
|
|
cd $source_dir
|
|
run_step "$package_name.configure" step_configure
|
|
run_step "$package_name.build" step_build
|
|
run_step "$package_name.test" step_test
|
|
run_step "$package_name.install" step_install
|
|
run_step "$package_name.exec.mv" step_exec_mv
|
|
exit 0
|