Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

FL-34: update mdev with busybox-1.21

  • Loading branch information...
commit 27702f328fd7ae9ef70143143c7a2c5c27bd8e51 1 parent b8c2cbf
Oleg authored May 18, 2013
1  sys-fs/mdev-bb/Manifest
... ...
@@ -1 +1,2 @@
1 1
 DIST busybox-1.20.2.tar.bz2 2186738 SHA256 eb13ff01dae5618ead2ef6f92ba879e9e0390f9583bd545d8789d27cf39b6882
  2
+DIST busybox-1.21.0.tar.bz2 2200841 SHA256 eb9d268627783297f5f459cb9bd61a94e395dc7cb3647e10ec186e0159aa36ed SHA512 ddafded24881f03db550d9793585bb5442c70f2a60a5d9770126f50981dadfe95fc0b280f83d5b8a8ce21c86bb7ce64e9f1a606cea140fb2f2599a21de55ba31 WHIRLPOOL d50378bb823dd59e8a607ed6a72d4890f4e5ad3304f1ddba9f7f3d49b5ab820acc9daa2b3c4619f8b147dec085c53c3c6f4b4ebe4c60b431299031d2af00a4d3
92  sys-fs/mdev-bb/mdev-bb-1.21.0.ebuild
... ...
@@ -0,0 +1,92 @@
  1
+EAPI="4"
  2
+inherit eutils flag-o-matic toolchain-funcs multilib
  3
+
  4
+DESCRIPTION="mdev from busybox."
  5
+HOMEPAGE="http://www.busybox.net/"
  6
+
  7
+base='busybox'
  8
+MY_P=${base}-${PV/_/-}
  9
+
  10
+SRC_URI="http://www.busybox.net/downloads/${MY_P}.tar.bz2"
  11
+KEYWORDS="~*"
  12
+
  13
+LICENSE="GPL-2"
  14
+SLOT="0"
  15
+IUSE="static"
  16
+RESTRICT="test"
  17
+
  18
+DEPEND=">=sys-kernel/linux-headers-2.6.39"
  19
+
  20
+RDEPEND="!sys-apps/busybox[mdev]"
  21
+
  22
+S=${WORKDIR}/${MY_P}
  23
+QA_PRESTRIPPED="/sbin/mdev"
  24
+
  25
+src_configure() {
  26
+	cat >"${S}/tmp.config" <<-END_OF_CONFIG
  27
+		CONFIG_HAVE_DOT_CONFIG=y
  28
+		CONFIG_USE_PORTABLE_CODE=y
  29
+		CONFIG_PLATFORM_LINUX=y
  30
+		CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
  31
+		CONFIG_SHOW_USAGE=y
  32
+		CONFIG_FEATURE_VERBOSE_USAGE=y
  33
+		CONFIG_FEATURE_COMPRESS_USAGE=y
  34
+		CONFIG_UNICODE_SUPPORT=y
  35
+		CONFIG_FEATURE_CHECK_UNICODE_IN_ENV=y
  36
+		CONFIG_UNICODE_COMBINING_WCHARS=y
  37
+		CONFIG_UNICODE_WIDE_WCHARS=y
  38
+		CONFIG_LONG_OPTS=y
  39
+		CONFIG_FEATURE_DEVPTS=y
  40
+		CONFIG_LFS=y
  41
+		CONFIG_NO_DEBUG_LIB=y
  42
+		CONFIG_INSTALL_APPLET_SYMLINKS=y
  43
+		CONFIG_MDEV=y
  44
+		CONFIG_FEATURE_MDEV_CONF=y
  45
+		CONFIG_FEATURE_MDEV_RENAME=y
  46
+		CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
  47
+		CONFIG_FEATURE_MDEV_EXEC=y
  48
+		CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
  49
+		CONFIG_FEATURE_SH_IS_NONE=y
  50
+		CONFIG_FEATURE_BASH_IS_NONE=y"
  51
+END_OF_CONFIG
  52
+
  53
+	if use static; then
  54
+		echo 'CONFIG_STATIC=y' >> "${S}/tmp.config"
  55
+	fi
  56
+
  57
+	# Landley's miniconfig. <3
  58
+	make KCONFIG_ALLCONFIG='tmp.config' allnoconfig >/dev/null 2>&1
  59
+}
  60
+
  61
+src_install() {
  62
+	mkdir "${D}/sbin" || die
  63
+	cp busybox "${D}/sbin/mdev" || die
  64
+	chmod 750 "${D}/sbin/mdev" || die
  65
+	mkdir -p "${D}/etc"
  66
+	cp -a "${FILESDIR}"/mdev.conf "${D}/etc" || die
  67
+	dodir /etc/mdev
  68
+	exeinto /etc/mdev
  69
+	doexe "${FILESDIR}"/catch-all || die
  70
+	doexe "${FILESDIR}"/settle-nics || die
  71
+	doexe "${FILESDIR}"/storage-device || die
  72
+	doexe "${FILESDIR}"/proc-bus-usb || die
  73
+	newinitd "${FILESDIR}"/mdev.init mdev || die
  74
+}
  75
+add_init() {
  76
+	local runl=$1
  77
+	if [ ! -e ${ROOT}/etc/runlevels/${runl} ]
  78
+	then
  79
+		install -d -m0755 ${ROOT}/etc/runlevels/${runl}
  80
+	fi
  81
+	for initd in $*
  82
+	do
  83
+		# if the initscript is not going to be installed and  is not currently installed, return
  84
+		[[ -e ${D}/etc/init.d/${initd} || -e ${ROOT}/etc/init.d/${initd} ]] || continue
  85
+		[[ -e ${ROOT}/etc/runlevels/${runl}/${initd} ]] && continue
  86
+		elog "Auto-adding '${initd}' service to your ${runl} runlevel"
  87
+		ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/${runl}/${initd}
  88
+	done
  89
+}
  90
+pkg_postinst() {
  91
+	add_init sysinit mdev
  92
+}

0 notes on commit 27702f3

Please sign in to comment.
Something went wrong with that request. Please try again.