kernel: simplify some parts in template file.

This commit is contained in:
Juan RP 2011-02-10 13:06:05 +01:00
parent e9781f1407
commit 9e7d351292
1 changed files with 8 additions and 10 deletions

View File

@ -33,8 +33,9 @@ Add_dependency build perl
do_build()
{
# If there's a file called kernel-<arch>-dotconfig, use it to
# configure the kernel; otherwise run the menuconfig target.
# If there's a file called <arch>-dotconfig, use it to
# configure the kernel; otherwise use arch defaults and all stuff
# as modules (defconfig+allmodconfig).
local arch
if [ "$xbps_machine" != "x86_64" ]; then
@ -43,19 +44,18 @@ do_build()
arch=x86_64
fi
cd ${wrksrc}
# Configure
if [ -f ${FILESDIR}/$arch-dotconfig ]; then
if [ -f ${FILESDIR}/${arch}-dotconfig ]; then
msg_normal " Detected a .config file for your arch, using it.\n"
cp -f ${FILESDIR}/$arch-dotconfig ${wrksrc}/.config
cp -f ${FILESDIR}/${arch}-dotconfig .config
make ${makejobs} oldconfig
else
make ${makejobs} menuconfig
msg_normal " Defaulting to 'defconfig and allmodconfig'.\n"
make ${makejobs} defconfig && make ${makejobs} allmodconfig
fi
if [ -n "${revision}" ]; then
sed -i -e "s|LOCALVERSION=\"\"|LOCALVERSION=\"_${revision}\"|" \
${wrksrc}/.config
.config
fi
# Build
make ${makejobs} prepare
@ -72,8 +72,6 @@ do_install()
arch=x86_64
fi
cd ${wrksrc}
# Install kernel, firmware and modules
make INSTALL_MOD_PATH=${DESTDIR} modules_install