Magellan Linux

Contents of /branches/R11-stable/core/kmod/kmod-13-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 17771 - (show annotations) (download)
Wed Jun 26 12:28:44 2013 UTC (10 years, 11 months ago) by niro
File size: 1684 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="kmod"
4 PVER="13"
5 PBUILD="r1"
6
7 PCAT="sys-apps"
8
9 DESCRIPTION="Library and tools for managing linux kernel-modules."
10 HOMEPAGE="http://git.profusion.mobi/cgit.cgi/kmod.git"
11
12 DEPEND=">= virtual/glibc
13 >= app-arch/xz-utils-5
14 >= sys-libs/zlib-1.2.5"
15
16 PROVIDE="virtual/module-tools"
17
18 SRCFILE="${PNAME}-${PVER}.tar.xz"
19 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
20
21 sminclude mbuild mtools multilib
22 msetfeature "!check"
23
24 SRC_URI=(
25 http://ftp.kernel.org/pub/linux/utils/kernel/${PNAME}/${SRCFILE}
26 mirror://${PNAME}/${SRCFILE}
27 mirror://${PNAME}/${PNAME}-11-fix32bits.patch
28 )
29
30 UP2DATE="updatecmd 'http://ftp.kernel.org/pub/linux/utils/kernel/${PNAME}/' | lasttarball xz"
31
32 src_prepare()
33 {
34 munpack ${SRCFILE} || die
35
36 # fix failures with the testsuite on multilib systems
37 # see: http://www.spinics.net/lists/linux-modules/msg00800.html
38 mpatch ${PNAME}-11-fix32bits.patch || die
39 }
40
41 src_compile()
42 {
43 mconfigure --disable-debug --enable-tools --with-xz --with-zlib || die
44 mmake || die
45 }
46
47 src_install()
48 {
49 mmake DESTDIR=${BINDIR} install || die
50
51 # compat symlinks
52 minstalldir /usr/bin || die
53 minstalldir /usr/sbin || die
54 mlink kmod /usr/bin/lsmod || die
55 local i
56 for i in in {ins,rm,dep}mod mod{info,probe}
57 do
58 mlink ../bin/kmod /usr/sbin/${i} || die
59 done
60
61 minstalldocs COPYING NEWS README TODO || die
62 }
63
64 preinstall()
65 {
66 if [[ ! -z $(magequery -n module-init-tools) ]]
67 then
68 echo -e ${COLRED}
69 echo -e "Error: sys-apps/module-init-tools is installed!!"
70 echo -e "module-init-tools is now replaced by kmod and cannot be installed together."
71 echo -e "Please uninstall sys-apps/module-init-tools first!"
72 echo -e ${COLDEFAULT}
73 die "sys-apps/module-init-tools found!"
74 fi
75 }