xref: /OK3568_Linux_fs/buildroot/package/lirc-tools/lirc-tools.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# lirc-tools
4#
5################################################################################
6
7LIRC_TOOLS_VERSION = 0.10.1
8LIRC_TOOLS_SOURCE = lirc-$(LIRC_TOOLS_VERSION).tar.bz2
9LIRC_TOOLS_SITE = http://downloads.sourceforge.net/project/lirc/LIRC/$(LIRC_TOOLS_VERSION)
10LIRC_TOOLS_LICENSE = GPL-2.0+
11LIRC_TOOLS_LICENSE_FILES = COPYING
12LIRC_TOOLS_SELINUX_MODULES = lircd
13LIRC_TOOLS_DEPENDENCIES = host-libxslt host-pkgconf host-python3
14LIRC_TOOLS_INSTALL_STAGING = YES
15# Patching configure.ac and Makefile.am
16LIRC_TOOLS_AUTORECONF = YES
17
18LIRC_TOOLS_CONF_ENV = XSLTPROC=yes HAVE_WORKING_POLL=yes
19LIRC_TOOLS_CONF_OPTS = --without-x --enable-devinput --enable-uinput
20
21ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4),y)
22LIRC_TOOLS_CONF_ENV += \
23	DEVINPUT_HEADER=$(STAGING_DIR)/usr/include/linux/input-event-codes.h
24else
25LIRC_TOOLS_CONF_ENV += \
26	DEVINPUT_HEADER=$(STAGING_DIR)/usr/include/linux/input.h
27endif
28
29ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
30LIRC_TOOLS_DEPENDENCIES += udev
31endif
32
33ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
34LIRC_TOOLS_DEPENDENCIES += alsa-lib
35endif
36
37ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y)
38LIRC_TOOLS_DEPENDENCIES += libusb-compat
39endif
40
41ifeq ($(BR2_PACKAGE_PORTAUDIO),y)
42LIRC_TOOLS_DEPENDENCIES += portaudio
43endif
44
45ifeq ($(BR2_PACKAGE_LIBFTDI1),y)
46LIRC_TOOLS_DEPENDENCIES += libftdi1
47endif
48
49ifeq ($(BR2_PACKAGE_PYTHON3),y)
50LIRC_TOOLS_DEPENDENCIES += python3 host-python-setuptools
51LIRC_TOOLS_MAKE_ENV += SETUPTOOLS_ENV='$(PKG_PYTHON_SETUPTOOLS_ENV)'
52endif
53
54define LIRC_TOOLS_INSTALL_INIT_SYSV
55	$(INSTALL) -D -m 0755 package/lirc-tools/S25lircd \
56		$(TARGET_DIR)/etc/init.d/S25lircd
57endef
58
59$(eval $(autotools-package))
60