buildrootschalter/package/tvheadend/tvheadend.mk
Bernd Kuhls a27065eb03 package/tvheadend: Add optional dependency to libiconv
To get reproducable builds depend on libiconv if needed.

tvheadend configure either shows

  checking for cc libiconv ...                      fail

or

  checking for cc libiconv ...                      ok

depending on the presence of libiconv, and gets linked

output/host/usr/bin/i586-buildroot-linux-uclibc-readelf -a output/target/usr/bin/tvheadend | grep NEEDED | grep iconv
 0x00000001 (NEEDED)                     Shared library: [libiconv.so.2]

Please note that libiconv is not a hard-dependency.

Tested with minimal defconfig

BR2_TOOLCHAIN_BUILDROOT_LARGEFILE=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
BR2_PACKAGE_LIBICONV=y
BR2_PACKAGE_TVHEADEND=y

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-06-11 15:18:20 +02:00

66 lines
1.9 KiB
Makefile

################################################################################
#
# tvheadend
#
################################################################################
TVHEADEND_VERSION = fd24558503967375d0b9058ac2a4c594de971cd2
TVHEADEND_SITE = $(call github,tvheadend,tvheadend,$(TVHEADEND_VERSION))
TVHEADEND_LICENSE = GPLv3+
TVHEADEND_LICENSE_FILES = LICENSE.md
TVHEADEND_DEPENDENCIES = host-pkgconf host-python openssl
ifeq ($(BR2_PACKAGE_AVAHI),y)
TVHEADEND_DEPENDENCIES += avahi
endif
ifeq ($(BR2_PACKAGE_LIBICONV),y)
TVHEADEND_DEPENDENCIES += libiconv
endif
TVHEADEND_DEPENDENCIES += dtv-scan-tables
define TVHEADEND_CONFIGURE_CMDS
(cd $(@D); \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
./configure \
--prefix=/usr \
--arch="$(ARCH)" \
--cpu="$(BR2_GCC_TARGET_CPU)" \
--python="$(HOST_DIR)/usr/bin/python" \
--disable-dvbscan \
)
endef
define TVHEADEND_BUILD_CMDS
$(MAKE) -C $(@D)
endef
define TVHEADEND_INSTALL_TARGET_CMDS
$(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
endef
#----------------------------------------------------------------------------
# To run tvheadend, we need:
# - a startup script, and its config file
# - a default DB with a tvheadend admin
# - a non-root user to run as
define TVHEADEND_INSTALL_DB
$(INSTALL) -D -m 0600 package/tvheadend/accesscontrol.1 \
$(TARGET_DIR)/home/tvheadend/.hts/tvheadend/accesscontrol/1
chmod -R go-rwx $(TARGET_DIR)/home/tvheadend
endef
TVHEADEND_POST_INSTALL_TARGET_HOOKS = TVHEADEND_INSTALL_DB
define TVHEADEND_INSTALL_INIT_SYSV
$(INSTALL) -D package/tvheadend/etc.default.tvheadend $(TARGET_DIR)/etc/default/tvheadend
$(INSTALL) -D package/tvheadend/S99tvheadend $(TARGET_DIR)/etc/init.d/S99tvheadend
endef
define TVHEADEND_USERS
tvheadend -1 tvheadend -1 * /home/tvheadend - video TVHeadend daemon
endef
$(eval $(generic-package))