/[gentoo-x86]/sys-apps/module-init-tools/module-init-tools-3.16-r1.ebuild
Gentoo

Contents of /sys-apps/module-init-tools/module-init-tools-3.16-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Jul 31 13:09:25 2011 UTC (9 years, 4 months ago) by maekke
Branch: MAIN
Changes since 1.1: +2 -2 lines
arm stable, bug #375807

(Portage version: 2.1.10.7/cvs/Linux x86_64)

1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.16-r1.ebuild,v 1.1 2011/06/17 02:34:27 vapier Exp $
4
5 inherit eutils flag-o-matic
6
7 DESCRIPTION="tools for managing linux kernel modules"
8 HOMEPAGE="http://modules.wiki.kernel.org/"
9 SRC_URI="mirror://kernel/linux/utils/kernel/module-init-tools/${P}.tar.bz2
10 mirror://gentoo/${P}-man.tar.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~alpha ~amd64 arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
15 IUSE="static"
16 RESTRICT="test"
17
18 DEPEND="sys-libs/zlib"
19 RDEPEND="${DEPEND}
20 !<sys-apps/baselayout-2.0.1
21 !sys-apps/modutils"
22
23 src_unpack() {
24 unpack ${A}
25 cd "${S}"
26 touch *.5 *.8 # dont regen manpages
27 }
28
29 src_compile() {
30 mkdir build && cd build #290207
31 use static && append-ldflags -static
32 ECONF_SOURCE=.. \
33 econf \
34 --prefix=/ \
35 --enable-zlib \
36 --enable-zlib-dynamic \
37 --disable-static-utils
38 emake || die
39 }
40
41 src_test() {
42 # this manually runs configure and stuff, so ignore it
43 ./tests/runtests -v || die
44 }
45
46 src_install() {
47 emake -C build install DESTDIR="${D}" || die
48 dodoc AUTHORS ChangeLog NEWS README TODO
49
50 into /
51 newsbin "${FILESDIR}"/update-modules-3.5.sh update-modules || die
52 doman "${FILESDIR}"/update-modules.8 || die
53
54 cat <<-EOF > "${T}"/usb-load-ehci-first.conf
55 install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe --ignore-install ohci_hcd \$CMDLINE_OPTS
56 install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe --ignore-install uhci_hcd \$CMDLINE_OPTS
57 EOF
58
59 insinto /etc/modprobe.d
60 doins "${T}"/usb-load-ehci-first.conf || die #260139
61 }
62
63 pkg_postinst() {
64 # cheat to keep users happy
65 if grep -qs modules-update "${ROOT}"/etc/init.d/modules ; then
66 sed -i 's:modules-update:update-modules:' "${ROOT}"/etc/init.d/modules
67 fi
68
69 # For files that were upgraded but not renamed via their ebuild to
70 # have a proper .conf extension, rename them so etc-update tools can
71 # take care of things. #274942
72 local i f cfg
73 eshopts_push -s nullglob
74 for f in "${ROOT}"etc/modprobe.d/* ; do
75 # The .conf files need no upgrading unless a non-.conf exists,
76 # so skip this until later ...
77 [[ ${f} == *.conf ]] && continue
78 # If a .conf doesn't exist, then a package needs updating, or
79 # the user created it, or it's orphaned. Either way, we don't
80 # really know, so leave it alone.
81 [[ ! -f ${f}.conf ]] && continue
82
83 i=0
84 while :; do
85 cfg=$(printf "%s/._cfg%04d_%s.conf" "${f%/*}" ${i} "${f##*/}")
86 [[ ! -e ${cfg} ]] && break
87 ((i++))
88 done
89 elog "Updating ${f}; please run 'etc-update'"
90 mv "${f}.conf" "${cfg}"
91 mv "${f}" "${f}.conf"
92 done
93 # Whine about any non-.conf files that are left
94 for f in "${ROOT}"etc/modprobe.d/* ; do
95 [[ ${f} == *.conf ]] && continue
96 ewarn "The '${f}' file needs to be upgraded to end with a '.conf'."
97 ewarn "Either upgrade the package that owns it, or manually rename it."
98 done
99 eshopts_pop
100 }

  ViewVC Help
Powered by ViewVC 1.1.20