Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4087 - (show annotations) (download)
Wed Nov 7 08:37:42 2012 UTC (11 years, 7 months ago) by niro
File size: 1571 byte(s)
-removed deprecated patches
1 # $Id$
2
3 PNAME="kmod"
4 PVER="10"
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 )
35
36 UP2DATE="updatecmd 'http://ftp.kernel.org/pub/linux/utils/kernel/${PNAME}/' | lasttarball xz"
37
38 src_compile()
39 {
40 mconfigure --disable-debug --enable-tools --without-xz --with-zlib || die
41 mmake || die
42 }
43
44 alx_generic_src_install()
45 {
46 mmake DESTDIR=${BINDIR} install || die
47
48 # compat symlinks
49 minstalldir /usr/bin || die
50 minstalldir /usr/sbin || die
51 mlink kmod /usr/bin/lsmod || die
52 local i
53 for i in in {ins,rm,dep}mod mod{info,probe}
54 do
55 mlink ../bin/kmod /usr/sbin/${i} || die
56 done
57
58 minstalldocs COPYING NEWS README TODO || die
59 }
60
61 preinstall()
62 {
63 if [[ ! -z $(magequery -n module-init-tools) ]]
64 then
65 echo -e ${COLRED}
66 echo -e "Error: sys-apps/module-init-tools is installed!!"
67 echo -e "module-init-tools is now replaced by kmod and cannot be installed together."
68 echo -e "Please uninstall sys-apps/module-init-tools first!"
69 echo -e ${COLDEFAULT}
70 die "sys-apps/module-init-tools found!"
71 fi
72 }