Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FL-34: update mdev with busybox-1.21
- Loading branch information
Oleg Vinichenko
committed
May 18, 2013
1 parent
b8c2cbf
commit 27702f3
Showing
2 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST busybox-1.20.2.tar.bz2 2186738 SHA256 eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882 | ||
DIST busybox-1.21.0.tar.bz2 2200841 SHA256 eb9d268627783297f5f459cb9bd61a94e395dc7cb3647e10ec186e0159aa36ed SHA512 ddafded24881f03db550d9793585bb5442c70f2a60a5d9770126f50981dadfe95fc0b280f83d5b8a8ce21c86bb7ce64e9f1a606cea140fb2f2599a21de55ba31 WHIRLPOOL d50378bb823dd59e8a607ed6a72d4890f4e5ad3304f1ddba9f7f3d49b5ab820acc9daa2b3c4619f8b147dec085c53c3c6f4b4ebe4c60b431299031d2af00a4d3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
EAPI="4" | ||
inherit eutils flag-o-matic toolchain-funcs multilib | ||
|
||
DESCRIPTION="mdev from busybox." | ||
HOMEPAGE="http://www.busybox.net/" | ||
|
||
base='busybox' | ||
MY_P=${base}-${PV/_/-} | ||
|
||
SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2" | ||
KEYWORDS="~*" | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
IUSE="static" | ||
RESTRICT="test" | ||
|
||
DEPEND=">=sys-kernel/linux-headers-2.6.39" | ||
|
||
RDEPEND="!sys-apps/busybox[mdev]" | ||
|
||
S=${WORKDIR}/${MY_P} | ||
QA_PRESTRIPPED="/sbin/mdev" | ||
|
||
src_configure() { | ||
cat >"${S}/tmp.config" <<-END_OF_CONFIG | ||
CONFIG_HAVE_DOT_CONFIG=y | ||
CONFIG_USE_PORTABLE_CODE=y | ||
CONFIG_PLATFORM_LINUX=y | ||
CONFIG_FEATURE_BUFFERS_USE_MALLOC=y | ||
CONFIG_SHOW_USAGE=y | ||
CONFIG_FEATURE_VERBOSE_USAGE=y | ||
CONFIG_FEATURE_COMPRESS_USAGE=y | ||
CONFIG_UNICODE_SUPPORT=y | ||
CONFIG_FEATURE_CHECK_UNICODE_IN_ENV=y | ||
CONFIG_UNICODE_COMBINING_WCHARS=y | ||
CONFIG_UNICODE_WIDE_WCHARS=y | ||
CONFIG_LONG_OPTS=y | ||
CONFIG_FEATURE_DEVPTS=y | ||
CONFIG_LFS=y | ||
CONFIG_NO_DEBUG_LIB=y | ||
CONFIG_INSTALL_APPLET_SYMLINKS=y | ||
CONFIG_MDEV=y | ||
CONFIG_FEATURE_MDEV_CONF=y | ||
CONFIG_FEATURE_MDEV_RENAME=y | ||
CONFIG_FEATURE_MDEV_RENAME_REGEXP=y | ||
CONFIG_FEATURE_MDEV_EXEC=y | ||
CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y | ||
CONFIG_FEATURE_SH_IS_NONE=y | ||
CONFIG_FEATURE_BASH_IS_NONE=y" | ||
END_OF_CONFIG | ||
|
||
if use static; then | ||
echo 'CONFIG_STATIC=y' >> "${S}/tmp.config" | ||
fi | ||
|
||
# Landley's miniconfig. <3 | ||
make KCONFIG_ALLCONFIG='tmp.config' allnoconfig >/dev/null 2>&1 | ||
} | ||
|
||
src_install() { | ||
mkdir "${D}/sbin" || die | ||
cp busybox "${D}/sbin/mdev" || die | ||
chmod 750 "${D}/sbin/mdev" || die | ||
mkdir -p "${D}/etc" | ||
cp -a "${FILESDIR}"/mdev.conf "${D}/etc" || die | ||
dodir /etc/mdev | ||
exeinto /etc/mdev | ||
doexe "${FILESDIR}"/catch-all || die | ||
doexe "${FILESDIR}"/settle-nics || die | ||
doexe "${FILESDIR}"/storage-device || die | ||
doexe "${FILESDIR}"/proc-bus-usb || die | ||
newinitd "${FILESDIR}"/mdev.init mdev || die | ||
} | ||
add_init() { | ||
local runl=$1 | ||
if [ ! -e ${ROOT}/etc/runlevels/${runl} ] | ||
then | ||
install -d -m0755 ${ROOT}/etc/runlevels/${runl} | ||
fi | ||
for initd in $* | ||
do | ||
# if the initscript is not going to be installed and is not currently installed, return | ||
[[ -e ${D}/etc/init.d/${initd} || -e ${ROOT}/etc/init.d/${initd} ]] || continue | ||
[[ -e ${ROOT}/etc/runlevels/${runl}/${initd} ]] && continue | ||
elog "Auto-adding '${initd}' service to your ${runl} runlevel" | ||
ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/${runl}/${initd} | ||
done | ||
} | ||
pkg_postinst() { | ||
add_init sysinit mdev | ||
} |