Contents of /trunk/core/kmod/kmod-9-r2.smage2
Parent Directory | Revision Log
Revision 12763 -
(show annotations)
(download)
Mon Jul 2 19:52:54 2012 UTC (12 years, 2 months ago) by niro
File size: 1664 byte(s)
Mon Jul 2 19:52:54 2012 UTC (12 years, 2 months ago) by niro
File size: 1664 byte(s)
-fixed prog locations
1 | # $Id$ |
2 | |
3 | PNAME="kmod" |
4 | PVER="9" |
5 | PBUILD="r2" |
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="module-tools" |
17 | |
18 | SRCFILE="${PNAME}-${PVER}.tar.xz" |
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
20 | |
21 | sminclude mbuild mtools multilib |
22 | |
23 | SRC_URI=( |
24 | http://ftp.kernel.org/pub/linux/utils/kernel/${PNAME}/${SRCFILE} |
25 | mirror://${PNAME}/${SRCFILE} |
26 | mirror://${PNAME}/${PNAME}-${PVER}-fix32bits.patch |
27 | ) |
28 | |
29 | UP2DATE="updatecmd 'http://ftp.kernel.org/pub/linux/utils/kernel/${PNAME}/' | lasttarball xz" |
30 | |
31 | src_prepare() |
32 | { |
33 | munpack ${SRCFILE} || die |
34 | |
35 | # fix failures with the testsuite on multilib systems |
36 | # see: http://www.spinics.net/lists/linux-modules/msg00800.html |
37 | mpatch ${PNAME}-${PVER}-fix32bits.patch || die |
38 | } |
39 | |
40 | src_compile() |
41 | { |
42 | mconfigure --disable-debug --enable-tools --with-xz --with-zlib || die |
43 | mmake || die |
44 | } |
45 | |
46 | src_install() |
47 | { |
48 | mmake DESTDIR=${BINDIR} install || die |
49 | |
50 | # compat symlinks |
51 | minstalldir /usr/bin || die |
52 | minstalldir /usr/sbin || die |
53 | mlink kmod /usr/bin/lsmod || die |
54 | local i |
55 | for i in in {ins,rm,dep}mod mod{info,probe} |
56 | do |
57 | mlink ../bin/kmod /usr/sbin/${i} || die |
58 | done |
59 | |
60 | minstalldocs COPYING NEWS README TODO || die |
61 | } |
62 | |
63 | preinstall() |
64 | { |
65 | if [[ ! -z $(magequery -n module-init-tools) ]] |
66 | then |
67 | echo -e ${COLRED} |
68 | echo -e "Error: sys-apps/module-init-tools is installed!!" |
69 | echo -e "module-init-tools is now replaced by kmod and cannot be installed together." |
70 | echo -e "Please uninstall sys-apps/module-init-tools first!" |
71 | echo -e ${COLDEFAULT} |
72 | die "sys-apps/module-init-tools found!" |
73 | fi |
74 | } |