Advertisement
LAPINPT

mkvtoolnix static build

Jun 28th, 2017
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.40 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Linux pve 4.4.21-1-pve Build
  4.  
  5. bDIR=/usr/local
  6.  
  7. mkdir -p ${bDIR}/src/mkvtoolnix; cd ${bDIR}/src/mkvtoolnix
  8. apt-get -y install build-essential autoconf git pkg-config #libcurl4-openssl-dev
  9. apt-get -y --no-install-recommends install ruby
  10.  
  11. export PKG_CONFIG_PATH=${bDIR}/lib/pkgconfig
  12. export LINGUAS=en
  13.  
  14. git clone https://github.com/Matroska-Org/libebml.git libebml-git
  15. pushd libebml-git
  16. libtoolize ; autoreconf -vi
  17. ./configure --prefix=${bDIR} --disable-shared --enable-static
  18. make -j`nproc` && make install
  19. popd
  20.  
  21. git clone https://github.com/Matroska-Org/libmatroska.git libmatroska-git
  22. pushd libmatroska-git
  23. libtoolize ; autoreconf -vi
  24. ./configure --prefix=${bDIR} --disable-shared --enable-static
  25. make -j`nproc` && make install
  26. popd
  27.  
  28. curl -sL http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.xz | tar -Jxf -
  29. pushd libogg-*
  30. ./configure --prefix=${bDIR} --disable-shared --enable-static
  31. make -j`nproc` && make install
  32. popd
  33.  
  34. curl -sL http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz | tar -Jxf -
  35. pushd libvorbis-*
  36. ./configure --prefix=${bDIR} --disable-shared --enable-static
  37. make -j`nproc` && make install
  38. popd
  39.  
  40. curl -sL "http://prdownloads.sourceforge.net/libpng/zlib-1.2.8.tar.xz?download" | tar -Jxf -
  41. pushd zlib-*
  42. ./configure --static --prefix=${bDIR}
  43. make -j`nproc` && make install
  44. popd
  45.  
  46. curl -sL ftp://ftp.astron.com/pub/file/file-5.27.tar.gz | tar zxf -
  47. pushd file-*
  48. ./configure --prefix=${bDIR} --disable-shared --enable-static --disable-elf
  49. make -j`nproc` && make install
  50. popd
  51.  
  52. curl http://downloads.xiph.org/releases/flac/flac-1.3.1.tar.xz | tar -Jxf -
  53. pushd flac-*
  54. ./configure --disable-doxygen-docs --prefix=${bDIR} --disable-shared --enable-static
  55. make -j`nproc` && make install
  56. popd
  57.  
  58. curl -sL "http://downloads.sourceforge.net/project/boost/boost/1.55.0/boost_1_55_0.tar.bz2" | tar -jxf -
  59. pushd boost_*
  60. ./bootstrap.sh --prefix=${bDIR} --libdir=${bDIR}/lib --with-libraries=filesystem,regex,date_time,system  #,locale,thread
  61. ./b2 -j`nproc` --reconfigure link=static --prefix=${bDIR} install
  62. popd
  63.  
  64. curl -sL "https://www.bunkus.org/videotools/mkvtoolnix/sources/mkvtoolnix-5.8.0.tar.bz2" | tar -jxf -
  65. pushd mkvtoolnix-*
  66. ./autogen.sh
  67. ./configure --prefix=${bDIR} \
  68. --with-extra-libs=${bDIR}/lib \
  69. --with-extra-includes=${bDIR}/include \
  70. --with-boost-libdir=${bDIR}/lib \
  71. --without-curl --disable-debug
  72. # --disable-gui --disable-wxwidgets --without-gettext --disable-lzo --disable-bz2 --without-flac
  73. ./drake -j`nproc`
  74. ./drake install
  75. popd
  76.  
  77. # mkvmergeGUI
  78. ln -sfv ${bDIR}/share/applications/mkv* /usr/share/applications/
  79.  
  80.  
  81. BackuP () {
  82.     pushd libebml-git ; make install ; popd ;
  83.     pushd libmatroska-git ; make install ; popd ;
  84.     pushd libogg-* ; make install ; popd ;
  85.     pushd libvorbis-* ; make install ; popd ;
  86.     pushd zlib-* ; make install ; popd ;
  87.     pushd file-* ; make install ; popd ;
  88.     pushd flac-* ; make install ; popd ;
  89.     pushd boost_* ; ./b2 -j`nproc` --reconfigure link=static --prefix=${bDIR} install ; popd ;
  90.     pushd mkvtoolnix-* ; ./drake install ; popd ;
  91.    
  92.     fltr='/(src/mkvtoolnix|mkinstalldirs |zh_..|eu|es|cs|de|nl|ja|ru|tr|uk|fr|it|lt|pl)/' ;
  93.     find ${bDIR} -mmin -5 -type f | egrep -v "$fltr" | tar -cvzf "mkvtoolnix-5.8.0-`date +%s`.tar.gz" -T - ;
  94. }
  95.  
  96. [ "$1" ] && BackuP
  97.  
  98. # REMOTE
  99. # apt install libwxgtk2.8-dev
  100. # tar xzvpf mkvtoolnix-5.8.0-*.tar.gz -C /
  101. # ln -sfv ${bDIR}/share/applications/mkv* /usr/share/applications/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement