#!/bin/sh -e set -e D=${PWD} D_PREFIX="/raid0/data/module/MEDIATOMB/system" rm -rf tmp mkdir tmp mkdir tmp/build mkdir tmp/install mkdir tmp/install/bin mkdir tmp/install/lib mkdir tmp/install/lib/pkgconfig/ mkdir tmp/install/include pushd tmp/build export CFLAGS="-O2 -g -march=i686 -mcpu=i686" # libjs tar xvfz ${D}/sources/js-1.5.tar.gz pushd js/src gmake -f Makefile.ref BUILD_OPT=1 install -D -m 755 Linux_All_OPT.OBJ/libjs.so ${D}/tmp/install/lib/libjs.so install -D -m 755 Linux_All_OPT.OBJ/jsautocfg.h ${D}/tmp/install/include/js/jsautocfg.h for f in *.h; do install -D -m 644 $f ${D}/tmp/install/include/js/$f done popd # libmagic tar xvfz ${D}/sources/file-5.04.tar.gz pushd file-5.04 ./configure --prefix=${D_PREFIX} make install -D -m 755 src/.libs/file ${D}/tmp/install/bin/file install -D -m 644 magic/magic.mgc ${D}/tmp/install/share/misc/magic.mgc install -D -m 644 src/magic.h ${D}/tmp/install/include/magic.h install -D -m 755 src/.libs/libmagic.so.1.0.0 ${D}/tmp/install/lib/libmagic.so.1.0.0 ln -sf libmagic.so.1.0.0 ${D}/tmp/install/lib/libmagic.so.1 ln -sf libmagic.so.1.0.0 ${D}/tmp/install/lib/libmagic.so popd # taglib tar xvfz ${D}/sources/taglib-1.6.3.tar.gz pushd taglib-1.6.3 ./configure make install -D -m 755 taglib/.libs/libtag.so.1.9.0 ${D}/tmp/install/lib/libtag.so.1.9.0 ln -sf libtag.so.1.9.0 ${D}/tmp/install/lib/libtag.so.1 ln -sf libtag.so.1.9.0 ${D}/tmp/install/lib/libtag.so for f in $(find . -type f -name '*.h'); do install -D -m 644 ${f} ${D}/tmp/install/include/taglib/$(basename ${f}) done install -D -m 644 taglib/toolkit/tlist.tcc ${D}/tmp/install/include/taglib/tlist.tcc install -D -m 644 taglib/toolkit/tmap.tcc ${D}/tmp/install/include/taglib/tmap.tcc sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" taglib.pc > ${D}/tmp/install/lib/pkgconfig/taglib.pc sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" taglib-config > ${D}/tmp/install/bin/taglib-config chmod +x ${D}/tmp/install/bin/taglib-config popd # libexif tar xvfj ${D}/sources/libexif-0.6.13.tar.bz2 pushd libexif-0.6.13 ./configure make install -D -m 755 libexif/.libs/libexif.so.12.0.1 ${D}/tmp/install/lib/libexif.so.12.0.1 ln -sf libexif.so.12.0.1 ${D}/tmp/install/lib/libexif.so.12 ln -sf libexif.so.12.0.1 ${D}/tmp/install/lib/libexif.so for f in $(find . -type f -name '*.h'); do install -D -m 644 ${f} ${D}/tmp/install/include/libexif/$(basename ${f}) done popd # libjpeg tar xvfz ${D}/sources/jpegsrc.v8b.tar.gz pushd jpeg-8b ./configure make install -D -m 755 .libs/libjpeg.so.8.0.2 ${D}/tmp/install/lib/libjpeg.so.8.0.2 ln -sf libjpeg.so.8.0.2 ${D}/tmp/install/lib/libjpeg.so.8 ln -sf libjpeg.so.8.0.2 ${D}/tmp/install/lib/libjpeg.so for f in jconfig.h jerror.h jmorecfg.h jpeglib.h; do install -D -m 644 ${f} ${D}/tmp/install/include/$(basename ${f}) done popd # libmp4v2 tar xvfj ${D}/sources/libmp4v2-1.5.0.1.tar.bz2 pushd libmp4v2-1.5.0.1 ./configure make install -D -m 755 ./.libs/libmp4v2.so.0.0.0 ${D}/tmp/install/lib/libmp4v2.so.0.0.0 ln -sf libmp4v2.so.0.0.0 ${D}/tmp/install/lib/libmp4v2.so.0 ln -sf libmp4v2.so.0.0.0 ${D}/tmp/install/lib/libmp4v2.so for f in *.h; do install -D -m 644 ${f} ${D}/tmp/install/include/libmp4v2/$(basename ${f}) done popd # lame tar xvfz ${D}/sources/lame-3.97.tar.gz pushd lame-3.97 patch -p 1 < ${D}/sources/lame-as-needed.patch patch -p 1 < ${D}/sources/lame-noexecstack.patch autoreconf sed -i -e 's/^\(\s*hardcode_libdir_flag_spec\s*=\).*/\1/' configure CFLAGS="$CFLAGS -ffast-math" ./configure \ --enable-nasm \ --enable-mp3x \ --enable-mp3rtp \ --enable-decode-layer1 make install -D -m 755 libmp3lame/.libs/libmp3lame.so.0.0.0 ${D}/tmp/install/lib/libmp3lame.so.0.0.0 ln -sf libmp3lame.so.0.0.0 ${D}/tmp/install/lib/libmp3lame.so.0 ln -sf libmp3lame.so.0.0.0 ${D}/tmp/install/lib/libmp3lame.so install -D -m 644 include/lame.h ${D}/tmp/install/include/lame/lame.h install -D -m 755 frontend/lame ${D}/tmp/install/bin/lame install -D -m 755 frontend/mp3rtp ${D}/tmp/install/bin/mp3rtp install -D -m 755 frontend/mp3x ${D}/tmp/install/bin/mp3x popd # libogg tar xvfz ${D}/sources/libogg-1.1.3.tar.gz pushd libogg-1.1.3 patch -p 1 < ${D}/sources/libogg-1.0-m4.patch ./configure make install -D -m 755 src/.libs/libogg.so.0.5.3 ${D}/tmp/install/lib/libogg.so.0.5.3 ln -sf libogg.so.0.5.3 ${D}/tmp/install/lib/libogg.so.0 ln -sf libogg.so.0.5.3 ${D}/tmp/install/lib/libogg.so for f in include/ogg/*.h; do install -D -m 644 ${f} ${D}/tmp/install/include/ogg/$(basename ${f}) done sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" ogg.pc > ${D}/tmp/install/lib/pkgconfig/ogg.pc popd # libvorbis tar xvfz ${D}/sources/libvorbis-1.3.1.tar.gz pushd libvorbis-1.3.1 PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig ./configure \ --with-ogg-libraries=${D}/tmp/install/lib \ --with-ogg-includes=${D}/tmp/install/include make for f in libvorbisenc.so.2.0.7 libvorbisfile.so.3.3.2 libvorbis.so.0.4.4; do install -D -m 755 lib/.libs/${f} ${D}/tmp/install/lib/${f} done ln -sf libvorbisenc.so.2.0.7 ${D}/tmp/install/lib/libvorbisenc.so.2 ln -sf libvorbisenc.so.2.0.7 ${D}/tmp/install/lib/libvorbisenc.so ln -sf libvorbisfile.so.3.3.2 ${D}/tmp/install/lib/libvorbisfile.so.3 ln -sf libvorbisfile.so.3.3.2 ${D}/tmp/install/lib/libvorbisfile.so ln -sf libvorbis.so.0.4.4 ${D}/tmp/install/lib/libvorbis.so.0 ln -sf libvorbis.so.0.4.4 ${D}/tmp/install/lib/libvorbis.so for f in include/vorbis/*.h; do install -D -m 644 ${f} ${D}/tmp/install/include/vorbis/$(basename ${f}) done for f in vorbis.pc vorbisfile.pc vorbisenc.pc; do sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" ${f} > ${D}/tmp/install/lib/pkgconfig/${f} done popd # libtheora tar xvfj ${D}/sources/libtheora-1.1.1.tar.bz2 pushd libtheora-1.1.1 PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig ./configure \ --with-ogg-libraries=${D}/tmp/install/lib \ --with-ogg-includes=${D}/tmp/install/include \ --with-vorbis-libraries=${D}/tmp/install/lib \ --with-vorbis-includes=${D}/tmp/install/include make install -D -m 755 lib/.libs/libtheora.so.0.3.10 ${D}/tmp/install/lib/libtheora.so.0.3.10 ln -sf libtheora.so.0.3.10 ${D}/tmp/install/lib/libtheora.so.0 ln -sf libtheora.so.0.3.10 ${D}/tmp/install/lib/libtheora.so install -D -m 755 lib/.libs/libtheoraenc.so.1.1.2 ${D}/tmp/install/lib/libtheoraenc.so.1.1.2 ln -sf libtheoraenc.so.1.1.2 ${D}/tmp/install/lib/libtheoraenc.so.1 ln -sf libtheoraenc.so.1.1.2 ${D}/tmp/install/lib/libtheoraenc.so install -D -m 755 lib/.libs/libtheoraenc.so.1.1.2 ${D}/tmp/install/lib/libtheoradec.so.1.1.4 ln -sf libtheoradec.so.1.1.4 ${D}/tmp/install/lib/libtheoradec.so.1 ln -sf libtheoradec.so.1.1.4 ${D}/tmp/install/lib/libtheoradec.so for f in include/theora/*.h; do install -D -m 644 ${f} ${D}/tmp/install/include/theora/$(basename ${f}) done popd # flac tar xvfz ${D}/sources/flac-1.2.1.tar.gz pushd flac-1.2.1 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${D}/tmp/install/lib \ ./configure \ --disable-xmms-plugin \ --disable-rpath \ --with-ogg-libraries=${D}/tmp/install/lib \ --with-ogg-includes=${D}/tmp/install/include make install -D -m 755 src/libFLAC/.libs/libFLAC.so.8.2.0 ${D}/tmp/install/lib/libFLAC.so.8.2.0 ln -sf libFLAC.so.8.2.0 ${D}/tmp/install/lib/libFLAC.so.8 ln -sf libFLAC.so.8.2.0 ${D}/tmp/install/lib/libFLAC.so install -D -m 755 src/libFLAC++/.libs/libFLAC++.so.6.2.0 ${D}/tmp/install/lib/libFLAC++.so.6.2.0 ln -sf libFLAC++.so.6.2.0 ${D}/tmp/install/lib/libFLAC++.so.6 ln -sf libFLAC++.so.6.2.0 ${D}/tmp/install/lib/libFLAC++.so for f in include/FLAC/*.h; do install -D -m 644 ${f} ${D}/tmp/install/include/FLAC/$(basename ${f}) done for f in include/FLAC++/*.h; do install -D -m 644 ${f} ${D}/tmp/install/include/FLAC++/$(basename ${f}) done sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" src/libFLAC/flac.pc > ${D}/tmp/install/lib/pkgconfig/flac.pc sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" src/libFLAC++/flac++.pc > ${D}/tmp/install/lib/pkgconfig/flac++.pc install -D -m 644 src/libFLAC/libFLAC.m4 ${D}/tmp/install/share/aclocal/libFLAC.m4 install -D -m 644 src/libFLAC++/libFLAC++.m4 ${D}/tmp/install/share/aclocal/libFLAC++.m4 popd # libsndfile tar xvfz ${D}/sources/libsndfile-1.0.21.tar.gz pushd libsndfile-1.0.21 PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig \ LDFLAGS="-Wl,--rpath-link,${D}/tmp/install/lib" \ ./configure \ --disable-alsa make install -D -m 755 ./src/.libs/libsndfile.so.1.0.21 ${D}/tmp/install/lib/libsndfile.so.1.0.21 ln -sf libsndfile.so.1.0.21 ${D}/tmp/install/lib/libsndfile.so.1 ln -sf libsndfile.so.1.0.21 ${D}/tmp/install/lib/libsndfile.so for f in src/sndfile.h src/sndfile.hh; do install -D -m 644 ${f} ${D}/tmp/install/include/$(basename ${f}) done sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" sndfile.pc > ${D}/tmp/install/lib/pkgconfig/sndfile.pc popd # id3lib tar xvfz ${D}/sources/id3lib-3.8.3.tar.gz pushd id3lib-3.8.3 ./configure make install -D -m 755 src/.libs/libid3-3.8.so.3.0.0 ${D}/tmp/install/lib/libid3-3.8.so.3.0.0 ln -sf libid3-3.8.so.3.0.0 ${D}/tmp/install/lib/libid3-3.8.so.3 ln -sf libid3-3.8.so.3.0.0 ${D}/tmp/install/lib/libid3-3.8.so install -D -m 644 include/id3.h ${D}/tmp/install/include/id3.h for f in include/id3/*.h; do install -D -m 644 ${f} ${D}/tmp/install/include/id3/$(basename ${f}) done popd # twolame tar xvfz ${D}/sources/twolame-0.3.12.tar.gz pushd twolame-0.3.12 PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig \ LDFLAGS="-Wl,--rpath-link,${D}/tmp/install/lib" \ ./configure make install -D -m 755 libtwolame/.libs/libtwolame.so.0.0.0 ${D}/tmp/install/lib/libtwolame.so.0.0.0 ln -sf libtwolame.so.0.0.0 ${D}/tmp/install/lib/libtwolame.so.0 ln -sf libtwolame.so.0.0.0 ${D}/tmp/install/lib/libtwolame.so install -D -m 644 libtwolame/twolame.h ${D}/tmp/install/include/twolame.h install -D -m 755 frontend/.libs/twolame ${D}/tmp/install/bin/twolame install -D -m 755 simplefrontend/.libs/stwolame ${D}/tmp/install/bin/stwolame sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" twolame.pc > ${D}/tmp/install/lib/pkgconfig/twolame.pc popd # faad2 tar xvfz ${D}/sources/faad2-2.6.1.tar.gz pushd faad2 patch -p 1 < ${D}/sources/faad2-cve-2008-4201.patch autoreconf -vif ./configure make install -D -m 755 libfaad/.libs/libfaad.so.0.0.0 ${D}/tmp/install/lib/libfaad.so.0.0.0 ln -sf libfaad.so.0.0.0 ${D}/tmp/install/lib/libfaad.so.0 ln -sf libfaad.so.0.0.0 ${D}/tmp/install/lib/libfaad.so for f in include/*.h; do install -D -m 644 ${f} ${D}/tmp/install/include/$(basename ${f}) done install -D -m 755 frontend/.libs/faad ${D}/tmp/install/bin/faad popd # xvidcore tar xvfj ${D}/sources/xvidcore-1.2.1.tar.bz2 pushd xvidcore patch -p 1 < ${D}/sources/xvidcore-1.2.1-noexec-stack.patch pushd build/generic CFLAGS="$CFLAGS -ffast-math" ./configure make popd install -D -m 755 build/generic/=build/libxvidcore.so.4.2 ${D}/tmp/install/lib/libxvidcore.so.4.2 ln -sf libxvidcore.so.4.2 ${D}/tmp/install/lib/libxvidcore.so.4 ln -sf libxvidcore.so.4.2 ${D}/tmp/install/lib/libxvidcore.so install -D -m 644 src/xvid.h ${D}/tmp/install/include/xvid.h popd # a52dec tar xvfz ${D}/sources/a52dec-0.7.4.tar.gz pushd a52dec-0.7.4 ./configure \ --enable-shared \ --disable-static make install -D -m 755 liba52/.libs/liba52.so.0.0.0 ${D}/tmp/install/lib/liba52.so.0.0.0 ln -sf liba52.so.0.0.0 ${D}/tmp/install/lib/liba52.so.0 ln -sf liba52.so.0.0.0 ${D}/tmp/install/lib/liba52.so for f in a52.h attributes.h audio_out.h mm_accel.h; do install -D -m 644 include/${f} ${D}/tmp/install/include/a52dec/${f} done install -D -m 755 src/.libs/a52dec ${D}/tmp/install/bin/a52dec popd # libmpeg2 tar xvfz ${D}/sources/libmpeg2-0.5.1.tar.gz pushd libmpeg2-0.5.1 ./configure \ --without-x \ --disable-sdl make install -D -m 755 libmpeg2/.libs/libmpeg2.so.0.1.0 ${D}/tmp/install/lib/libmpeg2.so.0.1.0 ln -sf libmpeg2.so.0.1.0 ${D}/tmp/install/lib/libmpeg2.so.0 ln -sf libmpeg2.so.0.1.0 ${D}/tmp/install/lib/libmpeg2.so install -D -m 755 ./libmpeg2/convert/.libs/libmpeg2convert.so.0.0.0 ${D}/tmp/install/lib/libmpeg2convert.so.0.0.0 ln -sf libmpeg2convert.so.0.0.0 ${D}/tmp/install/lib/libmpeg2convert.so.0 ln -sf libmpeg2convert.so.0.0.0 ${D}/tmp/install/lib/libmpeg2convert.so install -D -m 644 libmpeg2/libmpeg2.pc ${D}/tmp/install/lib/pkgconfig/libmpeg2.pc sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" libmpeg2/libmpeg2.pc > ${D}/tmp/install/lib/pkgconfig/libmpeg2.pc sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" libmpeg2/convert/libmpeg2convert.pc > ${D}/tmp/install/lib/pkgconfig/libmpeg2convert.pc for f in include/mpeg2.h libmpeg2/mpeg2_internal.h include/mpeg2convert.h; do install -D -m 644 ${f} ${D}/tmp/install/include/mpeg2dec/$(basename ${f}) done install -D -m 755 src/.libs/mpeg2dec ${D}/tmp/install/bin/mpegdec popd # ffmpeg tar xvfj ${D}/sources/ffmpeg-20080908.tar.bz2 pushd ffmpeg-20080908 CFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib" LDFLAGS="-L${D}/tmp/install/lib" ./configure \ --incdir=${D}/tmp/install/include/ffmpeg \ --libdir=${D}/tmp/install/lib \ --disable-demuxer=v4l \ --enable-libfaad \ --enable-libmp3lame \ --enable-libtheora \ --enable-libvorbis \ --enable-libxvid \ --enable-avfilter \ --enable-swscale \ --enable-postproc \ --enable-avfilter-lavf \ --enable-shared \ --enable-gpl \ --enable-liba52 make install -D -m 755 libavformat/libavformat.so.52 ${D}/tmp/install/lib/libavformat.so.52 ln -sf libavformat.so.52 ${D}/tmp/install/lib/libavformat.so install -D -m 755 libpostproc/libpostproc.so.51 ${D}/tmp/install/lib/libpostproc.so.51 ln -sf libpostproc.so.51 ${D}/tmp/install/lib/libpostproc.so install -D -m 755 libavcodec/libavcodec.so.51 ${D}/tmp/install/lib/libavcodec.so.51 ln -sf libavcodec.so.51 ${D}/tmp/install/lib/libavcodec.so install -D -m 755 libavfilter/libavfilter.so.0 ${D}/tmp/install/lib/libavfilter.so.0 ln -sf libavfilter.so.0 ${D}/tmp/install/lib/libavfilter.so install -D -m 755 libavdevice/libavdevice.so.52 ${D}/tmp/install/lib/libavdevice.so.52 ln -sf libavdevice.so.52 ${D}/tmp/install/lib/libavdevice.so install -D -m 755 libavutil/libavutil.so.49 ${D}/tmp/install/lib/libavutil.so.49 ln -sf libavutil.so.49 ${D}/tmp/install/lib/libavutil.so install -D -m 755 libswscale/libswscale.so.0 ${D}/tmp/install/lib/libswscale.so.0 ln -sf libswscale.so.0 ${D}/tmp/install/lib/libswscale.so install -D -m 755 ffmpeg ${D}/tmp/install/bin/ffmpeg install -D -m 755 ffmpeg_g ${D}/tmp/install/bin/ffmpeg_g install -D -m 755 ffserver ${D}/tmp/install/bin/ffserver install -D -m 755 ffserver_g ${D}/tmp/install/bin/ffserver_g for f in libavcodec/libavcodec.pc libavdevice/libavdevice.pc libavfilter/libavfilter.pc libavformat/libavformat.pc libavutil/libavutil.pc \ libpostproc/libpostproc.pc libswscale/libswscale.pc; do sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" $f > ${D}/tmp/install/lib/pkgconfig/$(basename $f) done for f in libavcodec/avcodec.h libavcodec/opt.h libavdevice/avdevice.h libavfilter/avfilter.h libavformat/avformat.h libavformat/avio.h \ libavutil/adler32.h libavutil/avstring.h libavutil/avutil.h libavutil/base64.h libavutil/common.h libavutil/crc.h \ libavutil/fifo.h libavutil/intfloat_readwrite.h libavutil/log.h libavutil/lzo.h libavutil/mathematics.h libavutil/md5.h \ libavutil/mem.h libavutil/rational.h libavutil/sha1.h libpostproc/postprocess.h libswscale/swscale.h; do install -D -m 644 $f ${D}/tmp/install/include/ffmpeg/$f ln -sf $f ${D}/tmp/install/include/ffmpeg/$(basename $f) done for f in libavcodec libavdevice libavfilter libavformat libavutil libpostproc libswscale; do ln -sf ffmpeg/$f ${D}/tmp/install/include/$f done popd # ffmpegthumbnailer tar xvfz ${D}/sources/ffmpegthumbnailer-2.0.2.tar.gz pushd ffmpegthumbnailer-2.0.2 PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig \ CFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ CXXFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ CPPFLAGS="-I${D}/tmp/install/include" \ LDFLAGS="-L${D}/tmp/install/lib" \ ./configure \ --includedir=${D}/tmp/install/include/libffmpegthumbnailer \ --libdir=${D}/tmp/install/lib make install -D -m 755 .libs/libffmpegthumbnailer.so.4.0.2 ${D}/tmp/install/lib/libffmpegthumbnailer.so.4.0.2 ln -sf libffmpegthumbnailer.so.4.0.2 ${D}/tmp/install/lib/libffmpegthumbnailer.so.4 ln -sf libffmpegthumbnailer.so.4.0.2 ${D}/tmp/install/lib/libffmpegthumbnailer.so for f in libffmpegthumbnailer/*.h; do install -D -m 644 ${f} ${D}/tmp/install/include/libffmpegthumbnailer/$(basename ${f}) done install -D -m 644 libffmpegthumbnailer.pc ${D}/tmp/install/lib/pkgconfig/libffmpegthumbnailer.pc popd # sqlite3 tar xvfz ${D}/sources/sqlite-amalgamation-3.7.0.1.tar.gz pushd sqlite-3.7.0.1 ./configure make install -D -m 755 .libs/libsqlite3.so.0.8.6 ${D}/tmp/install/lib/libsqlite3.so.0.8.6 ln -sf libsqlite3.so.0.8.6 ${D}/tmp/install/lib/libsqlite3.so.0 ln -sf libsqlite3.so.0.8.6 ${D}/tmp/install/lib/libsqlite3.so install -D -m 644 sqlite3.h ${D}/tmp/install/include/sqlite3.h install -D -m 755 .libs/sqlite3 ${D}/tmp/install/bin/sqlite3 sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" sqlite3.pc > ${D}/tmp/install/lib/pkgconfig/sqlite3.pc popd # mediatomb tar xvfz ${D}/sources/mediatomb-0.12.1.tar.gz pushd mediatomb-0.12.1 patch -p 0 < ${D}/sources/samsung_video_subtitles.patch CFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ CXXFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ CPPFLAGS="-I${D}/tmp/install/include" \ LDFLAGS="-L${D}/tmp/install/lib" \ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${D}/tmp/install/lib ./configure \ --prefix=${D_PREFIX} \ --disable-mysql \ --disable-id3lib \ --with-js-libs=${D}/tmp/install/lib \ --with-js-h=${D}/tmp/install/include/js \ --with-libmagic-h=${D}/tmp/install/include \ --with-libmagic-libs=${D}/tmp/install/lib \ --with-taglib-cfg=${D}/tmp/install/bin/taglib-config \ --with-libexif-h=${D}/tmp/install/include \ --with-libexif-libs=${D}/tmp/install/lib \ --with-libmp4v2-h=${D}/tmp/install/include/libmp4v2 \ --with-libmp4v2-libs=${D}/tmp/install/lib \ --enable-ffmpeg \ --with-avformat-h=${D}/tmp/install/include \ --with-avformat-libs=${D}/tmp/install/lib \ --with-avutil-libs=${D}/tmp/install/lib \ --with-ffmpegthumbnailer-libs=${D}/tmp/install/lib \ --with-ffmpegthumbnailer-h=${D}/tmp/install/include \ --with-sqlite3-libs=${D}/tmp/install/lib \ --with-sqlite3-h=${D}/tmp/install/include CFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ CXXFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ CPPFLAGS="-I${D}/tmp/install/include" LDFLAGS="-L${D}/tmp/install/lib" \ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${D}/tmp/install/lib \ make install -D -m 755 build/mediatomb ${D}/tmp/install/bin/mediatomb mkdir -p ${D}/tmp/install/share/mediatomb cp -a web ${D}/tmp/install/share/mediatomb/web cp -a scripts/js ${D}/tmp/install/share/mediatomb/js cp -a config/mappings.xml ${D}/tmp/install/share/mediatomb find ${D}/tmp/install/share/mediatomb -name Makefile | xargs rm -f popd # VLC tar xvfj ${D}/sources/vlc-1.1.2.tar.bz2 pushd vlc-1.1.2 PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig \ CFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ CXXFLAGS="${CFLAGS} -I${D}/tmp/install/include -L${D}/tmp/install/lib -Wl,--rpath-link,${D}/tmp/install/lib" \ CPPFLAGS="-I${D}/tmp/install/include" \ LDFLAGS="-L${D}/tmp/install/lib " \ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${D}/tmp/install/lib \ ./configure \ --prefix=${D_PREFIX} \ --enable-run-as-root \ --without-x \ --disable-bonjour \ --disable-dbus \ --disable-lua \ --disable-mad \ --disable-rpath \ --disable-xcb \ --disable-fribidi \ --disable-qt4 \ --disable-skins2 \ --disable-libgcrypt \ --disable-remoteosd \ --disable-v4l2 \ --disable-libv4l \ --disable-libv4l2 \ --disable-sdl \ --enable-libmpeg2 \ --enable-a52 \ make install -D -m 755 src/.libs/libvlccore.so.4.0.0 ${D}/tmp/install/lib/libvlccore.so.4.0.0 ln -sf libvlccore.so.4.0.0 ${D}/tmp/install/lib/libvlccore.so.4.0 ln -sf libvlccore.so.4.0.0 ${D}/tmp/install/lib/libvlccore.so install -D -m 755 src/.libs/libvlc.so.5.1.0 ${D}/tmp/install/lib/libvlc.so.5.1.0 ln -sf libvlc.so.5.1.0 ${D}/tmp/install/lib/libvlc.so.5 ln -sf libvlc.so.5.1.0 ${D}/tmp/install/lib/libvlc.so install -D -m 755 bin/.libs/vlc ${D}/tmp/install/bin/vlc install -D -m 755 ./bin/.libs/vlc-cache-gen ${D}/tmp/install/lib/vlc/vlc-cache-gen sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" src/libvlc.pc > ${D}/tmp/install/lib/pkgconfig/libvlc.pc sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" src/vlc-plugin.pc > ${D}/tmp/install/lib/pkgconfig/vlc-plugin.pc for f in $(find modules -name '*.so'); do install -D -m 755 ${f} ${D}/tmp/install/lib/vlc/$(echo ${f} | sed -e 's/^modules/plugins/; s/\.libs\///') done for f in include/vlc/*.h; do install -D -m 644 ${f} ${D}/tmp/install/include/vlc/$(basename ${f}) done for f in include/*.h; do install -D -m 644 ${f} ${D}/tmp/install/include/vlc/plugins/$(basename ${f}) done popd # libxml tar xvfz ${D}/sources/libxml-1.8.17.tar.gz pushd libxml-1.8.17 ./configure make install -D -m 755 .libs/libxml.so.1.8.17 ${D}/tmp/install/lib/libxml.so.1.8.17 ln -sf libxml.so.1.8.17 ${D}/tmp/install/lib/libxml.so.1 ln -sf libxml.so.1.8.17 ${D}/tmp/install/lib/libxml.so for f in SAX.h entities.h encoding.h parser.h parserInternals.h xml-error.h HTMLparser.h \ HTMLtree.h debugXML.h tree.h xpath.h xmlIO.h xmlmemory.h nanohttp.h nanoftp.h \ valid.h xlink.h uri.h; do install -D -m 644 ${f} ${D}/tmp/install/include/gnome-xml/$(basename ${f}) done sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" libxml.pc > ${D}/tmp/install/lib/pkgconfig/libxml.pc sed -e "s#prefix=/usr/local#prefix=${D}/tmp/install#" xml-config > ${D}/tmp/install/bin/xml-config chmod +x ${D}/tmp/install/bin/xml-config popd # xml2 tar xvfz ${D}/sources/xml2-0.4.tar.gz pushd xml2-0.4 PKG_CONFIG_PATH=${D}/tmp/install/lib/pkgconfig \ LDFLAGS="-L${D}/tmp/install/lib " \ ./configure make for f in 2csv 2xml csv2 xml2; do install -D -m 755 $f ${D}/tmp/install/bin/${f} done popd # system libs install -D -m 755 /usr/lib/libstdc++.so.6.0.3 ${D}/tmp/install/lib/libstdc++.so.6.0.3 install -D -m 755 /lib/libgcc_s.so.1 ${D}/tmp/install/lib/libgcc_s.so.1 ln -sf libstdc++.so.6.0.3 ${D}/tmp/install/lib/libstdc++.so.6 popd