Annotation of /trunk/todo/splashutils/splashutils-1.1.9.7-r1.smage2
Parent Directory | Revision Log
Revision 2 -
(hide annotations)
(download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 11 months ago) by niro
Original Path: trunk/extras/splashutils/splashutils-1.1.9.7-r1.smage2
File size: 6468 byte(s)
Fri Oct 10 13:29:42 2008 UTC (15 years, 11 months ago) by niro
Original Path: trunk/extras/splashutils/splashutils-1.1.9.7-r1.smage2
File size: 6468 byte(s)
import repo
1 | niro | 2 | # $Header: /magellan-cvs/smage/splashutils/splashutils-1.1.9.7-r1.smage2,v 1.3 2008/02/07 14:23:54 niro Exp $ |
2 | |||
3 | PNAME="splashutils" | ||
4 | PVER="1.1.9.7" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | PCATEGORIE="media-gfx" | ||
8 | STATE="testing" | ||
9 | |||
10 | DESCRIPTION="Splashutils from gentoo" | ||
11 | HOMEPAGE="http://dev.gentoo.org/~spock/projects/gensplash/" | ||
12 | |||
13 | DEPEND=">= media-libs/freetype-2 | ||
14 | >= media-libs/libpng-1.2.8 | ||
15 | >= media-libs/libjpeg-6b | ||
16 | >= sys-libs/zlib-1.1.4 | ||
17 | >= app-arch/cpio-2.5 | ||
18 | >= sys-apps/initscripts-0.3.2 | ||
19 | >= sys-apps/debianutils-2" | ||
20 | |||
21 | SDEPEND=">= virtual/kernel-sources" | ||
22 | |||
23 | # splashutils | ||
24 | SRCFILE="${PNAME}-lite-${PVER}.tar.bz2" | ||
25 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
26 | |||
27 | # miscsplashutils (fbtruetype) | ||
28 | MISC_VER=0.1.3 | ||
29 | SRCFILE_MISC="misc${PNAME}-${MISC_VER}.tar.bz2" | ||
30 | SRCDIR_MISC="${BUILDDIR}/misc${PNAME}-${MISC_VER}" | ||
31 | |||
32 | # initutils version | ||
33 | IUVER=0.2 | ||
34 | SRCFILE_UI="${PNAME}-magellan-${IUVER}.tar.gz" | ||
35 | SRCDIR_UI="${BUILDDIR}/${PNAME}-magellan" | ||
36 | |||
37 | # used klibc | ||
38 | KLIBC_VER="1.0.8" | ||
39 | KLIBC_SRCFILE="klibc-${KLIBC_VER}.tar.bz2" | ||
40 | |||
41 | # used libjpeg | ||
42 | LIBJPEG_VER="6b" | ||
43 | LIBJPEG_SRCFILE="jpegsrc.v${LIBJPEG_VER}.tar.gz" | ||
44 | |||
45 | # used libpng | ||
46 | LIBPNG_VER="1.2.8" | ||
47 | LIBPNG_SRCFILE="libpng-${LIBPNG_VER}.tar.bz2" | ||
48 | |||
49 | # used zlib | ||
50 | ZLIB_VER="1.2.1" | ||
51 | ZLIB_SRCFILE="zlib-${ZLIB_VER}.tar.bz2" | ||
52 | |||
53 | # used freetype | ||
54 | FREETYPE_VER="2.1.9" | ||
55 | FREETYPE_SRCFILE="freetype-${FREETYPE_VER}.tar.bz2" | ||
56 | |||
57 | SRC_URI=( | ||
58 | mirror://${PNAME}/${SRCFILE} | ||
59 | mirror://${PNAME}/${SRCFILE_MISC} | ||
60 | mirror://${PNAME}/${SRCFILE_UI} | ||
61 | mirror://${PNAME}/Theme-Linux-fbsplash.tar.bz2 | ||
62 | mirror://${PNAME}/Theme-magellan-040-fbsplash.tar.bz2 | ||
63 | mirror://klibc/${KLIBC_SRCFILE} | ||
64 | mirror://libjpeg/${LIBJPEG_SRCFILE} | ||
65 | mirror://libpng/${LIBPNG_SRCFILE} | ||
66 | mirror://zlib/${ZLIB_SRCFILE} | ||
67 | mirror://freetype/${FREETYPE_SRCFILE} | ||
68 | ) | ||
69 | |||
70 | # blocks: bootsplash | ||
71 | |||
72 | # global var: ${LINUX_SOURCES} | ||
73 | # location where they are | ||
74 | [ -z "${LINUX_SOURCES}" ] && LINUX_SOURCES="/usr/src/linux" | ||
75 | |||
76 | src_prepare() { | ||
77 | munpack ${SRCFILE} || die | ||
78 | munpack ${SRCFILE_MISC} || die | ||
79 | munpack ${SRCFILE_UI} || die | ||
80 | munpack ${KLIBC_SRCFILE} ${SRCDIR}/libs || die | ||
81 | munpack ${LIBJPEG_SRCFILE} ${SRCDIR}/libs || die | ||
82 | munpack ${LIBPNG_SRCFILE} ${SRCDIR}/libs || die | ||
83 | munpack ${ZLIB_SRCFILE} ${SRCDIR}/libs || die | ||
84 | munpack ${FREETYPE_SRCFILE} ${SRCDIR}/libs || die | ||
85 | cd ${SRCDIR} | ||
86 | |||
87 | if [ ! -e /usr/src/linux/include/linux/console_splash.h ] | ||
88 | then | ||
89 | echo "Failure:" | ||
90 | echo "fbsplash was not found in your kernel." | ||
91 | echo "Please give a location to your patched kernel:" | ||
92 | echo " LINUX_SOURCES=/usr/src/linux-fbsplash smage2 smage-file" | ||
93 | echo | ||
94 | die "aborted." | ||
95 | fi | ||
96 | |||
97 | # where are our linux sources ? | ||
98 | echo "Using '${LINUX_SOURCES}' as kernel-tree ..." | ||
99 | ln -s "${LINUX_SOURCES}" linux || die | ||
100 | |||
101 | # link klibc | ||
102 | ln -s ../../linux ${SRCDIR}/libs/klibc-${KLIBC_VER}/linux || die | ||
103 | |||
104 | # let the makefile to be rebuilt to prevent segfault in the splash_helper | ||
105 | rm ${SRCDIR}/libs/zlib-${ZLIB_VER}/Makefile || die | ||
106 | |||
107 | install -d ${SRCDIR}/kernel || die | ||
108 | |||
109 | # use tty16 as the default silent tty | ||
110 | sed -i -e 's/#define TTY_SILENT.*/#define TTY_SILENT 16/' ${SRCDIR}/splash.h || die | ||
111 | |||
112 | # setup the kernel object directory | ||
113 | echo "KRNLOBJ = ${LINUX_SOURCES}" >> ${SRCDIR}/libs/klibc-${KLIBC_VER}/MCONFIG || die | ||
114 | |||
115 | # force use of our cflags | ||
116 | sed -i -e "s/^CFLAGS[ \t]*=.*/CFLAGS = ${CFLAGS}/" Makefile || die | ||
117 | } | ||
118 | |||
119 | src_compile() { | ||
120 | # splashutils | ||
121 | cd ${SRCDIR} | ||
122 | mmake -j1 MISCINCS="-I${LINUX_SOURCES}/include" || die # does not like more than one job | ||
123 | |||
124 | # miscsplashutils (fbtruetype) | ||
125 | cd ${SRCDIR_MISC} | ||
126 | mmake || die | ||
127 | } | ||
128 | |||
129 | src_install() { | ||
130 | cd ${SRCDIR} | ||
131 | |||
132 | # needed directories | ||
133 | install -d ${BINDIR}/etc/{conf.d,env.d,rc.d/init.d,splash} || die | ||
134 | install -d ${BINDIR}/lib/splash/{tmp,cache,bin} || die | ||
135 | install -d ${BINDIR}/usr/share/${PNAME} || die | ||
136 | |||
137 | # splashutils | ||
138 | cd ${SRCDIR} | ||
139 | make DESTDIR=${BINDIR} install || die | ||
140 | |||
141 | # miscsplashutils (fbtruetype) | ||
142 | cd ${SRCDIR_MISC} | ||
143 | make DESTDIR=${BINDIR} install || die | ||
144 | |||
145 | touch ${BINDIR}/lib/splash/{tmp,cache,bin}/.keep || die | ||
146 | ln -snf /lib/splash/bin/fbres ${BINDIR}/sbin/fbres || die | ||
147 | |||
148 | # environment; don't want /etc/splash protected | ||
149 | echo 'CONFIG_PROTECT_MASK="/etc/splash"' > ${BINDIR}/etc/env.d/99splash || die | ||
150 | |||
151 | # installing our modified splash init utils | ||
152 | |||
153 | # splash wrapper | ||
154 | install -m 0755 -o root -g root ${SRCDIR_UI}/splash \ | ||
155 | ${BINDIR}/sbin/splash || die | ||
156 | |||
157 | # splash init functions | ||
158 | install -m 0644 ${SRCDIR_UI}/splash-functions \ | ||
159 | ${BINDIR}/etc/rc.d/init.d/splash-functions || die | ||
160 | |||
161 | # conf files | ||
162 | install -m0644 ${SRCDIR_UI}/splash.conf \ | ||
163 | ${BINDIR}/etc/conf.d/splash || die | ||
164 | |||
165 | # init scripts | ||
166 | install -m0755 -o root -g root ${SRCDIR_UI}/init-splash \ | ||
167 | ${BINDIR}/etc/rc.d/init.d/splash || die | ||
168 | |||
169 | # default initrd | ||
170 | #install -m 0644 ${SRCDIR_UI}/initrd.splash ${BINDIR}/usr/share/${PNAME} || die | ||
171 | |||
172 | # default font | ||
173 | install -m 0644 ${SRCDIR_MISC}/fbtruetype/luxisri.ttf ${BINDIR}/etc/splash || die | ||
174 | |||
175 | |||
176 | # installing some default themes | ||
177 | tar xvjf ${SOURCEDIR}/${PNAME}/Theme-Linux-fbsplash.tar.bz2 \ | ||
178 | -C ${BINDIR}/etc/splash || die | ||
179 | |||
180 | tar xvjf ${SOURCEDIR}/${PNAME}/Theme-magellan-040-fbsplash.tar.bz2 \ | ||
181 | -C ${BINDIR}/etc/splash || die | ||
182 | |||
183 | ln -snf ./magellan-040 ${BINDIR}/etc/splash/default || die | ||
184 | |||
185 | # docs | ||
186 | cd ${SRCDIR} | ||
187 | minstalldocs AUTHORS COPYING README || die | ||
188 | minstalldocs docs/* || die | ||
189 | } | ||
190 | |||
191 | postinstall() { | ||
192 | echo | ||
193 | echo "Checking whether /dev/tty1 is in place" | ||
194 | local my_tmp="$(mktemp -d)" | ||
195 | mount --bind ${MROOT}/ ${my_tmp} | ||
196 | |||
197 | if [[ ! -c ${mytmp}/dev/tty1 ]] | ||
198 | then | ||
199 | echo "It appears that the /dev/tty1 character device doesn't exist" | ||
200 | echo "the root filesystem. This will prevent the silent mode from working" | ||
201 | echo "properly. I will create a new one for you now." | ||
202 | echo | ||
203 | mknod ${mytmp}/dev/tty1 c 4 1 | ||
204 | fi | ||
205 | umount ${my_tmp} | ||
206 | |||
207 | echo | ||
208 | echo "To use the fbsplash feature you must do following steps:" | ||
209 | echo | ||
210 | echo " 1. mount /boot" | ||
211 | echo " 2. create a initramfs image with your favorite splash:" | ||
212 | echo -e " splash_geninitramfs -v -g /boot/1024-default \\" | ||
213 | echo " -r 1024x768 default" | ||
214 | echo " 3. add /etc/init.d/splash to your runlevels:" | ||
215 | echo " rc-config add splash" | ||
216 | echo " 4. edit your grub.conf:" | ||
217 | echo " nano -w /boot/grub/grub.conf" | ||
218 | echo | ||
219 | echo " and modify it like this:" | ||
220 | echo " title Magellan Linux with splash" | ||
221 | echo " root (hd0,0)" | ||
222 | echo -e " kernel (hd0,0)/bzImage root=/dev/hda3 \\" | ||
223 | echo -e " video=vesafb:ywrap,pmipal,1024x768-32@60 \\" | ||
224 | echo -e " splash=silent,fadein,theme:default \\" | ||
225 | echo -e " quiet CONSOLE=/dev/tty1" | ||
226 | echo " initrd /boot/1024-default" | ||
227 | echo | ||
228 | echo " save and exit, reboot ... that's it." | ||
229 | echo | ||
230 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |