You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

157 lines
3.9 KiB

  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=tvheadend
  9. PKG_VERSION:=4.2.8
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/tvheadend/tvheadend/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=1aef889373d5fad2a7bd2f139156d4d5e34a64b6d38b87b868a2df415f01f7ad
  14. PKG_LICENSE:=GPL-3.0
  15. PKG_LICENSE_FILES:=LICENSE.md
  16. PKG_FIXUP:=autoreconf
  17. PKG_USE_MIPS16:=0
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/nls.mk
  20. define Package/tvheadend
  21. SECTION:=multimedia
  22. CATEGORY:=Multimedia
  23. TITLE:=Tvheadend is a TV streaming server for Linux
  24. DEPENDS:=+libopenssl +librt +zlib +libffi +TVHEADEND_AVAHI_SUPPORT:libavahi-client $(ICONV_DEPENDS)
  25. USERID:=tvheadend:dvb
  26. URL:=https://tvheadend.org
  27. MAINTAINER:=Marius Dinu <m95d+git@psihoexpert.ro>
  28. endef
  29. define Package/tvheadend/description
  30. Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android
  31. supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, SAT>IP and HDHomeRun as input sources.
  32. Tvheadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming.
  33. endef
  34. define Package/tvheadend/config
  35. menu "Configuration"
  36. depends on PACKAGE_tvheadend
  37. source "$(SOURCE)/Config.in"
  38. endmenu
  39. endef
  40. # Generic build options
  41. ifneq ($(CONFIG_PKG_ASLR_PIE_NONE),)
  42. CONFIGURE_ARGS += --disable-pie
  43. endif
  44. # TV sources
  45. ifeq ($(CONFIG_TVHEADEND_LINUXDVB_SUPPORT),)
  46. CONFIGURE_ARGS += --disable-linuxdvb
  47. endif
  48. ifeq ($(CONFIG_TVHEADEND_DVBSCAN_SUPPORT),)
  49. CONFIGURE_ARGS += --disable-dvbscan
  50. endif
  51. ifeq ($(CONFIG_TVHEADEND_IPTV),)
  52. CONFIGURE_ARGS += --disable-iptv
  53. endif
  54. ifeq ($(CONFIG_TVHEADEND_SATIP_SERVER),)
  55. CONFIGURE_ARGS += --disable-satip_server
  56. endif
  57. ifeq ($(CONFIG_TVHEADEND_SATIP_CLIENT),)
  58. CONFIGURE_ARGS += --disable-satip_client
  59. endif
  60. ifeq ($(CONFIG_TVHEADEND_HDHOMERUN_CLIENT),)
  61. CONFIGURE_ARGS += --disable-hdhomerun_static
  62. else
  63. CONFIGURE_ARGS += --enable-hdhomerun_client
  64. endif
  65. # Descrambling
  66. ifeq ($(CONFIG_TVHEADEND_CWC_SUPPORT),)
  67. CONFIGURE_ARGS += --disable-cwc
  68. endif
  69. ifeq ($(CONFIG_TVHEADEND_CAPMT_SUPPORT),)
  70. CONFIGURE_ARGS += --disable-capmt
  71. endif
  72. ifeq ($(CONFIG_TVHEADEND_CCW_SUPPORT),)
  73. CONFIGURE_ARGS += --disable-constcw
  74. endif
  75. # Other options
  76. ifeq ($(CONFIG_TVHEADEND_AVAHI_SUPPORT),)
  77. CONFIGURE_ARGS += --disable-avahi
  78. else
  79. CONFIGURE_ARGS += --enable-avahi
  80. endif
  81. ifeq ($(CONFIG_TVHEADEND_IMAGECACHE),)
  82. CONFIGURE_ARGS += --disable-imagecache
  83. else
  84. CONFIGURE_ARGS += --enable-imagecache
  85. endif
  86. ifeq ($(CONFIG_TVHEADEND_TRACE),)
  87. CONFIGURE_ARGS += --disable-trace
  88. endif
  89. # libav and ffmpeg are broken, so remove codecs too.
  90. CONFIGURE_ARGS += \
  91. --arch=$(ARCH) \
  92. --disable-dbus_1 \
  93. --disable-libav \
  94. --disable-ffmpeg_static \
  95. --disable-libx264 \
  96. --disable-libx264_static \
  97. --disable-libx265 \
  98. --disable-libx265_static \
  99. --disable-libvpx \
  100. --disable-libvpx_static \
  101. --disable-libtheora \
  102. --disable-libtheora_static \
  103. --disable-libvorbis \
  104. --disable-libvorbis_static \
  105. --disable-libfdkaac \
  106. --disable-libfdkaac_static \
  107. --enable-bundle \
  108. --nowerror=unused-variable
  109. define Build/Prepare
  110. $(call Build/Prepare/Default)
  111. echo 'Tvheadend $(shell echo $(PKG_SOURCE_VERSION) | sed "s/^v//")~openwrt$(PKG_RELEASE)' \
  112. > $(PKG_BUILD_DIR)/debian/changelog
  113. endef
  114. define Package/conffiles
  115. /etc/config/tvheadend
  116. endef
  117. define Package/tvheadend/install
  118. $(INSTALL_DIR) $(1)/etc/init.d
  119. $(INSTALL_BIN) ./files/tvheadend.init $(1)/etc/init.d/tvheadend
  120. $(INSTALL_DIR) $(1)/etc/config
  121. $(INSTALL_CONF) ./files/tvheadend.config $(1)/etc/config/tvheadend
  122. $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
  123. $(INSTALL_BIN) ./files/dvb.hotplug $(1)/etc/hotplug.d/usb/50-dvb
  124. $(INSTALL_DIR) $(1)/usr/bin
  125. $(INSTALL_BIN) $(PKG_BUILD_DIR)/build.linux/tvheadend $(1)/usr/bin/
  126. endef
  127. $(eval $(call BuildPackage,tvheadend))