Contents of /trunk/core/kmod/kmod-4-r1.smage2
Parent Directory | Revision Log
Revision 10186 -
(show annotations)
(download)
Thu Jan 19 13:20:21 2012 UTC (12 years, 8 months ago) by niro
File size: 1363 byte(s)
Thu Jan 19 13:20:21 2012 UTC (12 years, 8 months ago) by niro
File size: 1363 byte(s)
-deprecate module-init-tools
1 | # $Id$ |
2 | |
3 | PNAME="kmod" |
4 | PVER="4" |
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 | >= 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 multilib |
22 | |
23 | SRC_URI=( |
24 | http://packages.profusion.mobi/kmod/${SRCFILE} |
25 | mirror://${PNAME}/${SRCFILE} |
26 | ) |
27 | |
28 | UP2DATE="updatecmd 'http://packages.profusion.mobi/${PNAME}/?C=M;O=A' | lasttarball xz" |
29 | |
30 | src_compile() |
31 | { |
32 | mconfigure --disable-debug --enable-tools --with-xz --with-zlib || die |
33 | mmake || die |
34 | } |
35 | |
36 | src_install() |
37 | { |
38 | mmake DESTDIR=${BINDIR} install || die |
39 | |
40 | # compat symlinks |
41 | minstalldir /bin || die |
42 | minstalldir /sbin || die |
43 | mlink ../usr/bin/kmod /bin/lsmod || die |
44 | local i |
45 | for i in in {ins,rm,dep}mod mod{info,probe} |
46 | do |
47 | mlink /usr/bin/kmod /sbin/${i} || die |
48 | done |
49 | |
50 | minstalldocs COPYING NEWS README TODO || die |
51 | } |
52 | |
53 | preinstall() |
54 | { |
55 | if [[ ! -z $(magequery -n module-init-tools) ]] |
56 | then |
57 | echo -e ${COLRED} |
58 | echo -e "Error: sys-apps/module-init-tools is installed!!" |
59 | echo -e "module-init-tools is now replaced by kmod and cannot be installed together." |
60 | echo -e "Please uninstall sys-apps/module-init-tools first!" |
61 | echo -e ${COLDEFAULT} |
62 | die "sys-apps/module-init-tools found!" |
63 | fi |
64 | } |