]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - lfs/bluetooth
Updated mISDN to current socket trunk
[people/pmueller/ipfire-2.x.git] / lfs / bluetooth
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007 Michael Tremer & Christian Schmidt #
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 glib"
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) && ./configure --prefix=/usr \
88 --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib
89 cd $(DIR_APP) && make $(MAKETUNING)
90 cd $(DIR_APP) && make install
91 cd $(DIR_SRC) && tar xzf $(DIR_DL)/bluez-utils-$(VER).tar.gz
92 cd $(DIR_SRC)/bluez-utils-$(VER) && ./configure --prefix=/usr \
93 --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib \
94 --enable-alsa --enable-usb --enable-netlink --enable-tools \
95 --enable-bccmd --enable-hid2hci --enable-dfutool --enable-hidd \
96 --enable-pand --enable-dund --enable-cups --enable-test \
97 --enable-configfiles --enable-pcmciarules
98 cd $(DIR_SRC)/bluez-utils-$(VER) && make $(MAKETUNING)
99 cd $(DIR_SRC)/bluez-utils-$(VER) && make install
100 cd $(DIR_SRC)/bluez-utils-$(VER) && install -m 755 \
101 test/passkey-agent /usr/bin/passkey-agent
102 cd $(DIR_SRC) && tar xzf $(DIR_DL)/bluez-firmware-1.2.tar.gz
103 cd $(DIR_SRC)/bluez-firmware-1.2 && ./configure --libdir=/lib
104 cd $(DIR_SRC)/bluez-firmware-1.2 && make $(MAKETUNING)
105 cd $(DIR_SRC)/bluez-firmware-1.2 && make install
106 cd $(DIR_SRC) && tar xzf $(DIR_DL)/bluez-hcidump-1.42.tar.gz
107 cd $(DIR_SRC)/bluez-hcidump-1.42 && ./configure --prefix=/usr \
108 --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib
109 cd $(DIR_SRC)/bluez-hcidump-1.42 && make $(MAKETUNING)
110 cd $(DIR_SRC)/bluez-hcidump-1.42 && make install
111 mv -f /etc/udev/bluetooth.rules /etc/udev/rules.d/24-bluetooth.rules
112 # Change bluetooth peername to Hostname-devicenumber
113 sed -i -e 's|name "BlueZ (%d)";|name "%h-%d";|g' /etc/bluetooth/hcid.conf
114 # Create empty config files
115 echo '# Bluetooth audio configuration' > /etc/bluetooth/audio.conf
116 echo '# Bluetooth main configuration' > /etc/bluetooth/main.conf
117 echo '# Bluetooth input configuration' > /etc/bluetooth/input.conf
118 echo '# Bluetooth network configuration' > /etc/bluetooth/network.conf
119 echo '# Bluetooth rfcomm configuration' > /etc/bluetooth/rfcomm.conf
120 mkdir -p /var/ipfire/bluetooth
121 touch /var/ipfire/bluetooth/settings
122 chown nobody:nobody /var/ipfire/bluetooth/settings
123 chmod 644 /var/ipfire/bluetooth/settings
124 install -v -m 644 $(DIR_SRC)/config/backup/includes/bluetooth /var/ipfire/backup/addons/includes/bluetooth
125 @rm -rf $(DIR_SRC)/bluez*
126 @$(POSTBUILD)