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