summaryrefslogtreecommitdiffstats
path: root/rules/bluez.make
blob: f0413dd54d6d6854f17bdfbd93ef244329abc157 (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# -*-makefile-*-
#
# Copyright (C) 2010 by Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_BLUEZ) += bluez

#
# Paths and names
#
BLUEZ_VERSION	:= 4.69
BLUEZ		:= bluez-$(BLUEZ_VERSION)
BLUEZ_SUFFIX	:= tar.gz
BLUEZ_URL	:= http://www.kernel.org/pub/linux/bluetooth/$(BLUEZ).$(BLUEZ_SUFFIX)
BLUEZ_SOURCE	:= $(SRCDIR)/$(BLUEZ).$(BLUEZ_SUFFIX)
BLUEZ_DIR	:= $(BUILDDIR)/$(BLUEZ)
BLUEZ_LICENSE	:= GPLv2+ LGPLv2.1+

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

#
# autoconf
#
BLUEZ_CONF_TOOL	:= autoconf
BLUEZ_CONF_OPT	:= $(CROSS_AUTOCONF_USR) \
	--enable-audio \
	--enable-bccmd \
	--disable-capng \
	--enable-configfiles \
	--disable-cups \
	--enable-debug \
	--disable-dfutool \
	--disable-dund \
	--disable-fortify \
	--disable-hid2hci \
	--disable-hidd \
	--enable-input \
	--enable-libtool-lock \
	--disable-maemo6 \
	--disable-netlink \
	--enable-network \
	--enable-optimization \
	--disable-pand \
	--disable-pcmcia \
	--disable-pie \
	--disable-pnat \
	--enable-serial \
	--enable-service \
	--enable-shared \
	--disable-static \
	--enable-test \
	--disable-tracer \
	--enable-tools \
	--enable-udevrules \
	--enable-usb

ifdef PTXCONF_BLUEZ_ALSA
BLUEZ_CONF_OPT += --enable-alsa
else
BLUEZ_CONF_OPT += --disable-alsa
endif

ifdef PTXCONF_BLUEZ_GSTREAMER
BLUEZ_CONF_OPT += --enable-gstreamer
else
BLUEZ_CONF_OPT += --disable-gstreamer
endif

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

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

	@$(call install_init,  bluez)
	@$(call install_fixup, bluez,PRIORITY,optional)
	@$(call install_fixup, bluez,SECTION,base)
	@$(call install_fixup, bluez,AUTHOR,"Uwe Kleine-Koenig <u.kleine-koenig@pengutronix.de>")
	@$(call install_fixup, bluez,DESCRIPTION,missing)

	@$(foreach lib,libbluetooth.so.3.9.0, \
	$(call install_copy, bluez, 0, 0, 0644, -, /usr/lib/$(lib)); \
	$(call install_link, bluez, $(lib), /usr/lib/$(basename $(lib))); \
	$(call install_link, bluez, $(lib), /usr/lib/$(basename $(basename $(lib)))); \
	)

ifdef PTXCONF_BLUEZ_ALSA
	@$(foreach alsamod,ctl_bluetooth pcm_bluetooth, \
	$(call install_copy, bluez, 0, 0, 0644, -, /usr/lib/alsa-lib/libasound_module_$(alsamod).so); \
	)
endif

ifdef PTXCONF_BLUEZ_GSTREAMER
	@$(call install_copy, bluez, 0, 0, 0644, -, /usr/lib/gstreamer-0.10/libgstbluetooth.so)
endif

ifdef PTXCONF_BLUEZ_UTILS
	@$(foreach binprogram,ciptool l2ping hcitool rctest rfcomm sdptool, \
	$(call install_copy, bluez, 0, 0, 0755, -, /usr/bin/$(binprogram)); \
	)

	@$(foreach sbinprogram,bccmd hciattach hciconfig, \
	$(call install_copy, bluez, 0, 0, 0755, -, /usr/sbin/$(sbinprogram)); \
	)
endif

ifdef PTXCONF_BLUEZ_INSTALL_TESTSCRIPTS
	@$(foreach testprog, simple-agent simple-service test-telephony test-adapter test-audio \
		test-device test-discovery test-input test-manager test-network test-serial \
		test-service test-telephony test-textfile monitor-bluetooth, \
	$(call install_alternative, bluez, 0, 0, 0755, /test/$(testprog), n, /usr/share/doc/bluez/examples/$(testprog)); \
	)
endif

	@$(call install_copy, bluez, 0, 0, 0755, -, /usr/sbin/bluetoothd)

	@$(call install_copy, bluez, 0, 0, 0644, -, /etc/dbus-1/system.d/bluetooth.conf)
	@$(foreach udevrule, $(notdir $(wildcard $(BLUEZ_PKGDIR)/lib/udev/rules.d/*.rules)), \
	$(call install_copy, bluez, 0, 0, 0644, -, /lib/udev/rules.d/$(udevrule)); \
	)

	@$(call install_finish, bluez)
	@$(call touch)

# vim: syntax=make