summaryrefslogtreecommitdiffstats
path: root/rules/ofono.make
blob: 0524d7e835756b8db9438cfdc9182cf2005c8c26 (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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# -*-makefile-*-
#
# Copyright (C) 2021 by Roland Hieber, Pengutronix <rhi@pengutronix.de>
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_OFONO) += ofono

#
# Paths and names
#
OFONO_VERSION		:= 1.32
OFONO_MD5		:= 7496b3b89ab84bfb4ccfc26cda3fdf5e
OFONO			:= ofono-$(OFONO_VERSION)
OFONO_SUFFIX		:= tar.xz
OFONO_URL		:= $(call ptx/mirror, KERNEL, network/ofono/$(OFONO).$(OFONO_SUFFIX))
OFONO_SOURCE		:= $(SRCDIR)/$(OFONO).$(OFONO_SUFFIX)
OFONO_DIR		:= $(BUILDDIR)/$(OFONO)
OFONO_LICENSE		:= GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later
OFONO_LICENSE_FILES	:= \
	file://COPYING;md5=eb723b61539feef013de476e68b5c50a \
	file://src/main.c;startline=7;endline=18;md5=cd0127f490f549377abc525c09d2673a \
	file://btio/btio.c;startline=9;endline=21;md5=eecbd02555c55f436075d7cca5c93d29 \
	file://gdbus/mainloop.c;startline=8;endline=20;md5=eecbd02555c55f436075d7cca5c93d29 \
	file://ell/main.c;startline=7;endline=19;md5=165042f5afe0b75cb88eebd3658d7927 \

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

#
# autoconf
#
OFONO_CONF_TOOL	:= autoconf
OFONO_CONF_OPT	:= \
	$(CROSS_AUTOCONF_USR) \
	--enable-optimization \
	--disable-debug \
	--disable-pie \
	--$(call ptx/endis, PTXCONF_OFONO_TESTS)-test \
	--disable-tools \
	--disable-dundee \
	--enable-udev \
	--enable-atmodem \
	--enable-cdmamodem \
	--enable-phonesim \
	--enable-isimodem \
	--enable-rilmodem \
	--enable-qmimodem \
	--enable-mbimmodem \
	--$(call ptx/endis, PTXCONF_OFONO_BLUETOOTH)-bluetooth \
	--disable-bluez4 \
	--disable-provision \
	--disable-upower \
	--disable-external-ell \
	--enable-datafiles \
	--with-systemdunitdir=/usr/lib/systemd/system

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

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

	@$(call install_init, ofono)
	@$(call install_fixup, ofono,PRIORITY,optional)
	@$(call install_fixup, ofono,SECTION,base)
	@$(call install_fixup, ofono,AUTHOR,"Roland Hieber, Pengutronix <rhi@pengutronix.de>")
	@$(call install_fixup, ofono,DESCRIPTION,missing)

	@$(call install_copy, ofono, 0, 0, 0755, -, /usr/sbin/ofonod)

	@$(call install_alternative, ofono, 0, 0, 0644, /etc/dbus-1/system.d/ofono.conf)
	@$(call install_alternative, ofono, 0, 0, 0644, /etc/ofono/phonesim.conf)
	@$(call install_alternative, ofono, 0, 0, 0644, /usr/lib/udev/rules.d/96-ofono.rules)

ifdef PTXCONF_INITMETHOD_SYSTEMD
	@$(call install_alternative, ofono, 0, 0, 0644, /usr/lib/systemd/system/ofono.service)
endif

ifdef PTXCONF_OFONO_TESTS
	@$(call install_tree, ofono, 0, 0, -, /usr/lib/ofono/test)
endif
	@$(call install_finish, ofono)

	@$(call touch)

# vim: syntax=make