Contents of /smage/trunk/core/dracut/dracut-024-r1.smage2
Parent Directory | Revision Log
Revision 4327 -
(show annotations)
(download)
Thu Nov 15 08:12:01 2012 UTC (11 years, 6 months ago) by niro
File size: 5309 byte(s)
Thu Nov 15 08:12:01 2012 UTC (11 years, 6 months ago) by niro
File size: 5309 byte(s)
-added missing asciidoc depdencencies
1 | # $Id$ |
2 | |
3 | PNAME="dracut" |
4 | PVER="024" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="sys-apps" |
8 | |
9 | DESCRIPTION="Initramfs generator using udev which fully replaces mkinitrd." |
10 | HOMEPAGE="https://dracut.wiki.kernel.org/" |
11 | |
12 | # sysvinit support for compatibility reasons |
13 | # 1=yes, 0=no |
14 | SYSVINIT_SUPPORT=0 |
15 | |
16 | DEPEND=">= app-shells/bash-4.2 |
17 | >= virtual/bzip2 |
18 | >= virtual/gzip |
19 | >= virtual/xz-utils |
20 | >= app-arch/cpio-2.11 |
21 | >= virtual/tar |
22 | >= sys-apps/coreutils-8.12 |
23 | >= sys-apps/findutils-4.4 |
24 | >= virtual/grep |
25 | >= virtual/kbd |
26 | >= virtual/module-tools |
27 | >= virtual/sed |
28 | >= virtual/eject |
29 | >= sys-apps/util-linux-2.19 |
30 | >= sys-apps/v86d-0.1.9 |
31 | >= sys-apps/plymouth-0.8.5 |
32 | >= sys-apps/grubby-8 |
33 | >= sys-fs/udev-171 |
34 | >= virtual/sysvinit |
35 | >= virtual/sysvinit-tools" |
36 | |
37 | PROVIDE="virtual/initramfs-tools" |
38 | |
39 | SDEPEND=">= app-text/docbook-xml-dtd-9 |
40 | >= app-shells/dash-0.5.6.1 |
41 | >= app-text/docbook-xml-dtd-9 |
42 | >= app-text/asciidoc-8.6" |
43 | |
44 | SRCFILE="${PNAME}-${PVER}.tar.bz2" |
45 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
46 | |
47 | ALX_PKG_KEEP="etc/dracut.conf |
48 | etc/dracut.conf.d |
49 | etc/logrotate.d/dracut |
50 | usr/lib/dracut/dracut-logger.sh |
51 | usr/lib/dracut/dracut-functions |
52 | usr/lib/dracut/dracut-functions.sh |
53 | usr/lib/dracut/dracut-initramfs-restore |
54 | usr/lib/dracut/dracut-version.sh |
55 | usr/lib/dracut/modules.d/00dash |
56 | usr/lib/dracut/modules.d/05busybox |
57 | usr/lib/dracut/modules.d/10i18n |
58 | usr/lib/dracut/modules.d/30convertfs |
59 | usr/lib/dracut/modules.d/40uvesafb |
60 | usr/lib/dracut/modules.d/45url-lib |
61 | usr/lib/dracut/modules.d/50plymouth |
62 | usr/lib/dracut/modules.d/90dm |
63 | usr/lib/dracut/modules.d/90dmsquash-live |
64 | usr/lib/dracut/modules.d/90dmraid |
65 | usr/lib/dracut/modules.d/90kernel-modules |
66 | usr/lib/dracut/modules.d/90mdraid |
67 | usr/lib/dracut/modules.d/90multipath |
68 | usr/lib/dracut/modules.d/95dasd |
69 | usr/lib/dracut/modules.d/95dasd_mod |
70 | usr/lib/dracut/modules.d/95fstab-sys |
71 | usr/lib/dracut/modules.d/95resume |
72 | usr/lib/dracut/modules.d/95rootfs-block |
73 | usr/lib/dracut/modules.d/95terminfo |
74 | usr/lib/dracut/modules.d/95udev-rules |
75 | usr/lib/dracut/modules.d/97biosdevname |
76 | usr/lib/dracut/modules.d/98pollcdrom |
77 | usr/lib/dracut/modules.d/98syslog |
78 | usr/lib/dracut/modules.d/98usrmount |
79 | usr/lib/dracut/modules.d/99base |
80 | usr/lib/dracut/modules.d/99fs-lib |
81 | usr/lib/dracut/modules.d/99img-lib |
82 | usr/lib/dracut/modules.d/99shutdown |
83 | usr/bin/dracut |
84 | usr/bin/dracut-catimages |
85 | usr/bin/lsinitrd |
86 | usr/bin/mkinitrd |
87 | var/initramfs |
88 | var/log/dracut.log" |
89 | sminclude mbuild mtools cleanutils alx-split |
90 | msetfeature "!check" |
91 | |
92 | SRC_URI=( |
93 | http://www.kernel.org/pub/linux/utils/boot/${PNAME}/${SRCFILE} |
94 | mirror://${PNAME}/${SRCFILE} |
95 | mirror://${PNAME}/${PNAME}-${PVER}-magellan.patch |
96 | mirror://${PNAME}/${PNAME}-${PVER}-add-uvesafb-module.patch |
97 | mirror://${PNAME}/${PNAME}-023-mkinitrd-ignore-allow-missing-switch-2.patch |
98 | mirror://${PNAME}/${PNAME}-019-convertfs-make-selinux-optional.patch |
99 | mirror://${PNAME}/${PNAME}-${PVER}-busybox-compat.patch |
100 | ) |
101 | |
102 | UP2DATE="updatecmd http://www.kernel.org/pub/linux/utils/boot/${PNAME} | lasttarball" |
103 | |
104 | src_prepare() |
105 | { |
106 | munpack ${SRCFILE} || die |
107 | cd ${SRCDIR} |
108 | |
109 | # magellan compat patch |
110 | mpatch ${PNAME}-${PVER}-magellan.patch || die |
111 | |
112 | # add uvesafb module to run v86d inside the initrd (default off) |
113 | mpatch ${PNAME}-${PVER}-add-uvesafb-module.patch || die |
114 | |
115 | # for better mkinitrd compat and to fully support new-kernel-pkg |
116 | # as drop-in replacement ignore the --allow-missing switch |
117 | mpatch ${PNAME}-023-mkinitrd-ignore-allow-missing-switch-2.patch || die |
118 | |
119 | # make selinux optional, we do not use it yet |
120 | mpatch ${PNAME}-019-convertfs-make-selinux-optional.patch || die |
121 | |
122 | # be compatible with busybox cmds |
123 | mpatch ${PNAME}-${PVER}-busybox-compat.patch || die |
124 | |
125 | # remove gentoo specific modules |
126 | rm -rf modules.d/50gensplash || die |
127 | # remove rpm-bases specific modules |
128 | rm -rf modules.d/10rpmversion || die |
129 | |
130 | # fix plymouth libexecdir |
131 | sed -i "s:/usr/libexec:/usr/$(mlibdir)/plymouth:" \ |
132 | modules.d/50plymouth/module-setup.sh || die |
133 | |
134 | # fix plymouth logo |
135 | local plymouth_logo=/usr/share/plymouth/magellan-logo.png |
136 | sed -i "s:^\(PLYMOUTH_LOGO_FILE=\).*:\1\"${plymouth_logo}\":" \ |
137 | modules.d/50plymouth/plymouth-populate-initrd.sh || die |
138 | |
139 | # fix qemu libexecdir |
140 | sed -i "s:/usr/libexec:/usr/$(mlibdir)/qemu:" test/run-qemu || die |
141 | } |
142 | |
143 | src_compile() |
144 | { |
145 | cd ${SRCDIR} |
146 | mmake || die |
147 | } |
148 | |
149 | alx_generic_src_install() |
150 | { |
151 | cd ${SRCDIR} |
152 | mmake DESTDIR=${BINDIR} sysconfdir=/etc sbindir=/usr/bin systemdsystemunitdir=/usr/lib/systemd/system install || die |
153 | |
154 | # needed directories |
155 | mkeepdir /var/initramfs || die |
156 | mkeepdir /var/log || die |
157 | memptyfile /var/log/dracut.log || die |
158 | |
159 | # missing compat symlink |
160 | mlink dracut /usr/bin/mkinitrd || die |
161 | |
162 | minstalldocs AUTHORS COPYING HACKING NEWS README* TODO || die |
163 | |
164 | # install busybox-rc compatible config and remove upstream systemd one |
165 | echo -e ${COLGREEN}" injecting custom dracut-configs"${COLDEFAULT} |
166 | if [ -f ${BINDIR}/etc/dracut.conf.d/01-magellan.conf ] |
167 | then |
168 | mdelete /etc/dracut.conf.d/01-magellan.conf || die |
169 | fi |
170 | mcinjectfile 01-alx.conf /etc/dracut.conf.d || die |
171 | } |
172 | |
173 | preinstall() |
174 | { |
175 | if [[ ! -z $(magequery -n mkinitrd) ]] |
176 | then |
177 | echo -e ${COLRED} |
178 | echo -e "Error: sys-apps/mkinitrd is installed!!" |
179 | echo -e "dracut will overwrite binaries from sys-apps/mkinitrd and fully replace it." |
180 | echo -e "Please uninstall sys-apps/mkinitrd first!" |
181 | echo -e ${COLDEFAULT} |
182 | die "sys-apps/mkinitrd found!" |
183 | fi |
184 | |
185 | add_conf_prot_mask /etc/dracut.conf /etc/dracut.conf.d |
186 | } |