actions.py 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Licensed under the GNU General Public License, version 3.
  5. # See the file http://www.gnu.org/licenses/gpl.txt
  6. import os
  7. from pisi.actionsapi import get
  8. from pisi.actionsapi import autotools
  9. from pisi.actionsapi import pisitools
  10. from pisi.actionsapi import shelltools
  11. def setup():
  12. shelltools.system("./configure --prefix=/usr \
  13. --mandir=/usr/share/man \
  14. --incdir=/usr/include/ffmpeg4.4 \
  15. --libdir=/usr/lib/ffmpeg4.4 \
  16. --disable-debug \
  17. --disable-static \
  18. --disable-stripping \
  19. --enable-version3 \
  20. --enable-nonfree \
  21. --enable-avfilter \
  22. --enable-avresample \
  23. --enable-frei0r \
  24. --enable-gpl \
  25. --enable-ladspa \
  26. --enable-libaom \
  27. --enable-libaribb24 \
  28. --enable-libass \
  29. --enable-libbluray \
  30. --enable-libbs2b \
  31. --enable-libcelt \
  32. --enable-libcdio \
  33. --enable-libcodec2 \
  34. --enable-libdav1d \
  35. --enable-libdavs2 \
  36. --enable-libdc1394 \
  37. --enable-libfdk-aac \
  38. --enable-libflite \
  39. --enable-libfontconfig \
  40. --enable-libfreetype \
  41. --enable-libfribidi \
  42. --enable-libgme \
  43. --enable-libgsm \
  44. --enable-libiec61883 \
  45. --enable-libilbc \
  46. --enable-libjack \
  47. --enable-libkvazaar \
  48. --disable-liblensfun \
  49. --enable-libmodplug \
  50. --enable-libmp3lame \
  51. --enable-libopencore_amrnb \
  52. --enable-libopencore_amrwb \
  53. --enable-libopenjpeg \
  54. --enable-libopus \
  55. --enable-libpulse \
  56. --enable-librsvg \
  57. --enable-librubberband \
  58. --enable-librtmp \
  59. --enable-libshine \
  60. --enable-libsnappy \
  61. --enable-libsoxr \
  62. --enable-libspeex \
  63. --enable-libtheora \
  64. --enable-libtwolame \
  65. --enable-libvidstab \
  66. --enable-libv4l2 \
  67. --enable-libvo-amrwbenc \
  68. --enable-libvorbis \
  69. --enable-libvpx \
  70. --enable-libwebp \
  71. --enable-libx264 \
  72. --enable-libx265 \
  73. --enable-libxavs \
  74. --enable-libxavs2 \
  75. --enable-libxcb \
  76. --enable-libxvid \
  77. --enable-libxml2 \
  78. --enable-libzmq \
  79. --enable-libzimg \
  80. --enable-pic \
  81. --enable-postproc \
  82. --enable-librav1e \
  83. --enable-runtime-cpudetect \
  84. --enable-shared \
  85. --enable-libsvtav1 \
  86. --enable-swresample \
  87. --enable-vdpau \
  88. --enable-opencl \
  89. --enable-openssl \
  90. --enable-libdrm \
  91. --enable-libmfx \
  92. --enable-vaapi \
  93. --enable-vdpau \
  94. --enable-omx \
  95. --enable-libsrt \
  96. --extra-ldflags='-lasound -lm'")
  97. # --enable-openal \
  98. def build():
  99. autotools.make()
  100. autotools.make('tools/qt-faststart')
  101. autotools.make("doc/ff{mpeg,play}.1")
  102. def install():
  103. autotools.rawInstall("DESTDIR=%s install-man" % get.installDIR())
  104. pisitools.dobin("tools/qt-faststart")
  105. pisitools.dodoc("Changelog", "README.md", "LICENSE.md", "COPYING*")
  106. pisitools.removeDir("/usr/share")
  107. pisitools.removeDir("/usr/bin")
  108. # for libs in os.listdir("%s/usr/lib/ffmpeg4.4/*.so*" % get.installDIR()):
  109. # pisitools.dosym("/usr/lib/ffmpeg4.4/%s" % libs, "/usr/lib/%s" % libs)
  110. for lib in shelltools.ls("%s/usr/lib/ffmpeg4.4" % get.installDIR()):
  111. pisitools.dosym("/usr/lib/ffmpeg4.4/%s" % lib, "/usr/lib/%s" % lib)
  112. pisitools.remove("/usr/lib/pkgconfig")
  113. pisitools.remove("/usr/lib/libavutil.so")
  114. pisitools.remove("/usr/lib/libswscale.so")
  115. pisitools.remove("/usr/lib/libavcodec.so")
  116. pisitools.remove("/usr/lib/libpostproc.so")
  117. pisitools.remove("/usr/lib/libavdevice.so")
  118. pisitools.remove("/usr/lib/libavfilter.so")
  119. pisitools.remove("/usr/lib/libavformat.so")
  120. pisitools.remove("/usr/lib/libswresample.so")