slang: revert parallelized build
[ipfire-2.x.git] / lfs / bluetooth
CommitLineData
2c1b94f0
AF
1###############################################################################
2# #
3# IPFire.org - A linux based firewall #
eee037b8 4# Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
2c1b94f0
AF
5# #
6# This program is free software: you can redistribute it and/or modify #
7# it under the terms of the GNU General Public License as published by #
8# the Free Software Foundation, either version 3 of the License, or #
9# (at your option) any later version. #
10# #
11# This program is distributed in the hope that it will be useful, #
12# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14# GNU General Public License for more details. #
15# #
16# You should have received a copy of the GNU General Public License #
17# along with this program. If not, see <http://www.gnu.org/licenses/>. #
18# #
19###############################################################################
20
21###############################################################################
22# Definitions
23###############################################################################
24
25include Config
26
27VER = 3.36
28
29THISAPP = bluez-libs-$(VER)
30DL_FILE = $(THISAPP).tar.gz
31DL_FROM = $(URL_IPFIRE)
32DIR_APP = $(DIR_SRC)/$(THISAPP)
33TARGET = $(DIR_INFO)/$(THISAPP)
44e8a23a 34PROG = bluetooth
2c1b94f0
AF
35PAK_VER = 1
36
06042c2e 37DEPS = "dbus"
2c1b94f0
AF
38
39###############################################################################
40# Top-level Rules
41###############################################################################
42
43objects = $(DL_FILE) bluez-utils-$(VER).tar.gz bluez-firmware-1.2.tar.gz bluez-hcidump-1.42.tar.gz
44
45$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
46bluez-utils-$(VER).tar.gz = $(DL_FROM)/bluez-utils-$(VER).tar.gz
47bluez-firmware-1.2.tar.gz = $(DL_FROM)/bluez-firmware-1.2.tar.gz
48bluez-hcidump-1.42.tar.gz = $(DL_FROM)/bluez-hcidump-1.42.tar.gz
49
50$(DL_FILE)_MD5 = 8c2ca546c0e7bb73dbd0e906fce7f6b1
51bluez-utils-$(VER).tar.gz_MD5 = 4fc292b635ba7b442c7aaf5680199012
52bluez-firmware-1.2.tar.gz_MD5 = 1cc3cefad872e937e05de5a0a2b390dd
53bluez-hcidump-1.42.tar.gz_MD5 = 5704737aaf72104eeaf77335218a1827
54
55install : $(TARGET)
56
57check : $(patsubst %,$(DIR_CHK)/%,$(objects))
58
59download :$(patsubst %,$(DIR_DL)/%,$(objects))
60
61md5 : $(subst %,%_MD5,$(objects))
62
63dist:
64 @$(PAK)
65
66###############################################################################
67# Downloading, checking, md5sum
68###############################################################################
69
70$(patsubst %,$(DIR_CHK)/%,$(objects)) :
71 @$(CHECK)
72
73$(patsubst %,$(DIR_DL)/%,$(objects)) :
74 @$(LOAD)
75
76$(subst %,%_MD5,$(objects)) :
77 @$(MD5)
78
79###############################################################################
80# Installation Details
81###############################################################################
82
83$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
84 @$(PREBUILD)
85 @rm -rf $(DIR_SRC)/bluez*
86 cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
483ba6a1
MT
87 cd $(DIR_APP) && tar xzf $(DIR_DL)/bluez-utils-$(VER).tar.gz
88 cd $(DIR_APP) && tar xzf $(DIR_DL)/bluez-firmware-1.2.tar.gz
89 cd $(DIR_APP) && tar xzf $(DIR_DL)/bluez-hcidump-1.42.tar.gz
90 $(UPDATE_AUTOMAKE)
2c1b94f0
AF
91 cd $(DIR_APP) && ./configure --prefix=/usr \
92 --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib
93 cd $(DIR_APP) && make $(MAKETUNING)
94 cd $(DIR_APP) && make install
483ba6a1 95 cd $(DIR_APP)/bluez-utils-$(VER) && ./configure --prefix=/usr \
2c1b94f0 96 --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib \
108b0cc3
AF
97 --enable-alsa --enable-usb --enable-netlink --enable-tools \
98 --enable-bccmd --enable-hid2hci --enable-dfutool --enable-hidd \
99 --enable-pand --enable-dund --enable-cups --enable-test \
100 --enable-configfiles --enable-pcmciarules
483ba6a1
MT
101 cd $(DIR_APP)/bluez-utils-$(VER) && make $(MAKETUNING)
102 cd $(DIR_APP)/bluez-utils-$(VER) && make install
103 cd $(DIR_APP)/bluez-utils-$(VER) && install -m 755 \
2c1b94f0 104 test/passkey-agent /usr/bin/passkey-agent
483ba6a1
MT
105 cd $(DIR_APP)/bluez-firmware-1.2 && ./configure --libdir=/lib
106 cd $(DIR_APP)/bluez-firmware-1.2 && make $(MAKETUNING)
107 cd $(DIR_APP)/bluez-firmware-1.2 && make install
108 cd $(DIR_APP)/bluez-hcidump-1.42 && ./configure --prefix=/usr \
2c1b94f0 109 --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib
483ba6a1
MT
110 cd $(DIR_APP)/bluez-hcidump-1.42 && make $(MAKETUNING)
111 cd $(DIR_APP)/bluez-hcidump-1.42 && make install
ae0d87a6 112 mv -f /etc/udev/bluetooth.rules /lib/udev/rules.d/24-bluetooth.rules
a538898a
AF
113 # Patch udev rules for new udev version
114 sed -i -e "s/SYSFS{/ATTRS{/g" /lib/udev/rules.d/24-bluetooth.rules
115 sed -i -e "s/BUS==/SUBSYSTEMS==/g" /lib/udev/rules.d/24-bluetooth.rules
108b0cc3
AF
116 # Change bluetooth peername to Hostname-devicenumber
117 sed -i -e 's|name "BlueZ (%d)";|name "%h-%d";|g' /etc/bluetooth/hcid.conf
118 # Create empty config files
119 echo '# Bluetooth audio configuration' > /etc/bluetooth/audio.conf
120 echo '# Bluetooth main configuration' > /etc/bluetooth/main.conf
121 echo '# Bluetooth input configuration' > /etc/bluetooth/input.conf
122 echo '# Bluetooth network configuration' > /etc/bluetooth/network.conf
123 echo '# Bluetooth rfcomm configuration' > /etc/bluetooth/rfcomm.conf
643fb017
AF
124 mkdir -p /var/ipfire/bluetooth
125 touch /var/ipfire/bluetooth/settings
126 chown nobody:nobody /var/ipfire/bluetooth/settings
127 chmod 644 /var/ipfire/bluetooth/settings
7e49b322 128 install -v -m 644 $(DIR_SRC)/config/backup/includes/bluetooth /var/ipfire/backup/addons/includes/bluetooth
5f53bd1c
JS
129
130 #install initscripts
131 $(call INSTALL_INITSCRIPT,bluetooth)
132
2c1b94f0
AF
133 @rm -rf $(DIR_SRC)/bluez*
134 @$(POSTBUILD)