1 |
#!/bin/sh -e |
---|
2 |
|
---|
3 |
set -e |
---|
4 |
|
---|
5 |
D=${PWD} |
---|
6 |
D_PREFIX="/raid0/data/module/MEDIATOMB/system" |
---|
7 |
|
---|
8 |
rm -rf tmp |
---|
9 |
|
---|
10 |
mkdir tmp |
---|
11 |
mkdir tmp/build |
---|
12 |
mkdir tmp/install |
---|
13 |
mkdir tmp/install/bin |
---|
14 |
mkdir tmp/install/lib |
---|
15 |
mkdir tmp/install/lib/pkgconfig/ |
---|
16 |
mkdir tmp/install/include |
---|
17 |
pushd tmp/build |
---|
18 |
|
---|
19 |
export CFLAGS="-O2 -g -march=i686 -mcpu=i686" |
---|
20 |
|
---|
21 |
# libjs |
---|
22 |
tar xvfz ${D}/sources/js-1.5.tar.gz |
---|
23 |
pushd js/src |
---|
24 |
gmake -f Makefile.ref BUILD_OPT=1 |
---|
25 |
install -D -m 755 Linux_All_OPT.OBJ/libjs.so ${D}/tmp/install/lib/libjs.so |
---|
26 |
install -D -m 755 Linux_All_OPT.OBJ/jsautocfg.h ${D}/tmp/install/include/js/jsautocfg.h |
---|
27 |
for f in *.h; do |
---|
28 |
install -D -m 644 $f ${D}/tmp/install/include/js/$f |
---|
29 |
done |
---|
30 |
popd |
---|
31 |
|
---|
32 |
# libmagic |
---|
33 |
tar xvfz ${D}/sources/file-5.04.tar.gz |
---|
34 |
pushd file-5.04 |
---|
35 |
./configure --prefix=${D_PREFIX} |
---|
36 |
make |
---|
37 |
install -D -m 755 src/.libs/file ${D}/tmp/install/bin/file |
---|
38 |
install -D -m 644 magic/magic.mgc ${D}/tmp/install/share/misc/magic.mgc |
---|
39 |
install -D -m 644 src/magic.h ${D}/tmp/install/include/magic.h |
---|
40 |
install -D -m 755 src/.libs/libmagic.so.1.0.0 ${D}/tmp/install/lib/libmagic.so.1.0.0 |
---|
41 |
ln -sf libmagic.so.1.0.0 ${D}/tmp/install/lib/libmagic.so.1 |
---|
42 |
ln -sf libmagic.so.1.0.0 ${D}/tmp/install/lib/libmagic.so |
---|
43 |
popd |
---|
44 |
|
---|
45 |
# taglib |
---|
46 |
tar xvfz ${D}/sources/taglib-1.6.3.tar.gz |
---|
47 |
pushd taglib-1.6.3 |
---|
48 |
./configure |
---|
49 |
make |
---|
50 |
install -D -m 755 taglib/.libs/libtag.so.1.9.0 ${D}/tmp/install/lib/libtag.so.1.9.0 |
---|
51 |
ln -sf libtag.so.1.9.0 ${D}/tmp/install/lib/libtag.so.1 |
---|
52 |
ln -sf libtag.so.1.9.0 ${D}/tmp/install/lib/libtag.so |
---|
53 |
for f in $(find . -type f -name '*.h'); do |
---|
54 |
install -D -m 644 ${f} ${D}/tmp/install/include/taglib/$(basename ${f}) |
---|
55 |
done |
---|
56 |
install -D -m 644 taglib/toolkit/tlist.tcc ${D}/tmp/install/include/taglib/tlist.tcc |
---|
57 |
install -D -m 644 taglib/toolkit/tmap.tcc ${D}/tmp/install/include/taglib/tmap.tcc |
---|
58 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" taglib.pc > ${D}/tmp/install/lib/pkgconfig/taglib.pc |
---|
59 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" taglib-config > ${D}/tmp/install/bin/taglib-config |
---|
60 |
chmod +x ${D}/tmp/install/bin/taglib-config |
---|
61 |
popd |
---|
62 |
|
---|
63 |
# libexif |
---|
64 |
tar xvfj ${D}/sources/libexif-0.6.13.tar.bz2 |
---|
65 |
pushd libexif-0.6.13 |
---|
66 |
./configure |
---|
67 |
make |
---|
68 |
install -D -m 755 libexif/.libs/libexif.so.12.0.1 ${D}/tmp/install/lib/libexif.so.12.0.1 |
---|
69 |
ln -sf libexif.so.12.0.1 ${D}/tmp/install/lib/libexif.so.12 |
---|
70 |
ln -sf libexif.so.12.0.1 ${D}/tmp/install/lib/libexif.so |
---|
71 |
for f in $(find . -type f -name '*.h'); do |
---|
72 |
install -D -m 644 ${f} ${D}/tmp/install/include/libexif/$(basename ${f}) |
---|
73 |
done |
---|
74 |
popd |
---|
75 |
|
---|
76 |
# libjpeg |
---|
77 |
tar xvfz ${D}/sources/jpegsrc.v8b.tar.gz |
---|
78 |
pushd jpeg-8b |
---|
79 |
./configure |
---|
80 |
make |
---|
81 |
install -D -m 755 .libs/libjpeg.so.8.0.2 ${D}/tmp/install/lib/libjpeg.so.8.0.2 |
---|
82 |
ln -sf libjpeg.so.8.0.2 ${D}/tmp/install/lib/libjpeg.so.8 |
---|
83 |
ln -sf libjpeg.so.8.0.2 ${D}/tmp/install/lib/libjpeg.so |
---|
84 |
for f in jconfig.h jerror.h jmorecfg.h jpeglib.h; do |
---|
85 |
install -D -m 644 ${f} ${D}/tmp/install/include/$(basename ${f}) |
---|
86 |
done |
---|
87 |
popd |
---|
88 |
|
---|
89 |
# libmp4v2 |
---|
90 |
tar xvfj ${D}/sources/libmp4v2-1.5.0.1.tar.bz2 |
---|
91 |
pushd libmp4v2-1.5.0.1 |
---|
92 |
./configure |
---|
93 |
make |
---|
94 |
install -D -m 755 ./.libs/libmp4v2.so.0.0.0 ${D}/tmp/install/lib/libmp4v2.so.0.0.0 |
---|
95 |
ln -sf libmp4v2.so.0.0.0 ${D}/tmp/install/lib/libmp4v2.so.0 |
---|
96 |
ln -sf libmp4v2.so.0.0.0 ${D}/tmp/install/lib/libmp4v2.so |
---|
97 |
for f in *.h; do |
---|
98 |
install -D -m 644 ${f} ${D}/tmp/install/include/libmp4v2/$(basename ${f}) |
---|
99 |
done |
---|
100 |
popd |
---|
101 |
|
---|
102 |
# lame |
---|
103 |
tar xvfz ${D}/sources/lame-3.97.tar.gz |
---|
104 |
pushd lame-3.97 |
---|
105 |
patch -p 1 < ${D}/sources/lame-as-needed.patch |
---|
106 |
patch -p 1 < ${D}/sources/lame-noexecstack.patch |
---|
107 |
autoreconf |
---|
108 |
sed -i -e 's/^\(\s*hardcode_libdir_flag_spec\s*=\).*/\1/' configure |
---|
109 |
CFLAGS="$CFLAGS -ffast-math" ./configure \ |
---|
110 |
--enable-nasm \ |
---|
111 |
--enable-mp3x \ |
---|
112 |
--enable-mp3rtp \ |
---|
113 |
--enable-decode-layer1 |
---|
114 |
make |
---|
115 |
install -D -m 755 libmp3lame/.libs/libmp3lame.so.0.0.0 ${D}/tmp/install/lib/libmp3lame.so.0.0.0 |
---|
116 |
ln -sf libmp3lame.so.0.0.0 ${D}/tmp/install/lib/libmp3lame.so.0 |
---|
117 |
ln -sf libmp3lame.so.0.0.0 ${D}/tmp/install/lib/libmp3lame.so |
---|
118 |
install -D -m 644 include/lame.h ${D}/tmp/install/include/lame/lame.h |
---|
119 |
install -D -m 755 frontend/lame ${D}/tmp/install/bin/lame |
---|
120 |
install -D -m 755 frontend/mp3rtp ${D}/tmp/install/bin/mp3rtp |
---|
121 |
install -D -m 755 frontend/mp3x ${D}/tmp/install/bin/mp3x |
---|
122 |
popd |
---|
123 |
|
---|
124 |
# libogg |
---|
125 |
tar xvfz ${D}/sources/libogg-1.1.3.tar.gz |
---|
126 |
pushd libogg-1.1.3 |
---|
127 |
patch -p 1 < ${D}/sources/libogg-1.0-m4.patch |
---|
128 |
./configure |
---|
129 |
make |
---|
130 |
install -D -m 755 src/.libs/libogg.so.0.5.3 ${D}/tmp/install/lib/libogg.so.0.5.3 |
---|
131 |
ln -sf libogg.so.0.5.3 ${D}/tmp/install/lib/libogg.so.0 |
---|
132 |
ln -sf libogg.so.0.5.3 ${D}/tmp/install/lib/libogg.so |
---|
133 |
for f in include/ogg/*.h; do |
---|
134 |
install -D -m 644 ${f} ${D}/tmp/install/include/ogg/$(basename ${f}) |
---|
135 |
done |
---|
136 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" ogg.pc > ${D}/tmp/install/lib/pkgconfig/ogg.pc |
---|
137 |
popd |
---|
138 |
|
---|
139 |
# libvorbis |
---|
140 |
tar xvfz ${D}/sources/libvorbis-1.3.1.tar.gz |
---|
141 |
pushd libvorbis-1.3.1 |
---|
142 |
PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig ./configure \ |
---|
143 |
--with-ogg-libraries=${D}/tmp/install/lib \ |
---|
144 |
--with-ogg-includes=${D}/tmp/install/include |
---|
145 |
make |
---|
146 |
for f in libvorbisenc.so.2.0.7 libvorbisfile.so.3.3.2 libvorbis.so.0.4.4; do |
---|
147 |
install -D -m 755 lib/.libs/${f} ${D}/tmp/install/lib/${f} |
---|
148 |
done |
---|
149 |
ln -sf libvorbisenc.so.2.0.7 ${D}/tmp/install/lib/libvorbisenc.so.2 |
---|
150 |
ln -sf libvorbisenc.so.2.0.7 ${D}/tmp/install/lib/libvorbisenc.so |
---|
151 |
ln -sf libvorbisfile.so.3.3.2 ${D}/tmp/install/lib/libvorbisfile.so.3 |
---|
152 |
ln -sf libvorbisfile.so.3.3.2 ${D}/tmp/install/lib/libvorbisfile.so |
---|
153 |
ln -sf libvorbis.so.0.4.4 ${D}/tmp/install/lib/libvorbis.so.0 |
---|
154 |
ln -sf libvorbis.so.0.4.4 ${D}/tmp/install/lib/libvorbis.so |
---|
155 |
for f in include/vorbis/*.h; do |
---|
156 |
install -D -m 644 ${f} ${D}/tmp/install/include/vorbis/$(basename ${f}) |
---|
157 |
done |
---|
158 |
for f in vorbis.pc vorbisfile.pc vorbisenc.pc; do |
---|
159 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" ${f} > ${D}/tmp/install/lib/pkgconfig/${f} |
---|
160 |
done |
---|
161 |
popd |
---|
162 |
|
---|
163 |
# libtheora |
---|
164 |
tar xvfj ${D}/sources/libtheora-1.1.1.tar.bz2 |
---|
165 |
pushd libtheora-1.1.1 |
---|
166 |
PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig ./configure \ |
---|
167 |
--with-ogg-libraries=${D}/tmp/install/lib \ |
---|
168 |
--with-ogg-includes=${D}/tmp/install/include \ |
---|
169 |
--with-vorbis-libraries=${D}/tmp/install/lib \ |
---|
170 |
--with-vorbis-includes=${D}/tmp/install/include |
---|
171 |
make |
---|
172 |
install -D -m 755 lib/.libs/libtheora.so.0.3.10 ${D}/tmp/install/lib/libtheora.so.0.3.10 |
---|
173 |
ln -sf libtheora.so.0.3.10 ${D}/tmp/install/lib/libtheora.so.0 |
---|
174 |
ln -sf libtheora.so.0.3.10 ${D}/tmp/install/lib/libtheora.so |
---|
175 |
install -D -m 755 lib/.libs/libtheoraenc.so.1.1.2 ${D}/tmp/install/lib/libtheoraenc.so.1.1.2 |
---|
176 |
ln -sf libtheoraenc.so.1.1.2 ${D}/tmp/install/lib/libtheoraenc.so.1 |
---|
177 |
ln -sf libtheoraenc.so.1.1.2 ${D}/tmp/install/lib/libtheoraenc.so |
---|
178 |
install -D -m 755 lib/.libs/libtheoraenc.so.1.1.2 ${D}/tmp/install/lib/libtheoradec.so.1.1.4 |
---|
179 |
ln -sf libtheoradec.so.1.1.4 ${D}/tmp/install/lib/libtheoradec.so.1 |
---|
180 |
ln -sf libtheoradec.so.1.1.4 ${D}/tmp/install/lib/libtheoradec.so |
---|
181 |
for f in include/theora/*.h; do |
---|
182 |
install -D -m 644 ${f} ${D}/tmp/install/include/theora/$(basename ${f}) |
---|
183 |
done |
---|
184 |
popd |
---|
185 |
|
---|
186 |
# flac |
---|
187 |
tar xvfz ${D}/sources/flac-1.2.1.tar.gz |
---|
188 |
pushd flac-1.2.1 |
---|
189 |
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${D}/tmp/install/lib \ |
---|
190 |
./configure \ |
---|
191 |
--disable-xmms-plugin \ |
---|
192 |
--disable-rpath \ |
---|
193 |
--with-ogg-libraries=${D}/tmp/install/lib \ |
---|
194 |
--with-ogg-includes=${D}/tmp/install/include |
---|
195 |
make |
---|
196 |
install -D -m 755 src/libFLAC/.libs/libFLAC.so.8.2.0 ${D}/tmp/install/lib/libFLAC.so.8.2.0 |
---|
197 |
ln -sf libFLAC.so.8.2.0 ${D}/tmp/install/lib/libFLAC.so.8 |
---|
198 |
ln -sf libFLAC.so.8.2.0 ${D}/tmp/install/lib/libFLAC.so |
---|
199 |
install -D -m 755 src/libFLAC++/.libs/libFLAC++.so.6.2.0 ${D}/tmp/install/lib/libFLAC++.so.6.2.0 |
---|
200 |
ln -sf libFLAC++.so.6.2.0 ${D}/tmp/install/lib/libFLAC++.so.6 |
---|
201 |
ln -sf libFLAC++.so.6.2.0 ${D}/tmp/install/lib/libFLAC++.so |
---|
202 |
for f in include/FLAC/*.h; do |
---|
203 |
install -D -m 644 ${f} ${D}/tmp/install/include/FLAC/$(basename ${f}) |
---|
204 |
done |
---|
205 |
for f in include/FLAC++/*.h; do |
---|
206 |
install -D -m 644 ${f} ${D}/tmp/install/include/FLAC++/$(basename ${f}) |
---|
207 |
done |
---|
208 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" src/libFLAC/flac.pc > ${D}/tmp/install/lib/pkgconfig/flac.pc |
---|
209 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" src/libFLAC++/flac++.pc > ${D}/tmp/install/lib/pkgconfig/flac++.pc |
---|
210 |
install -D -m 644 src/libFLAC/libFLAC.m4 ${D}/tmp/install/share/aclocal/libFLAC.m4 |
---|
211 |
install -D -m 644 src/libFLAC++/libFLAC++.m4 ${D}/tmp/install/share/aclocal/libFLAC++.m4 |
---|
212 |
popd |
---|
213 |
|
---|
214 |
# libsndfile |
---|
215 |
tar xvfz ${D}/sources/libsndfile-1.0.21.tar.gz |
---|
216 |
pushd libsndfile-1.0.21 |
---|
217 |
PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig \ |
---|
218 |
LDFLAGS="-Wl,--rpath-link,${D}/tmp/install/lib" \ |
---|
219 |
./configure \ |
---|
220 |
--disable-alsa |
---|
221 |
make |
---|
222 |
install -D -m 755 ./src/.libs/libsndfile.so.1.0.21 ${D}/tmp/install/lib/libsndfile.so.1.0.21 |
---|
223 |
ln -sf libsndfile.so.1.0.21 ${D}/tmp/install/lib/libsndfile.so.1 |
---|
224 |
ln -sf libsndfile.so.1.0.21 ${D}/tmp/install/lib/libsndfile.so |
---|
225 |
for f in src/sndfile.h src/sndfile.hh; do |
---|
226 |
install -D -m 644 ${f} ${D}/tmp/install/include/$(basename ${f}) |
---|
227 |
done |
---|
228 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" sndfile.pc > ${D}/tmp/install/lib/pkgconfig/sndfile.pc |
---|
229 |
popd |
---|
230 |
|
---|
231 |
|
---|
232 |
# id3lib |
---|
233 |
tar xvfz ${D}/sources/id3lib-3.8.3.tar.gz |
---|
234 |
pushd id3lib-3.8.3 |
---|
235 |
./configure |
---|
236 |
make |
---|
237 |
install -D -m 755 src/.libs/libid3-3.8.so.3.0.0 ${D}/tmp/install/lib/libid3-3.8.so.3.0.0 |
---|
238 |
ln -sf libid3-3.8.so.3.0.0 ${D}/tmp/install/lib/libid3-3.8.so.3 |
---|
239 |
ln -sf libid3-3.8.so.3.0.0 ${D}/tmp/install/lib/libid3-3.8.so |
---|
240 |
install -D -m 644 include/id3.h ${D}/tmp/install/include/id3.h |
---|
241 |
for f in include/id3/*.h; do |
---|
242 |
install -D -m 644 ${f} ${D}/tmp/install/include/id3/$(basename ${f}) |
---|
243 |
done |
---|
244 |
popd |
---|
245 |
|
---|
246 |
# twolame |
---|
247 |
tar xvfz ${D}/sources/twolame-0.3.12.tar.gz |
---|
248 |
pushd twolame-0.3.12 |
---|
249 |
PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig \ |
---|
250 |
LDFLAGS="-Wl,--rpath-link,${D}/tmp/install/lib" \ |
---|
251 |
./configure |
---|
252 |
make |
---|
253 |
install -D -m 755 libtwolame/.libs/libtwolame.so.0.0.0 ${D}/tmp/install/lib/libtwolame.so.0.0.0 |
---|
254 |
ln -sf libtwolame.so.0.0.0 ${D}/tmp/install/lib/libtwolame.so.0 |
---|
255 |
ln -sf libtwolame.so.0.0.0 ${D}/tmp/install/lib/libtwolame.so |
---|
256 |
install -D -m 644 libtwolame/twolame.h ${D}/tmp/install/include/twolame.h |
---|
257 |
install -D -m 755 frontend/.libs/twolame ${D}/tmp/install/bin/twolame |
---|
258 |
install -D -m 755 simplefrontend/.libs/stwolame ${D}/tmp/install/bin/stwolame |
---|
259 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" twolame.pc > ${D}/tmp/install/lib/pkgconfig/twolame.pc |
---|
260 |
popd |
---|
261 |
|
---|
262 |
# faad2 |
---|
263 |
tar xvfz ${D}/sources/faad2-2.6.1.tar.gz |
---|
264 |
pushd faad2 |
---|
265 |
patch -p 1 < ${D}/sources/faad2-cve-2008-4201.patch |
---|
266 |
autoreconf -vif |
---|
267 |
./configure |
---|
268 |
make |
---|
269 |
install -D -m 755 libfaad/.libs/libfaad.so.0.0.0 ${D}/tmp/install/lib/libfaad.so.0.0.0 |
---|
270 |
ln -sf libfaad.so.0.0.0 ${D}/tmp/install/lib/libfaad.so.0 |
---|
271 |
ln -sf libfaad.so.0.0.0 ${D}/tmp/install/lib/libfaad.so |
---|
272 |
for f in include/*.h; do |
---|
273 |
install -D -m 644 ${f} ${D}/tmp/install/include/$(basename ${f}) |
---|
274 |
done |
---|
275 |
install -D -m 755 frontend/.libs/faad ${D}/tmp/install/bin/faad |
---|
276 |
popd |
---|
277 |
|
---|
278 |
# xvidcore |
---|
279 |
tar xvfj ${D}/sources/xvidcore-1.2.1.tar.bz2 |
---|
280 |
pushd xvidcore |
---|
281 |
patch -p 1 < ${D}/sources/xvidcore-1.2.1-noexec-stack.patch |
---|
282 |
pushd build/generic |
---|
283 |
CFLAGS="$CFLAGS -ffast-math" ./configure |
---|
284 |
make |
---|
285 |
popd |
---|
286 |
install -D -m 755 build/generic/=build/libxvidcore.so.4.2 ${D}/tmp/install/lib/libxvidcore.so.4.2 |
---|
287 |
ln -sf libxvidcore.so.4.2 ${D}/tmp/install/lib/libxvidcore.so.4 |
---|
288 |
ln -sf libxvidcore.so.4.2 ${D}/tmp/install/lib/libxvidcore.so |
---|
289 |
install -D -m 644 src/xvid.h ${D}/tmp/install/include/xvid.h |
---|
290 |
popd |
---|
291 |
|
---|
292 |
# a52dec |
---|
293 |
tar xvfz ${D}/sources/a52dec-0.7.4.tar.gz |
---|
294 |
pushd a52dec-0.7.4 |
---|
295 |
./configure \ |
---|
296 |
--enable-shared \ |
---|
297 |
--disable-static |
---|
298 |
make |
---|
299 |
install -D -m 755 liba52/.libs/liba52.so.0.0.0 ${D}/tmp/install/lib/liba52.so.0.0.0 |
---|
300 |
ln -sf liba52.so.0.0.0 ${D}/tmp/install/lib/liba52.so.0 |
---|
301 |
ln -sf liba52.so.0.0.0 ${D}/tmp/install/lib/liba52.so |
---|
302 |
for f in a52.h attributes.h audio_out.h mm_accel.h; do |
---|
303 |
install -D -m 644 include/${f} ${D}/tmp/install/include/a52dec/${f} |
---|
304 |
done |
---|
305 |
install -D -m 755 src/.libs/a52dec ${D}/tmp/install/bin/a52dec |
---|
306 |
popd |
---|
307 |
|
---|
308 |
# libmpeg2 |
---|
309 |
tar xvfz ${D}/sources/libmpeg2-0.5.1.tar.gz |
---|
310 |
pushd libmpeg2-0.5.1 |
---|
311 |
./configure \ |
---|
312 |
--without-x \ |
---|
313 |
--disable-sdl |
---|
314 |
make |
---|
315 |
install -D -m 755 libmpeg2/.libs/libmpeg2.so.0.1.0 ${D}/tmp/install/lib/libmpeg2.so.0.1.0 |
---|
316 |
ln -sf libmpeg2.so.0.1.0 ${D}/tmp/install/lib/libmpeg2.so.0 |
---|
317 |
ln -sf libmpeg2.so.0.1.0 ${D}/tmp/install/lib/libmpeg2.so |
---|
318 |
install -D -m 755 ./libmpeg2/convert/.libs/libmpeg2convert.so.0.0.0 ${D}/tmp/install/lib/libmpeg2convert.so.0.0.0 |
---|
319 |
ln -sf libmpeg2convert.so.0.0.0 ${D}/tmp/install/lib/libmpeg2convert.so.0 |
---|
320 |
ln -sf libmpeg2convert.so.0.0.0 ${D}/tmp/install/lib/libmpeg2convert.so |
---|
321 |
install -D -m 644 libmpeg2/libmpeg2.pc ${D}/tmp/install/lib/pkgconfig/libmpeg2.pc |
---|
322 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" libmpeg2/libmpeg2.pc > ${D}/tmp/install/lib/pkgconfig/libmpeg2.pc |
---|
323 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" libmpeg2/convert/libmpeg2convert.pc > ${D}/tmp/install/lib/pkgconfig/libmpeg2convert.pc |
---|
324 |
for f in include/mpeg2.h libmpeg2/mpeg2_internal.h include/mpeg2convert.h; do |
---|
325 |
install -D -m 644 ${f} ${D}/tmp/install/include/mpeg2dec/$(basename ${f}) |
---|
326 |
done |
---|
327 |
install -D -m 755 src/.libs/mpeg2dec ${D}/tmp/install/bin/mpegdec |
---|
328 |
popd |
---|
329 |
|
---|
330 |
# ffmpeg |
---|
331 |
tar xvfj ${D}/sources/ffmpeg-20080908.tar.bz2 |
---|
332 |
pushd ffmpeg-20080908 |
---|
333 |
CFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib" LDFLAGS="-L${D}/tmp/install/lib" ./configure \ |
---|
334 |
--incdir=${D}/tmp/install/include/ffmpeg \ |
---|
335 |
--libdir=${D}/tmp/install/lib \ |
---|
336 |
--disable-demuxer=v4l \ |
---|
337 |
--enable-libfaad \ |
---|
338 |
--enable-libmp3lame \ |
---|
339 |
--enable-libtheora \ |
---|
340 |
--enable-libvorbis \ |
---|
341 |
--enable-libxvid \ |
---|
342 |
--enable-avfilter \ |
---|
343 |
--enable-swscale \ |
---|
344 |
--enable-postproc \ |
---|
345 |
--enable-avfilter-lavf \ |
---|
346 |
--enable-shared \ |
---|
347 |
--enable-gpl \ |
---|
348 |
--enable-liba52 |
---|
349 |
make |
---|
350 |
install -D -m 755 libavformat/libavformat.so.52 ${D}/tmp/install/lib/libavformat.so.52 |
---|
351 |
ln -sf libavformat.so.52 ${D}/tmp/install/lib/libavformat.so |
---|
352 |
install -D -m 755 libpostproc/libpostproc.so.51 ${D}/tmp/install/lib/libpostproc.so.51 |
---|
353 |
ln -sf libpostproc.so.51 ${D}/tmp/install/lib/libpostproc.so |
---|
354 |
install -D -m 755 libavcodec/libavcodec.so.51 ${D}/tmp/install/lib/libavcodec.so.51 |
---|
355 |
ln -sf libavcodec.so.51 ${D}/tmp/install/lib/libavcodec.so |
---|
356 |
install -D -m 755 libavfilter/libavfilter.so.0 ${D}/tmp/install/lib/libavfilter.so.0 |
---|
357 |
ln -sf libavfilter.so.0 ${D}/tmp/install/lib/libavfilter.so |
---|
358 |
install -D -m 755 libavdevice/libavdevice.so.52 ${D}/tmp/install/lib/libavdevice.so.52 |
---|
359 |
ln -sf libavdevice.so.52 ${D}/tmp/install/lib/libavdevice.so |
---|
360 |
install -D -m 755 libavutil/libavutil.so.49 ${D}/tmp/install/lib/libavutil.so.49 |
---|
361 |
ln -sf libavutil.so.49 ${D}/tmp/install/lib/libavutil.so |
---|
362 |
install -D -m 755 libswscale/libswscale.so.0 ${D}/tmp/install/lib/libswscale.so.0 |
---|
363 |
ln -sf libswscale.so.0 ${D}/tmp/install/lib/libswscale.so |
---|
364 |
install -D -m 755 ffmpeg ${D}/tmp/install/bin/ffmpeg |
---|
365 |
install -D -m 755 ffmpeg_g ${D}/tmp/install/bin/ffmpeg_g |
---|
366 |
install -D -m 755 ffserver ${D}/tmp/install/bin/ffserver |
---|
367 |
install -D -m 755 ffserver_g ${D}/tmp/install/bin/ffserver_g |
---|
368 |
for f in libavcodec/libavcodec.pc libavdevice/libavdevice.pc libavfilter/libavfilter.pc libavformat/libavformat.pc libavutil/libavutil.pc \ |
---|
369 |
libpostproc/libpostproc.pc libswscale/libswscale.pc; do |
---|
370 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" $f > ${D}/tmp/install/lib/pkgconfig/$(basename $f) |
---|
371 |
done |
---|
372 |
for f in libavcodec/avcodec.h libavcodec/opt.h libavdevice/avdevice.h libavfilter/avfilter.h libavformat/avformat.h libavformat/avio.h \ |
---|
373 |
libavutil/adler32.h libavutil/avstring.h libavutil/avutil.h libavutil/base64.h libavutil/common.h libavutil/crc.h \ |
---|
374 |
libavutil/fifo.h libavutil/intfloat_readwrite.h libavutil/log.h libavutil/lzo.h libavutil/mathematics.h libavutil/md5.h \ |
---|
375 |
libavutil/mem.h libavutil/rational.h libavutil/sha1.h libpostproc/postprocess.h libswscale/swscale.h; do |
---|
376 |
install -D -m 644 $f ${D}/tmp/install/include/ffmpeg/$f |
---|
377 |
ln -sf $f ${D}/tmp/install/include/ffmpeg/$(basename $f) |
---|
378 |
done |
---|
379 |
for f in libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale; do |
---|
380 |
ln -sf ffmpeg/$f ${D}/tmp/install/include/$f |
---|
381 |
done |
---|
382 |
popd |
---|
383 |
|
---|
384 |
# ffmpegthumbnailer |
---|
385 |
tar xvfz ${D}/sources/ffmpegthumbnailer-2.0.2.tar.gz |
---|
386 |
pushd ffmpegthumbnailer-2.0.2 |
---|
387 |
PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig \ |
---|
388 |
CFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ |
---|
389 |
CXXFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ |
---|
390 |
CPPFLAGS="-I${D}/tmp/install/include" \ |
---|
391 |
LDFLAGS="-L${D}/tmp/install/lib" \ |
---|
392 |
./configure \ |
---|
393 |
--includedir=${D}/tmp/install/include/libffmpegthumbnailer \ |
---|
394 |
--libdir=${D}/tmp/install/lib |
---|
395 |
make |
---|
396 |
install -D -m 755 .libs/libffmpegthumbnailer.so.4.0.2 ${D}/tmp/install/lib/libffmpegthumbnailer.so.4.0.2 |
---|
397 |
ln -sf libffmpegthumbnailer.so.4.0.2 ${D}/tmp/install/lib/libffmpegthumbnailer.so.4 |
---|
398 |
ln -sf libffmpegthumbnailer.so.4.0.2 ${D}/tmp/install/lib/libffmpegthumbnailer.so |
---|
399 |
for f in libffmpegthumbnailer/*.h; do |
---|
400 |
install -D -m 644 ${f} ${D}/tmp/install/include/libffmpegthumbnailer/$(basename ${f}) |
---|
401 |
done |
---|
402 |
install -D -m 644 libffmpegthumbnailer.pc ${D}/tmp/install/lib/pkgconfig/libffmpegthumbnailer.pc |
---|
403 |
popd |
---|
404 |
|
---|
405 |
# sqlite3 |
---|
406 |
tar xvfz ${D}/sources/sqlite-amalgamation-3.7.0.1.tar.gz |
---|
407 |
pushd sqlite-3.7.0.1 |
---|
408 |
./configure |
---|
409 |
make |
---|
410 |
install -D -m 755 .libs/libsqlite3.so.0.8.6 ${D}/tmp/install/lib/libsqlite3.so.0.8.6 |
---|
411 |
ln -sf libsqlite3.so.0.8.6 ${D}/tmp/install/lib/libsqlite3.so.0 |
---|
412 |
ln -sf libsqlite3.so.0.8.6 ${D}/tmp/install/lib/libsqlite3.so |
---|
413 |
install -D -m 644 sqlite3.h ${D}/tmp/install/include/sqlite3.h |
---|
414 |
install -D -m 755 .libs/sqlite3 ${D}/tmp/install/bin/sqlite3 |
---|
415 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" sqlite3.pc > ${D}/tmp/install/lib/pkgconfig/sqlite3.pc |
---|
416 |
popd |
---|
417 |
|
---|
418 |
# mediatomb |
---|
419 |
tar xvfz ${D}/sources/mediatomb-0.12.1.tar.gz |
---|
420 |
pushd mediatomb-0.12.1 |
---|
421 |
patch -p 0 < ${D}/sources/samsung_video_subtitles.patch |
---|
422 |
CFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ |
---|
423 |
CXXFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ |
---|
424 |
CPPFLAGS="-I${D}/tmp/install/include" \ |
---|
425 |
LDFLAGS="-L${D}/tmp/install/lib" \ |
---|
426 |
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${D}/tmp/install/lib ./configure \ |
---|
427 |
--prefix=${D_PREFIX} \ |
---|
428 |
--disable-mysql \ |
---|
429 |
--disable-id3lib \ |
---|
430 |
--with-js-libs=${D}/tmp/install/lib \ |
---|
431 |
--with-js-h=${D}/tmp/install/include/js \ |
---|
432 |
--with-libmagic-h=${D}/tmp/install/include \ |
---|
433 |
--with-libmagic-libs=${D}/tmp/install/lib \ |
---|
434 |
--with-taglib-cfg=${D}/tmp/install/bin/taglib-config \ |
---|
435 |
--with-libexif-h=${D}/tmp/install/include \ |
---|
436 |
--with-libexif-libs=${D}/tmp/install/lib \ |
---|
437 |
--with-libmp4v2-h=${D}/tmp/install/include/libmp4v2 \ |
---|
438 |
--with-libmp4v2-libs=${D}/tmp/install/lib \ |
---|
439 |
--enable-ffmpeg \ |
---|
440 |
--with-avformat-h=${D}/tmp/install/include \ |
---|
441 |
--with-avformat-libs=${D}/tmp/install/lib \ |
---|
442 |
--with-avutil-libs=${D}/tmp/install/lib \ |
---|
443 |
--with-ffmpegthumbnailer-libs=${D}/tmp/install/lib \ |
---|
444 |
--with-ffmpegthumbnailer-h=${D}/tmp/install/include \ |
---|
445 |
--with-sqlite3-libs=${D}/tmp/install/lib \ |
---|
446 |
--with-sqlite3-h=${D}/tmp/install/include |
---|
447 |
|
---|
448 |
CFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ |
---|
449 |
CXXFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ |
---|
450 |
CPPFLAGS="-I${D}/tmp/install/include" |
---|
451 |
LDFLAGS="-L${D}/tmp/install/lib" \ |
---|
452 |
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${D}/tmp/install/lib \ |
---|
453 |
make |
---|
454 |
install -D -m 755 build/mediatomb ${D}/tmp/install/bin/mediatomb |
---|
455 |
mkdir -p ${D}/tmp/install/share/mediatomb |
---|
456 |
cp -a web ${D}/tmp/install/share/mediatomb/web |
---|
457 |
cp -a scripts/js ${D}/tmp/install/share/mediatomb/js |
---|
458 |
cp -a config/mappings.xml ${D}/tmp/install/share/mediatomb |
---|
459 |
find ${D}/tmp/install/share/mediatomb -name Makefile | xargs rm -f |
---|
460 |
popd |
---|
461 |
|
---|
462 |
# VLC |
---|
463 |
tar xvfj ${D}/sources/vlc-1.1.2.tar.bz2 |
---|
464 |
pushd vlc-1.1.2 |
---|
465 |
PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig \ |
---|
466 |
CFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ |
---|
467 |
CXXFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ |
---|
468 |
CPPFLAGS="-I${D}/tmp/install/include" \ |
---|
469 |
LDFLAGS="-L${D}/tmp/install/lib " \ |
---|
470 |
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${D}/tmp/install/lib \ |
---|
471 |
./configure \ |
---|
472 |
--prefix=${D_PREFIX} \ |
---|
473 |
--enable-run-as-root \ |
---|
474 |
--without-x \ |
---|
475 |
--disable-bonjour \ |
---|
476 |
--disable-dbus \ |
---|
477 |
--disable-lua \ |
---|
478 |
--disable-mad \ |
---|
479 |
--disable-rpath \ |
---|
480 |
--disable-xcb \ |
---|
481 |
--disable-fribidi \ |
---|
482 |
--disable-qt4 \ |
---|
483 |
--disable-skins2 \ |
---|
484 |
--disable-libgcrypt \ |
---|
485 |
--disable-remoteosd \ |
---|
486 |
--disable-v4l2 \ |
---|
487 |
--disable-libv4l \ |
---|
488 |
--disable-libv4l2 \ |
---|
489 |
--disable-sdl \ |
---|
490 |
--enable-libmpeg2 \ |
---|
491 |
--enable-a52 \ |
---|
492 |
|
---|
493 |
make |
---|
494 |
install -D -m 755 src/.libs/libvlccore.so.4.0.0 ${D}/tmp/install/lib/libvlccore.so.4.0.0 |
---|
495 |
ln -sf libvlccore.so.4.0.0 ${D}/tmp/install/lib/libvlccore.so.4.0 |
---|
496 |
ln -sf libvlccore.so.4.0.0 ${D}/tmp/install/lib/libvlccore.so |
---|
497 |
install -D -m 755 src/.libs/libvlc.so.5.1.0 ${D}/tmp/install/lib/libvlc.so.5.1.0 |
---|
498 |
ln -sf libvlc.so.5.1.0 ${D}/tmp/install/lib/libvlc.so.5 |
---|
499 |
ln -sf libvlc.so.5.1.0 ${D}/tmp/install/lib/libvlc.so |
---|
500 |
install -D -m 755 bin/.libs/vlc ${D}/tmp/install/bin/vlc |
---|
501 |
install -D -m 755 ./bin/.libs/vlc-cache-gen ${D}/tmp/install/lib/vlc/vlc-cache-gen |
---|
502 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" src/libvlc.pc > ${D}/tmp/install/lib/pkgconfig/libvlc.pc |
---|
503 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" src/vlc-plugin.pc > ${D}/tmp/install/lib/pkgconfig/vlc-plugin.pc |
---|
504 |
for f in $(find modules -name '*.so'); do |
---|
505 |
install -D -m 755 ${f} ${D}/tmp/install/lib/vlc/$(echo ${f} | sed -e 's/^modules/plugins/; s/\.libs\///') |
---|
506 |
done |
---|
507 |
for f in include/vlc/*.h; do |
---|
508 |
install -D -m 644 ${f} ${D}/tmp/install/include/vlc/$(basename ${f}) |
---|
509 |
done |
---|
510 |
for f in include/*.h; do |
---|
511 |
install -D -m 644 ${f} ${D}/tmp/install/include/vlc/plugins/$(basename ${f}) |
---|
512 |
done |
---|
513 |
popd |
---|
514 |
|
---|
515 |
# libxml |
---|
516 |
tar xvfz ${D}/sources/libxml-1.8.17.tar.gz |
---|
517 |
pushd libxml-1.8.17 |
---|
518 |
./configure |
---|
519 |
make |
---|
520 |
install -D -m 755 .libs/libxml.so.1.8.17 ${D}/tmp/install/lib/libxml.so.1.8.17 |
---|
521 |
ln -sf libxml.so.1.8.17 ${D}/tmp/install/lib/libxml.so.1 |
---|
522 |
ln -sf libxml.so.1.8.17 ${D}/tmp/install/lib/libxml.so |
---|
523 |
for f in SAX.h entities.h encoding.h parser.h parserInternals.h xml-error.h HTMLparser.h \ |
---|
524 |
HTMLtree.h debugXML.h tree.h xpath.h xmlIO.h xmlmemory.h nanohttp.h nanoftp.h \ |
---|
525 |
valid.h xlink.h uri.h; do |
---|
526 |
install -D -m 644 ${f} ${D}/tmp/install/include/gnome-xml/$(basename ${f}) |
---|
527 |
done |
---|
528 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" libxml.pc > ${D}/tmp/install/lib/pkgconfig/libxml.pc |
---|
529 |
sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" xml-config > ${D}/tmp/install/bin/xml-config |
---|
530 |
chmod +x ${D}/tmp/install/bin/xml-config |
---|
531 |
popd |
---|
532 |
|
---|
533 |
# xml2 |
---|
534 |
tar xvfz ${D}/sources/xml2-0.4.tar.gz |
---|
535 |
pushd xml2-0.4 |
---|
536 |
PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig \ |
---|
537 |
LDFLAGS="-L${D}/tmp/install/lib " \ |
---|
538 |
./configure |
---|
539 |
make |
---|
540 |
for f in 2csv 2xml csv2 xml2; do |
---|
541 |
install -D -m 755 $f ${D}/tmp/install/bin/${f} |
---|
542 |
done |
---|
543 |
popd |
---|
544 |
|
---|
545 |
# system libs |
---|
546 |
install -D -m 755 /usr/lib/libstdc++.so.6.0.3 ${D}/tmp/install/lib/libstdc++.so.6.0.3 |
---|
547 |
install -D -m 755 /lib/libgcc_s.so.1 ${D}/tmp/install/lib/libgcc_s.so.1 |
---|
548 |
ln -sf libstdc++.so.6.0.3 ${D}/tmp/install/lib/libstdc++.so.6 |
---|
549 |
popd |
---|
550 |
|
---|