actions.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/usr/bin/env 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. from pisi.actionsapi import cmaketools
  7. from pisi.actionsapi import pisitools
  8. from pisi.actionsapi import shelltools
  9. from pisi.actionsapi import autotools
  10. from pisi.actionsapi import get
  11. def setup():
  12. shelltools.cd("%s" % get.workDIR())
  13. shelltools.move("tg_owt-*", "tg-owt-%s" % get.srcVERSION())
  14. shelltools.cd("tg-owt-%s" % get.srcVERSION())
  15. shelltools.system("git clone https://github.com/google/crc32c")
  16. shelltools.system("git clone https://chromium.googlesource.com/libyuv/libyuv.git")
  17. # shelltools.system("git clone https://github.com/cisco/libsrtp")
  18. shelltools.system("git clone https://github.com/abseil/abseil-cpp.git")
  19. # shelltools.system("rm -rf src/third_party/libvpx/source/libvpx")
  20. # shelltools.move("libvpx/*", "src/third_party/libvpx/source/libvpx")
  21. shelltools.move("libyuv*/*", "src/third_party/libyuv")
  22. shelltools.move("abseil-cpp/*", "src/third_party/abseil-cpp")
  23. shelltools.move("libsrtp*/*", "src/third_party/libsrtp")
  24. shelltools.move("crc32c/*", "src/third_party/crc32c/src")
  25. # shelltools.system("rm -rf src/third_party/crc32c/src")
  26. # shelltools.move("crc32c-1.1.2/*", "src/third_party/crc32c/src")
  27. pisitools.cflags.add(" -ffat-lto-objects")
  28. pisitools.cxxflags.add(" -ffat-lto-objects -I/usr/include/libdrm")
  29. cmaketools.configure("-B build -G Ninja -DCMAKE_BUILD_TYPE=Release \
  30. -DCMAKE_INSTALL_PREFIX=/usr \
  31. -DBUILD_SHARED_LIBS=OFF \
  32. -DTG_OWT_LIBJPEG_INCLUDE_PATH=/usr/include \
  33. -DTG_OWT_OPENSSL_INCLUDE_PATH=/usr/include \
  34. -DTG_OWT_OPUS_INCLUDE_PATH=/usr/include/opus \
  35. -DTG_OWT_LIBVPX_INCLUDE_PATH=/usr/include \
  36. -DTG_OWT_FFMPEG_INCLUDE_PATH=/usr/include")
  37. def build():
  38. shelltools.cd("%s" % get.workDIR())
  39. shelltools.cd("tg-owt-%s/build" % get.srcVERSION())
  40. shelltools.system("ninja")
  41. def install():
  42. shelltools.cd("%s" % get.workDIR())
  43. shelltools.cd("tg-owt-%s/build" % get.srcVERSION())
  44. shelltools.system("DESTDIR=%s ninja install" % get.installDIR())
  45. shelltools.cd("..")
  46. pisitools.dodoc("LICENSE")