Contents of /smage/branches/alx-0_6_0/core/mkinitrd/mkinitrd-6.3.5-r5.smage2
Parent Directory | Revision Log
Revision 3530 -
(show annotations)
(download)
Mon Apr 23 13:24:51 2012 UTC (12 years, 1 month ago) by niro
File size: 2917 byte(s)
Mon Apr 23 13:24:51 2012 UTC (12 years, 1 month ago) by niro
File size: 2917 byte(s)
-removed patch which is included in the fix-dev-handling patch and added variable-sysroot-and-substition-fix patch
1 | # $Id$ |
2 | |
3 | PNAME="mkinitrd" |
4 | PVER="6.3.5" |
5 | PBUILD="r5" |
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}-add-linurc-symlink-to-sysroot.patch |
41 | mirror://${PNAME}/${PNAME}-${PVER}-klibc-1.5.22.patch |
42 | mirror://${PNAME}/${PNAME}-${PVER}-variable-sysroot-and-substition-fix.patch |
43 | ) |
44 | |
45 | src_prepare() |
46 | { |
47 | munpack ${SRCFILE} || die |
48 | cd ${SRCDIR} |
49 | |
50 | # no need to link against glib2 - removed in later versions |
51 | mpatch ${PNAME}-${PVER}-no-glib2-dep.patch || die |
52 | |
53 | # respect rootdelay given in cmdline and mount devtmpfs in sysroot before switch-root if supported |
54 | mpatch ${PNAME}-${PVER}-respect-rootdelay-and-mount-devtmpfs-in-sysroot-if-supported.patch || die |
55 | |
56 | # fix broken devtmpfs handling of prior patch and only mount dev if really needed |
57 | # do not umount initrds dev,proc,sys but mount move it to real sysroot |
58 | mpatch ${PNAME}-${PVER}-fix-dev-handling.patch || die |
59 | |
60 | # update klibc to 1.5.22 |
61 | mpatch ${PNAME}-${PVER}-klibc-1.5.22.patch || die |
62 | |
63 | # support variable sysroot and fixed variable substitution while linking cloop mount dirs |
64 | mpatch ${PNAME}-${PVER}-variable-sysroot-and-substition-fix.patch || die |
65 | |
66 | # enable scsi,sata and pata checks for 2.6.29 as default |
67 | sed -i -e "s:^\(DOSCSI=\).*:\1yes:" \ |
68 | -e "s:^\(DOSATA=\).*:\1yes:" \ |
69 | -e "s:^\(DOPATA=\).*:\1yes:" \ |
70 | livecd/linuxrc.sh || die |
71 | |
72 | # fix version, we want ${PVER}-${PBUILD} |
73 | echo "${PVER}-${PBUILD}" > VERSION || die |
74 | |
75 | # fix libdir on 64bit arches |
76 | sed -i "s:^\(LIBDIR =\).*:\1 /usr/$(mlibdir):" livecd/Makefile || die |
77 | sed -i "s:^\(LIBDIR.*=\).*:\1 /usr/$(mlibdir)/mkinitrd:" isolinux/Makefile || die |
78 | } |
79 | |
80 | src_compile() |
81 | { |
82 | cd ${SRCDIR} |
83 | mmake -j1 ARCH=${ARCH/i*86/i386} || die |
84 | } |
85 | |
86 | preinstall() |
87 | { |
88 | add_conf_prot_ignore /etc/conf.d/mkinitrd |
89 | } |
90 | |
91 | postinstall() |
92 | { |
93 | # re-create initrd |
94 | mount /boot &> /dev/null |
95 | kv="$(readlink /boot/initrd | sed -e 's:initrd-::' -e 's:.img::')" |
96 | if [ -d /lib/modules/${kv} ] |
97 | then |
98 | mkinitrd -f /boot/initrd-"${kv}".img "${kv}" |
99 | else |
100 | echo "Warning: modules dir /lib/modules/${kv} does not exist!" |
101 | fi |
102 | } |