Magellan Linux

Contents of /trunk/core/kmod/kmod-9-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12753 - (show annotations) (download)
Mon Jul 2 14:37:15 2012 UTC (11 years, 10 months ago) by niro
File size: 1615 byte(s)
-marked unstable
1 # $Id$
2
3 PNAME="kmod"
4 PVER="9"
5 PBUILD="r1"
6
7 PCAT="sys-apps"
8 STATE="unstable"
9
10 DESCRIPTION="Library and tools for managing linux kernel-modules."
11 HOMEPAGE="http://git.profusion.mobi/cgit.cgi/kmod.git"
12
13 DEPEND=">= virtual/glibc
14 >= app-arch/xz-utils-5
15 >= sys-libs/zlib-1.2.5"
16
17 PROVIDE="module-tools"
18
19 SRCFILE="${PNAME}-${PVER}.tar.xz"
20 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
21
22 sminclude mbuild mtools multilib
23
24 SRC_URI=(
25 http://ftp.kernel.org/pub/linux/utils/kernel/${PNAME}/${SRCFILE}
26 mirror://${PNAME}/${SRCFILE}
27 mirror://${PNAME}/${PNAME}-${PVER}-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}-${PVER}-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 local i
54 for i in in {ins,rm,dep}mod mod{info,probe} lsmod
55 do
56 mlink kmod /usr/bin/${i} || die
57 done
58
59 minstalldocs COPYING NEWS README TODO || die
60 }
61
62 preinstall()
63 {
64 if [[ ! -z $(magequery -n module-init-tools) ]]
65 then
66 echo -e ${COLRED}
67 echo -e "Error: sys-apps/module-init-tools is installed!!"
68 echo -e "module-init-tools is now replaced by kmod and cannot be installed together."
69 echo -e "Please uninstall sys-apps/module-init-tools first!"
70 echo -e ${COLDEFAULT}
71 die "sys-apps/module-init-tools found!"
72 fi
73 }