Browse files

FL-34: mdev, update to latest stable busybox

  • Loading branch information...
1 parent 739ad2b commit 2a465cebab02b5fe9dcfeea28d6c50248208cf4e @angryvincent angryvincent committed Jul 4, 2013
Showing with 93 additions and 0 deletions.
  1. +1 −0 sys-fs/mdev-bb/Manifest
  2. +92 −0 sys-fs/mdev-bb/mdev-bb-1.21.1.ebuild
View
1 sys-fs/mdev-bb/Manifest
@@ -1,2 +1,3 @@
DIST busybox-1.20.2.tar.bz2 2186738 SHA256 eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882
DIST busybox-1.21.0.tar.bz2 2200841 SHA256 eb9d268627783297f5f459cb9bd61a94e395dc7cb3647e10ec186e0159aa36ed SHA512 ddafded24881f03db550d9793585bb5442c70f2a60a5d9770126f50981dadfe95fc0b280f83d5b8a8ce21c86bb7ce64e9f1a606cea140fb2f2599a21de55ba31 WHIRLPOOL d50378bb823dd59e8a607ed6a72d4890f4e5ad3304f1ddba9f7f3d49b5ab820acc9daa2b3c4619f8b147dec085c53c3c6f4b4ebe4c60b431299031d2af00a4d3
+DIST busybox-1.21.1.tar.bz2 2201917 SHA256 cd5be0912ec856110ae12c76c3ec9cd5cba1df45b5a9da2b095b8284d1481303 SHA512 b1dd626e1c111214ebd9b933ce2465c943fd8a0a515b6962a31f3a76276ff7992c21b7f96eeb9baeb861a5e734689054e6df5dd6414c753c37084e2d705810e1 WHIRLPOOL 8ec0d9c23d8e2eb28e7f8e88f076908cf6a3f7b64aabd0a7a1af2200064a5337c82fdac9450726236e0632faa202ea08396ca5c35e5334c2128a307adbdd736c
View
92 sys-fs/mdev-bb/mdev-bb-1.21.1.ebuild
@@ -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
+}

0 comments on commit 2a465ce

Please sign in to comment.