Annotation of /trunk/extras/bluez/bluez-5.48-r1.smage2
Parent Directory | Revision Log
Revision 30437 -
(hide annotations)
(download)
Mon Jan 22 12:53:46 2018 UTC (6 years, 8 months ago) by niro
File size: 4769 byte(s)
Mon Jan 22 12:53:46 2018 UTC (6 years, 8 months ago) by niro
File size: 4769 byte(s)
-proximity config not provided anymore
1 | niro | 30436 | # $Id$ |
2 | |||
3 | PNAME="bluez" | ||
4 | PVER="5.48" | ||
5 | PBUILD="r1" | ||
6 | |||
7 | SPLIT_PACKAGES="bluez-libs bluez bluez-cups bluez-utils bluez-hid2hci bluez-plugins" | ||
8 | |||
9 | PCAT="net-wlan" | ||
10 | |||
11 | HOMEPAGE="http://www.bluez.org/" | ||
12 | |||
13 | DBUS_DEPEND=">= sys-apps/dbus-1.10" | ||
14 | UDEV_DEPEND=">= sys-fs/udev-230" | ||
15 | GLIB_DEPEND=">= dev-libs/glib2-2.52" | ||
16 | |||
17 | LIB_DEPEND=">= virtual/glibc" | ||
18 | BLUEZ_DEPEND="${GLIB_DEPEND} | ||
19 | ${DBUS_DEPEND} | ||
20 | >= dev-libs/libical-1" | ||
21 | UTILS_DEPEND="${GLIB_DEPEND} | ||
22 | ${DBUS_DEPEND} | ||
23 | ${UDEV_DEPEND} | ||
24 | >= sys-libs/readline-7.0" | ||
25 | HID_DEPEND="${UDEV_DEPEND}" | ||
26 | PLUGINS_DEPEND="${UDEV_DEPEND}" | ||
27 | CUPS_DEPEND="${GLIB_DEPEND} | ||
28 | ${DBUS_DEPEND} | ||
29 | >= net-print/cups-2.1" | ||
30 | |||
31 | SDEPEND="${LIB_DEPEND} | ||
32 | ${BLUEZ_DEPEND} | ||
33 | ${CUPS_DEPEND} | ||
34 | ${UTILS_DEPEND} | ||
35 | ${HID_DEPEND} | ||
36 | ${PLUGINS_DEPEND} | ||
37 | >= dev-util/pkgconfig-0.25" | ||
38 | |||
39 | SRCFILE="${PNAME}-${PVER}.tar.xz" | ||
40 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" | ||
41 | |||
42 | sminclude mtools multilib mbuild udev systemd cleanutils | ||
43 | |||
44 | SRC_URI=( | ||
45 | http://www.kernel.org/pub/linux/bluetooth/${SRCFILE} | ||
46 | mirror://${PNAME}/${SRCFILE} | ||
47 | mirror://${PNAME}/bluetooth.modprobe | ||
48 | mirror://${PNAME}/${PNAME}-5.14-allow-using-obexd-without-systemd-in-the-user-session.patch | ||
49 | ) | ||
50 | |||
51 | UP2DATE="updatecmd http://www.kernel.org/pub/linux/bluetooth/ | grep ${PNAME}-[0-9] | highesttarball xz" | ||
52 | |||
53 | split_info_bluez-libs() | ||
54 | { | ||
55 | DESCRIPTION="Libraries for the Bluetooth protocol stack." | ||
56 | DEPEND="${LIB_DEPEND}" | ||
57 | } | ||
58 | |||
59 | split_info_bluez() | ||
60 | { | ||
61 | DESCRIPTION="Daemon and tools for the Bluetooth protocol stack." | ||
62 | DEPEND=">= net-wlan/bluez-libs-${PVER} | ||
63 | ${BLUEZ_DEPEND}" | ||
64 | } | ||
65 | |||
66 | split_info_bluez-cups() | ||
67 | { | ||
68 | DESCRIPTION="CUPS backend for Bluetooth printers." | ||
69 | DEPEND=">= net-wlan/bluez-${PVER} | ||
70 | ${CUPS_DEPEND}" | ||
71 | } | ||
72 | |||
73 | split_info_bluez-utils() | ||
74 | { | ||
75 | DESCRIPTION="Development and debugging utilities for the bluetooth protocol stack." | ||
76 | DEPEND=">= net-wlan/bluez-${PVER} | ||
77 | ${UTILS_DEPEND}" | ||
78 | } | ||
79 | |||
80 | split_info_bluez-hid2hci() | ||
81 | { | ||
82 | DESCRIPTION="CUPS backend for Bluetooth printers." | ||
83 | DEPEND=">= net-wlan/bluez-${PVER} | ||
84 | ${HID_DEPEND}" | ||
85 | } | ||
86 | |||
87 | split_info_bluez-plugins() | ||
88 | { | ||
89 | DESCRIPTION="bluez plugins (like support for the PS3 Sixaxis controller)." | ||
90 | DEPEND=">= net-wlan/bluez-${PVER} | ||
91 | ${PLUGINS_DEPEND}" | ||
92 | } | ||
93 | |||
94 | src_prepare() | ||
95 | { | ||
96 | munpack ${SRCFILE} || die | ||
97 | |||
98 | # fix obexd | ||
99 | mpatch ${PNAME}-5.14-allow-using-obexd-without-systemd-in-the-user-session.patch || die | ||
100 | mautoreconf || die | ||
101 | } | ||
102 | |||
103 | src_compile() | ||
104 | { | ||
105 | mconfigure \ | ||
106 | --libexecdir=/usr/$(mlibdir) \ | ||
107 | --localstatedir=/var \ | ||
108 | --disable-debug \ | ||
109 | --disable-test \ | ||
110 | --enable-pie \ | ||
111 | --enable-threads \ | ||
112 | --enable-library \ | ||
113 | --enable-tools \ | ||
114 | --enable-monitor \ | ||
115 | --enable-client \ | ||
116 | --enable-cups \ | ||
117 | --enable-obex \ | ||
118 | --enable-systemd \ | ||
119 | --enable-sixaxis \ | ||
120 | || die | ||
121 | |||
122 | mmake || die | ||
123 | } | ||
124 | |||
125 | src_install_bluez-libs() | ||
126 | { | ||
127 | mmake DESTDIR=${BINDIR} install-libLTLIBRARIES || die | ||
128 | mmake DESTDIR=${BINDIR} install-includeHEADERS || die | ||
129 | mmake DESTDIR=${BINDIR} install-pkgconfigDATA || die | ||
130 | } | ||
131 | |||
132 | src_install_bluez() | ||
133 | { | ||
134 | mmake DESTDIR=${BINDIR} install-libexecPROGRAMS || die | ||
135 | mmake DESTDIR=${BINDIR} install-systemdsystemunitDATA || die | ||
136 | mmake DESTDIR=${BINDIR} install-systemduserunitDATA || die | ||
137 | mmake DESTDIR=${BINDIR} install-dbussessionbusDATA || die | ||
138 | mmake DESTDIR=${BINDIR} install-dbussystembusDATA || die | ||
139 | mmake DESTDIR=${BINDIR} install-dbusDATA || die | ||
140 | mmake DESTDIR=${BINDIR} install-man8 || die | ||
141 | |||
142 | # config | ||
143 | minstalldir /etc/bluetooth || die | ||
144 | minstallfile src/main.conf /etc/bluetooth || die | ||
145 | minstallfile profiles/input/input.conf /etc/bluetooth || die | ||
146 | minstallfile profiles/network/network.conf /etc/bluetooth || die | ||
147 | niro | 30437 | #minstallfile profiles/proximity/proximity.conf /etc/bluetooth || die |
148 | niro | 30436 | |
149 | # modprobe config | ||
150 | minstalldir /etc/modprobe.d || die | ||
151 | minstallfile -s bluetooth.modprobe /etc/modprobe.d/bluetooth.conf || die | ||
152 | |||
153 | minstalldocs AUTHORS ChangeLog README || die | ||
154 | } | ||
155 | |||
156 | src_install_bluez-cups() | ||
157 | { | ||
158 | mmake DESTDIR=${BINDIR} install-cupsPROGRAMS || die | ||
159 | } | ||
160 | |||
161 | src_install_bluez-utils() | ||
162 | { | ||
163 | mmake DESTDIR=${BINDIR} install-binPROGRAMS || die | ||
164 | mmake DESTDIR=${BINDIR} install-man1 || die | ||
165 | # provided by hid2hci package | ||
166 | mdelete /usr/share/man/man1/hid2hci.1 || die | ||
167 | # provided by lib package | ||
168 | mmake DESTDIR=${BINDIR} uninstall-libLTLIBRARIES || die | ||
169 | } | ||
170 | |||
171 | src_install_bluez-hid2hci() | ||
172 | { | ||
173 | mmake DESTDIR=${BINDIR} install-udevPROGRAMS || die | ||
174 | mmake DESTDIR=${BINDIR} install-rulesDATA || die | ||
175 | minstallman tools/hid2hci.1 || die | ||
176 | } | ||
177 | |||
178 | src_install_bluez-plugins() | ||
179 | { | ||
180 | mmake DESTDIR=${BINDIR} install-pluginLTLIBRARIES || die | ||
181 | } | ||
182 | |||
183 | postinstall_bluez() | ||
184 | { | ||
185 | # reload dbus | ||
186 | mreloadunit dbus.service | ||
187 | |||
188 | # start bluetooth service | ||
189 | mstartunit bluetooth.service | ||
190 | } | ||
191 | |||
192 | postinstall_bluez-hid2hci() | ||
193 | { | ||
194 | if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] | ||
195 | then | ||
196 | # reload udev-rules | ||
197 | udevadm control --reload-rules | ||
198 | udevadm trigger --subsystem-match=usb | ||
199 | fi | ||
200 | } | ||
201 | |||
202 | postremove_bluez() | ||
203 | { | ||
204 | # stop bluetooth service | ||
205 | mstopunit bluetooth.service | ||
206 | |||
207 | # reload dbus | ||
208 | mreloadunit dbus.service | ||
209 | } |