Magellan Linux

Contents of /trunk/core/kmod/kmod-5-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11177 - (show annotations) (download)
Sat Feb 18 03:40:31 2012 UTC (12 years, 3 months ago) by niro
File size: 1782 byte(s)
-added upstream patches to fix dracut issues
1 # $Id$
2
3 PNAME="kmod"
4 PVER="5"
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://packages.profusion.mobi/kmod/${SRCFILE}
25 mirror://${PNAME}/${SRCFILE}
26 mirror://${PNAME}/0001-libkmod-module-probe-Fix-ignore-loaded-flag-not-bein.patch
27 mirror://${PNAME}/0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.patch
28 )
29
30 UP2DATE="updatecmd 'http://packages.profusion.mobi/${PNAME}/?C=M;O=A' | lasttarball xz"
31
32 src_prepare()
33 {
34 munpack ${SRCFILE} || die
35
36 # upstream patches; fixes dracut issues
37 mpatch 0001-libkmod-module-probe-Fix-ignore-loaded-flag-not-bein.patch || die
38 mpatch 0001-libkmod-module-probe-fix-infinite-loop-with-softdeps.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 /bin || die
53 minstalldir /sbin || die
54 mlink ../usr/bin/kmod /bin/lsmod || die
55 local i
56 for i in in {ins,rm,dep}mod mod{info,probe}
57 do
58 mlink /usr/bin/kmod /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 }