1
0

Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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.0.9
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_SUBDIR:=$(PKG_NAME)
  12. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
  14. PKG_SOURCE_PROTO:=git
  15. PKG_SOURCE_URL:=https://github.com/tvheadend/tvheadend.git
  16. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
  17. PKG_LICENSE:=GPL-3.0
  18. PKG_LICENSE_FILES:=LICENSE.md
  19. PKG_FIXUP:=autoreconf
  20. PKG_USE_MIPS16:=0
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. define Package/tvheadend
  24. SECTION:=multimedia
  25. CATEGORY:=Multimedia
  26. TITLE:=Tvheadend is a TV streaming server for Linux
  27. DEPENDS:=+libopenssl +librt +zlib +TVHEADEND_AVAHI_SUPPORT:libavahi-client $(ICONV_DEPENDS)
  28. URL:=https://tvheadend.org
  29. MAINTAINER:=Jan Čermák <jan.cermak@nic.cz>
  30. endef
  31. define Package/tvheadend/description
  32. Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android
  33. supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, IPTV, SAT>IP and HDHomeRun as input sources.
  34. Tvheadend offers the HTTP (VLC, MPlayer), HTSP (Kodi, Movian) and SAT>IP streaming.
  35. endef
  36. define Package/tvheadend/config
  37. menu "Configuration"
  38. depends on PACKAGE_tvheadend
  39. source "$(SOURCE)/Config.in"
  40. endmenu
  41. endef
  42. ifeq ($(CONFIG_TVHEADEND_CWC_SUPPORT),)
  43. CONFIGURE_ARGS += --disable-cwc
  44. endif
  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_AVAHI_SUPPORT),)
  52. CONFIGURE_ARGS += --disable-avahi
  53. else
  54. CONFIGURE_ARGS += --enable-avahi
  55. endif
  56. CONFIGURE_ARGS += \
  57. --arch=$(ARCH) \
  58. --disable-dbus_1 \
  59. --disable-libav \
  60. --enable-bundle
  61. define Build/Prepare
  62. $(call Build/Prepare/Default)
  63. echo 'Tvheadend $(shell echo $(PKG_SOURCE_VERSION) | sed "s/^v//")~openwrt$(PKG_RELEASE)' \
  64. > $(PKG_BUILD_DIR)/debian/changelog
  65. endef
  66. define Package/conffiles
  67. /etc/config/tvheadend
  68. endef
  69. define Package/tvheadend/install
  70. $(INSTALL_DIR) $(1)/etc/init.d
  71. $(INSTALL_BIN) ./files/tvheadend.init $(1)/etc/init.d/tvheadend
  72. $(INSTALL_DIR) $(1)/etc/config
  73. $(INSTALL_CONF) ./files/tvheadend.config $(1)/etc/config/tvheadend
  74. $(INSTALL_DIR) $(1)/usr/bin
  75. $(INSTALL_BIN) $(PKG_BUILD_DIR)/build.linux/tvheadend $(1)/usr/bin/
  76. endef
  77. $(eval $(call BuildPackage,tvheadend))