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