Contents of /smage/branches/alx-0_6_0/core/mkinitrd/mkinitrd-6.3.5-r8.smage2
Parent Directory | Revision Log
Revision 4858 -
(show annotations)
(download)
Wed May 15 07:40:29 2013 UTC (11 years, 4 months ago) by niro
File size: 3408 byte(s)
Wed May 15 07:40:29 2013 UTC (11 years, 4 months ago) by niro
File size: 3408 byte(s)
-remove i810fb module from mkinitrd config via postinstall()
1 | # $Id$ |
2 | |
3 | PNAME="mkinitrd" |
4 | PVER="6.3.5" |
5 | PBUILD="r8" |
6 | |
7 | PCATEGORIE="sys-apps" |
8 | |
9 | DESCRIPTION="Mkinitrd creates filesystem images for use as initial ramdisk (initrd) images." |
10 | HOMEPAGE="http://magellan-linux.de/" |
11 | |
12 | DEPEND=">= sys-apps/gawk-3 |
13 | >= virtual/which |
14 | >= virtual/debianutils |
15 | >= sys-apps/module-init-tools-3.12 |
16 | >= app-arch/cpio-2 |
17 | >= virtual/gzip |
18 | >= sys-fs/e2fsprogs-1.41 |
19 | >= dev-libs/popt-1.16 |
20 | >= sys-apps/util-linux-2.19 |
21 | >= sys-apps/v86d-0.1.10" |
22 | |
23 | # nasm is needed to rebuild syslinux |
24 | SDEPEND=">= virtual/kernel-sources |
25 | >= sys-apps/findutils-4 |
26 | >= virtual/sed |
27 | >= dev-lang/nasm-2" |
28 | |
29 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
30 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
31 | |
32 | REMOVE_DEPRECATED_MAGE_TARGETS=1 |
33 | ALX_ONLY_KEEP="sbin usr/sbin usr/$(mlibdir)/mkinitrd etc/conf.d/mkinitrd" |
34 | sminclude mbuild alx-split |
35 | |
36 | SRC_URI=( |
37 | mirror://${PNAME}/${SRCFILE} |
38 | mirror://${PNAME}/${PNAME}-${PVER}-no-glib2-dep.patch |
39 | mirror://${PNAME}/${PNAME}-${PVER}-respect-rootdelay-and-mount-devtmpfs-in-sysroot-if-supported.patch |
40 | mirror://${PNAME}/${PNAME}-${PVER}-fix-dev-handling.patch |
41 | mirror://${PNAME}/${PNAME}-${PVER}-klibc-1.5.22.patch |
42 | mirror://${PNAME}/${PNAME}-${PVER}-variable-sysroot-and-substition-fix.patch |
43 | mirror://${PNAME}/${PNAME}-${PVER}-include-firmware.patch |
44 | ) |
45 | |
46 | src_prepare() |
47 | { |
48 | munpack ${SRCFILE} || die |
49 | cd ${SRCDIR} |
50 | |
51 | # no need to link against glib2 - removed in later versions |
52 | mpatch ${PNAME}-${PVER}-no-glib2-dep.patch || die |
53 | |
54 | # respect rootdelay given in cmdline and mount devtmpfs in sysroot before switch-root if supported |
55 | mpatch ${PNAME}-${PVER}-respect-rootdelay-and-mount-devtmpfs-in-sysroot-if-supported.patch || die |
56 | |
57 | # fix broken devtmpfs handling of prior patch and only mount dev if really needed |
58 | # do not umount initrds dev,proc,sys but mount move it to real sysroot |
59 | mpatch ${PNAME}-${PVER}-fix-dev-handling.patch || die |
60 | |
61 | # update klibc to 1.5.22 |
62 | mpatch ${PNAME}-${PVER}-klibc-1.5.22.patch || die |
63 | |
64 | # support variable sysroot and fixed variable substitution while linking cloop mount dirs |
65 | mpatch ${PNAME}-${PVER}-variable-sysroot-and-substition-fix.patch || die |
66 | |
67 | # include required firmware blobs in initrd |
68 | mpatch ${PNAME}-${PVER}-include-firmware.patch || die |
69 | |
70 | # enable scsi,sata and pata checks for 2.6.29 as default |
71 | sed -i -e "s:^\(DOSCSI=\).*:\1yes:" \ |
72 | -e "s:^\(DOSATA=\).*:\1yes:" \ |
73 | -e "s:^\(DOPATA=\).*:\1yes:" \ |
74 | livecd/linuxrc.sh || die |
75 | |
76 | # fix version, we want ${PVER}-${PBUILD} |
77 | echo "${PVER}-${PBUILD}" > VERSION || die |
78 | |
79 | # fix libdir on 64bit arches |
80 | sed -i "s:^\(LIBDIR =\).*:\1 /usr/$(mlibdir):" livecd/Makefile || die |
81 | sed -i "s:^\(LIBDIR.*=\).*:\1 /usr/$(mlibdir)/mkinitrd:" isolinux/Makefile || die |
82 | |
83 | # only load supported fb-drivers with dofb |
84 | : > livecd/modules.framebuffer || die |
85 | local mod |
86 | for mod in i915 mga nouveau r128 radeon savage sis tdfx ttm via uvesafb |
87 | do |
88 | echo "${mod}" >> livecd/modules.framebuffer || die |
89 | done |
90 | } |
91 | |
92 | src_compile() |
93 | { |
94 | cd ${SRCDIR} |
95 | mmake -j1 ARCH=${ARCH/i*86/i386} || die |
96 | } |
97 | |
98 | preinstall() |
99 | { |
100 | add_conf_prot_ignore /etc/conf.d/mkinitrd |
101 | } |
102 | |
103 | postinstall() |
104 | { |
105 | if [ -f /etc/conf.d/mkinitrd ] |
106 | then |
107 | # remove i810fb drivers |
108 | sed -i 's:i810fb::g' /etc/conf.d/mkinitrd |
109 | fi |
110 | |
111 | # re-create initrd |
112 | mount /boot &> /dev/null |
113 | kv="$(readlink /boot/initrd | sed -e 's:initrd-::' -e 's:.img::')" |
114 | if [ -d /lib/modules/${kv} ] |
115 | then |
116 | mkinitrd -f /boot/initrd-"${kv}".img "${kv}" |
117 | else |
118 | echo "Warning: modules dir /lib/modules/${kv} does not exist!" |
119 | fi |
120 | } |