]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - lfs/bluetooth
dhcpcd: Update to 7.1.0
[people/pmueller/ipfire-2.x.git] / lfs / bluetooth
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007-2018 IPFire Team <info@ipfire.org> #
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
25 include Config
26
27 VER = 3.36
28
29 THISAPP = bluez-libs-$(VER)
30 DL_FILE = $(THISAPP).tar.gz
31 DL_FROM = $(URL_IPFIRE)
32 DIR_APP = $(DIR_SRC)/$(THISAPP)
33 TARGET = $(DIR_INFO)/$(THISAPP)
34 PROG = bluetooth
35 PAK_VER = 1
36
37 DEPS = "dbus"
38
39 ###############################################################################
40 # Top-level Rules
41 ###############################################################################
42
43 objects = $(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)
46 bluez-utils-$(VER).tar.gz = $(DL_FROM)/bluez-utils-$(VER).tar.gz
47 bluez-firmware-1.2.tar.gz = $(DL_FROM)/bluez-firmware-1.2.tar.gz
48 bluez-hcidump-1.42.tar.gz = $(DL_FROM)/bluez-hcidump-1.42.tar.gz
49
50 $(DL_FILE)_MD5 = 8c2ca546c0e7bb73dbd0e906fce7f6b1
51 bluez-utils-$(VER).tar.gz_MD5 = 4fc292b635ba7b442c7aaf5680199012
52 bluez-firmware-1.2.tar.gz_MD5 = 1cc3cefad872e937e05de5a0a2b390dd
53 bluez-hcidump-1.42.tar.gz_MD5 = 5704737aaf72104eeaf77335218a1827
54
55 install : $(TARGET)
56
57 check : $(patsubst %,$(DIR_CHK)/%,$(objects))
58
59 download :$(patsubst %,$(DIR_DL)/%,$(objects))
60
61 md5 : $(subst %,%_MD5,$(objects))
62
63 dist:
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)
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)
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
95 cd $(DIR_APP)/bluez-utils-$(VER) && ./configure --prefix=/usr \
96 --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib \
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
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 \
104 test/passkey-agent /usr/bin/passkey-agent
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 \
109 --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib
110 cd $(DIR_APP)/bluez-hcidump-1.42 && make $(MAKETUNING)
111 cd $(DIR_APP)/bluez-hcidump-1.42 && make install
112 mv -f /etc/udev/bluetooth.rules /lib/udev/rules.d/24-bluetooth.rules
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
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
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
128 install -v -m 644 $(DIR_SRC)/config/backup/includes/bluetooth /var/ipfire/backup/addons/includes/bluetooth
129
130 #install initscripts
131 $(call INSTALL_INITSCRIPT,bluetooth)
132
133 @rm -rf $(DIR_SRC)/bluez*
134 @$(POSTBUILD)