Contents of /smage/trunk/core/kmod/kmod-18-r1.smage2
Parent Directory | Revision Log
Revision 5707 -
(show annotations)
(download)
Thu Jul 3 13:33:19 2014 UTC (10 years, 2 months ago) by niro
File size: 1597 byte(s)
Thu Jul 3 13:33:19 2014 UTC (10 years, 2 months ago) by niro
File size: 1597 byte(s)
auto added: ver bump to 18-r1
1 | # $Id$ |
2 | |
3 | PNAME="kmod" |
4 | PVER="18" |
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="virtual/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/modinfo |
29 | usr/sbin/rmmod" |
30 | sminclude mbuild mtools multilib alx-split |
31 | |
32 | SRC_URI=( |
33 | http://ftp.kernel.org/pub/linux/utils/kernel/${PNAME}/${SRCFILE} |
34 | mirror://${PNAME}/${SRCFILE} |
35 | ) |
36 | |
37 | UP2DATE="updatecmd 'http://ftp.kernel.org/pub/linux/utils/kernel/${PNAME}/' | lasttarball xz" |
38 | |
39 | src_compile() |
40 | { |
41 | mconfigure --disable-debug --enable-tools --without-xz --with-zlib || die |
42 | mmake || die |
43 | } |
44 | |
45 | alx_generic_src_install() |
46 | { |
47 | mmake DESTDIR=${BINDIR} install || die |
48 | |
49 | # compat symlinks |
50 | minstalldir /usr/bin || die |
51 | minstalldir /usr/sbin || die |
52 | mlink kmod /usr/bin/lsmod || die |
53 | local i |
54 | for i in in {ins,rm,dep}mod mod{info,probe} |
55 | do |
56 | mlink ../bin/kmod /usr/sbin/${i} || die |
57 | done |
58 | |
59 | minstalldocs COPYING NEWS README TODO || die |
60 | } |
61 | |
62 | preinstall() |
63 | { |
64 | if [[ ! -z $(magequery -n module-init-tools) ]] |
65 | then |
66 | echo -e ${COLRED} |
67 | echo -e "Error: sys-apps/module-init-tools is installed!!" |
68 | echo -e "module-init-tools is now replaced by kmod and cannot be installed together." |
69 | echo -e "Please uninstall sys-apps/module-init-tools first!" |
70 | echo -e ${COLDEFAULT} |
71 | die "sys-apps/module-init-tools found!" |
72 | fi |
73 | } |