Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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