summaryrefslogtreecommitdiffstats
path: root/rules/ply.make
blob: bb3c1998f155a12b984993d6fe661e46f4dc84ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# -*-makefile-*-
#
# Copyright (C) 2019 by Michael Olbrich <m.olbrich@pengutronix.de>
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
ifeq ($(PTXCONF_ARCH_X86),$(PTXCONF_ARCH_X86_64))
PACKAGES-$(PTXCONF_PLY) += ply
endif

#
# Paths and names
#
PLY_VERSION	:= 2.1.0
PLY_MD5		:= cd7b5258d636db5d330f45ec858f9a5c
PLY		:= ply-$(PLY_VERSION)
PLY_SUFFIX	:= tar.gz
PLY_URL		:= https://github.com/wkz/ply/releases/download/$(PLY_VERSION)/$(PLY).$(PLY_SUFFIX)
PLY_SOURCE	:= $(SRCDIR)/$(PLY).$(PLY_SUFFIX)
PLY_DIR		:= $(BUILDDIR)/$(PLY)
PLY_LICENSE	:= GPL-2.0-only

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

# The files generated by lex and yacc are part of the tarball
PLY_CONF_ENV := \
	$(CROSS_ENV) \
	ac_cv_prog_LEX=: \
	ac_cv_prog_YACC=:

#
# autoconf
#
PLY_CONF_TOOL	:= autoconf

ifdef PTXCONF_PLY
ifdef PTXCONF_KERNEL
ifneq ($(call remove_quotes,$(PTXCONF_KERNEL_HEADER_VERSION)),$(call remove_quotes,$(PTXCONF_KERNEL_VERSION)))
$(error ply only works if the kernel header version matches the kernel version)
endif
endif
endif

PLY_CPPFLAGS := -isystem $(KERNEL_HEADERS_INCLUDE_DIR)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/ply.targetinstall:
	@$(call targetinfo)

	@$(call install_init, ply)
	@$(call install_fixup, ply,PRIORITY,optional)
	@$(call install_fixup, ply,SECTION,base)
	@$(call install_fixup, ply,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
	@$(call install_fixup, ply,DESCRIPTION,missing)

	@$(call install_lib, ply, 0, 0, 0644, libply)
	@$(call install_copy, ply, 0, 0, 0755, -, /usr/sbin/ply)

	@$(call install_finish, ply)

	@$(call touch)

# vim: syntax=make