2012年9月5日 星期三

[MiniDLNA][ubuntu] How to install MiniDLNA package in Ubuntu 10.04

Install in Ubuntu10.04

%%%%%%%%%%%%%%%%%%%%%%%%

sqlite3:

sqlite-autoconf-3071300

http://www.sqlite.org/download.html

If can't make. rm the folder of sqlite3.

tar again. Excute configure again.



./configure --prefix=/home/freeman/happy/usr/ --enable-shared



--enable-shared (Share library for other source can use)



A static library(.a) is a library that can be linked directly into the final executable produced by the linker,it is contained in it and there is no need to have the library into the system where the executable will be deployed.



A shared library(.so) is a library that is linked but not embedded in the final executable, so will be loaded when the executable is launched and need to be present in the system where the executable is deployed.



Reference:

http://stackoverflow.com/questions/9688200/difference-between-shared-objects-so-static-libraries-a-and-dlls-so

%%%%%%%%%%%%%%%%%%%%%

jpeg

jpegsrc.v8d

jpegsrc.v6b

http://www.ijg.org/

http://libjpeg.sourceforge.net/

./configure --prefix=/home/freeman/happy/usr/ --enable-shared



%%%%%%%%%%%%%%%%%%

Before install libid3tag

Please install zlib (zlib1g-dev)

zlib

./configure --prefix=/home/freeman/happy/usr/ --sharedlibdir=/home/freeman/happy/usr/



###############################

check g++ before install.



libid3tag

libid3tag-0.15.1b

http://t2-project.org/packages/libid3tag.html



./configure --prefix=/home/freeman/happy/usr/ --enable-shared CPPFLAGS=-I/home/freeman/happy/usr/include/ LDFLAGS=-L/home/freeman/happy/usr/lib/



CPPFLAGS=-I/home/freeman/happy/usr/include/ ( indicate where is zlib.h )

LDFLAGS=-L/home/freeman/happy/usr/lib/ ( indicate where is library )

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



libogg

libogg-1.3.0

http://libzplay.sourceforge.net/VORBIS.html  <-- can find ogg vorbis FLAC source code

http://www.xiph.org/ogg/

./configure --prefix=/home/freeman/happy/usr/ --enable-shared

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

libvorbis

libvorbis-1.3.3

http://www.xiph.org/vorbis/

http://www.linuxfromscratch.org/blfs/view/stable/multimedia/libvorbis.html

libvorbis-1.3.3

./configure --prefix=/home/freeman/happy/usr/ --enable-shared

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

FLAC

flac-1.2.0

http://flac.sourceforge.net/download.html

flac-1.2.0 - ubuntu 10.04 OK

./configure --prefix=/home/freeman/happy/usr/ --enable-shared

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

yasm

yasm-1.2.0

http://yasm.tortall.net/Download.html

./configure --prefix=/home/freeman/happy/usr/



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

libexif

libexif-0.6.21

http://libexif.sourceforge.net/

./configure --prefix=/home/freeman/happy/usr/ --enable-shared --enable-static



#####################################

exif



./configure --enable-shared --prefix=/home/freeman/happy/usr/ POPT_CFLAGS=-I/home/freeman/happy/usr/include/ POPT_LIBS=-L/home/freeman/happy/usr/lib/  LIBEXIF_CFLAGS=-I/home/freeman/happy/usr/include/libexif/ LIBEXIF_LIBS="-L/home/freeman/happy/usr/lib/ /home/freeman/happy/usr/lib/libexif.so /home/freeman/happy/usr/lib/libpopt.so" --with-libexif="/home/freeman/happy/usr/lib/ /home/freeman/happy/usr/include"



Question 1:

actions.h:24:31: fatal   error: libexif/exif-data.h: No such file or directory

Answer 1:

copy libexif which under /home/freeman/happy/usr/include/ to exif-0.6.21/libjpeg



Question 2:

/home/freeman/happy/usr/include/iconv.h:25:20: error: _types.h: No such file or directory

Answer 2:

libiconv

iconv.h

http://www.gnu.org/software/libiconv/#downloading



./configure --prefix=/home/freeman/happy/usr/ --enable-shared



Question 3:

main.c:41:18: error: popt.h: No such file or directory



Answer 3:

Install popt-1.16.tar.gz

./configure --prefix=/home/freeman/happy/usr/ --enable-shared



Question 4:

Test each module



Answer 4:

gedit Makefile

Goto 278

SUBDIRS = exif

#SUBDIRS = m4m po libjpeg exif test



Question 5:

Why can't find some function which in libexif and libpopt.

Answer 5:

After compile libexif and libpopt.

I make install into /home/freeman/happy/usr/.

The library of libexif is in /home/freeman/happy/usr/lib/libexif.so.

The library of libpopt is in /home/freeman/happy/usr/lib/libpopt.so.

I must use shared library(.so) that can compiler successfully.



LIBEXIF_LIBS = "-L/home/freeman/happy/usr/lib/ /home/freeman/happy/usr/lib/libexif.so /home/freeman/happy/usr/lib/libpopt.so"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

ffmpeg

ffmpeg-0.11.1

http://ffmpeg.org/



vim configure

yasmexe_default="/home/freeman/happy/usr/bin/yasm"



./configure --prefix=/home/freeman/happy/usr/ --enable-shared

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



After all of library install.

All folder wii install under /home/freeman/happy/usr/.

There are five folder which is "bin  include  lib  man  share".



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

minidlna



gedit configure

Remove all of the description like below.

Because I don't want to check all of those package.

# Detect if there are missing headers

# NOTE: This check only works with a normal distro

[ ! -e "/usr/include/sqlite3.h" ] && MISSING="libsqlite3 $MISSING"

[ ! -e "/usr/include/jpeglib.h" ] && MISSING="libjpeg $MISSING"

[ ! -e "/usr/include/libexif/exif-loader.h" ] && MISSING="libexif $MISSING"

[ ! -e "/usr/include/id3tag.h" ] && MISSING="libid3tag $MISSING"

[ ! -e "/usr/include/ogg/ogg.h" ] && MISSING="libogg $MISSING"

[ ! -e "/usr/include/vorbis/codec.h" ] && MISSING="libvorbis $MISSING"

[ ! -e "/usr/include/FLAC/metadata.h" ] && MISSING="libflac $MISSING"

[ ! -e "/usr/include/ffmpeg/avutil.h" -a \

  ! -e "/usr/include/libavutil/avutil.h" -a \

  ! -e "/usr/include/ffmpeg/libavutil/avutil.h" ] && MISSING="libavutil $MISSING"

[ ! -e "/usr/include/ffmpeg/avformat.h" -a \

  ! -e "/usr/include/libavformat/avformat.h" -a \

  ! -e "/usr/include/ffmpeg/libavformat/avformat.h" ] && MISSING="libavformat $MISSING"

[ ! -e "/usr/include/ffmpeg/avcodec.h" -a \

  ! -e "/usr/include/libavcodec/avcodec.h" -a \

  ! -e "/usr/include/ffmpeg/libavcodec/avcodec.h" ] && MISSING="libavcodec $MISSING"





gedit Makefile

Find CFLAGS.

Change CFLAGS like below.



#CFLAGS = -Wall -O -D_GNU_SOURCE -g -DDEBUG

#CFLAGS = -Wall -g -Os -D_GNU_SOURCE

CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \

     -I/home/freeman/happy/usr/include/ \

     -I/home/freeman/happy/usr/include/ffmpeg \

     -I/home/freeman/happy/usr/include/libavutil

     -I/home/freeman/happy/usr//include/libavcodec

     -I/home/freeman/happy/usr//include/libavformat \

     -I/home/freeman/happy/usr/include/ffmpeg/libavutil \

     -I/home/freeman/happy/usr//include/ffmpeg/libavcodec \

     -I/home/freeman/happy/usr//include/ffmpeg/libavformat \

     -L/home/freeman/happy/usr/lib/ -lexif \

     -L/home/freeman/happy/usr/lib/ -ljpeg \

     -L/home/freeman/happy/usr/lib/ -lsqlite3 \

     -L/home/freeman/happy/usr/lib/ -lavformat \

     -L/home/freeman/happy/usr/lib/ -lavutil \

     -L/home/freeman/happy/usr/lib/ -lavcodec \

     -L/home/freeman/happy/usr/lib/ -lid3tag \

     -L/home/freeman/happy/usr/lib/ -lFLAC \

     -L/home/freeman/happy/usr/lib/ -logg \

     -L/home/freeman/happy/usr/lib/ -lvorbis\

     -L/home/freeman/happy/usr/lib/ -liconv



make --> that include genconfig.sh

so just press make


Related Posts:

0 意見:

張貼留言