Magellan Linux

Contents of /trunk/extras/bluez/bluez-5.51-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33272 - (show annotations) (download)
Tue Oct 22 18:07:21 2019 UTC (4 years, 6 months ago) by niro
File size: 4507 byte(s)
removed deprecated patch
1 # $Id$
2
3 PNAME="bluez"
4 PVER="5.51"
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-242"
15 GLIB_DEPEND=">= dev-libs/glib2-2.62"
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-8.0"
25 HID_DEPEND="${UDEV_DEPEND}"
26 PLUGINS_DEPEND="${UDEV_DEPEND}"
27 CUPS_DEPEND="${GLIB_DEPEND}
28 ${DBUS_DEPEND}
29 >= net-print/cups-2.3"
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 )
49
50 UP2DATE="updatecmd http://www.kernel.org/pub/linux/bluetooth/ | grep ${PNAME}-[0-9] | highesttarball xz"
51
52 split_info_bluez-libs()
53 {
54 DESCRIPTION="Libraries for the Bluetooth protocol stack."
55 DEPEND="${LIB_DEPEND}"
56 }
57
58 split_info_bluez()
59 {
60 DESCRIPTION="Daemon and tools for the Bluetooth protocol stack."
61 DEPEND=">= net-wlan/bluez-libs-${PVER}
62 ${BLUEZ_DEPEND}"
63 }
64
65 split_info_bluez-cups()
66 {
67 DESCRIPTION="CUPS backend for Bluetooth printers."
68 DEPEND=">= net-wlan/bluez-${PVER}
69 ${CUPS_DEPEND}"
70 }
71
72 split_info_bluez-utils()
73 {
74 DESCRIPTION="Development and debugging utilities for the bluetooth protocol stack."
75 DEPEND=">= net-wlan/bluez-${PVER}
76 ${UTILS_DEPEND}"
77 }
78
79 split_info_bluez-hid2hci()
80 {
81 DESCRIPTION="CUPS backend for Bluetooth printers."
82 DEPEND=">= net-wlan/bluez-${PVER}
83 ${HID_DEPEND}"
84 }
85
86 split_info_bluez-plugins()
87 {
88 DESCRIPTION="bluez plugins (like support for the PS3 Sixaxis controller)."
89 DEPEND=">= net-wlan/bluez-${PVER}
90 ${PLUGINS_DEPEND}"
91 }
92
93 src_compile()
94 {
95 mconfigure \
96 --libexecdir=/usr/$(mlibdir) \
97 --localstatedir=/var \
98 --disable-debug \
99 --disable-test \
100 --enable-pie \
101 --enable-threads \
102 --enable-library \
103 --enable-tools \
104 --enable-monitor \
105 --enable-client \
106 --enable-cups \
107 --enable-obex \
108 --enable-systemd \
109 --enable-sixaxis \
110 || die
111
112 mmake || die
113 }
114
115 src_install_bluez-libs()
116 {
117 mmake DESTDIR=${BINDIR} install-libLTLIBRARIES || die
118 mmake DESTDIR=${BINDIR} install-includeHEADERS || die
119 mmake DESTDIR=${BINDIR} install-pkgconfigDATA || die
120 }
121
122 src_install_bluez()
123 {
124 mmake DESTDIR=${BINDIR} install-libexecPROGRAMS || die
125 mmake DESTDIR=${BINDIR} install-systemdsystemunitDATA || die
126 mmake DESTDIR=${BINDIR} install-systemduserunitDATA || die
127 mmake DESTDIR=${BINDIR} install-dbussessionbusDATA || die
128 mmake DESTDIR=${BINDIR} install-dbussystembusDATA || die
129 mmake DESTDIR=${BINDIR} install-dbusDATA || die
130 mmake DESTDIR=${BINDIR} install-man8 || die
131
132 # config
133 minstalldir /etc/bluetooth || die
134 minstallfile src/main.conf /etc/bluetooth || die
135 minstallfile profiles/input/input.conf /etc/bluetooth || die
136 minstallfile profiles/network/network.conf /etc/bluetooth || die
137 #minstallfile profiles/proximity/proximity.conf /etc/bluetooth || die
138
139 # modprobe config
140 minstalldir /etc/modprobe.d || die
141 minstallfile -s bluetooth.modprobe /etc/modprobe.d/bluetooth.conf || die
142
143 minstalldocs AUTHORS ChangeLog README || die
144 }
145
146 src_install_bluez-cups()
147 {
148 mmake DESTDIR=${BINDIR} install-cupsPROGRAMS || die
149 }
150
151 src_install_bluez-utils()
152 {
153 mmake DESTDIR=${BINDIR} install-binPROGRAMS || die
154 mmake DESTDIR=${BINDIR} install-man1 || die
155 # provided by hid2hci package
156 mdelete /usr/share/man/man1/hid2hci.1 || die
157 # provided by lib package
158 mmake DESTDIR=${BINDIR} uninstall-libLTLIBRARIES || die
159 }
160
161 src_install_bluez-hid2hci()
162 {
163 mmake DESTDIR=${BINDIR} install-udevPROGRAMS || die
164 mmake DESTDIR=${BINDIR} install-rulesDATA || die
165 minstallman tools/hid2hci.1 || die
166 }
167
168 src_install_bluez-plugins()
169 {
170 mmake DESTDIR=${BINDIR} install-pluginLTLIBRARIES || die
171 }
172
173 postinstall_bluez()
174 {
175 # reload dbus
176 mreloadunit dbus.service
177
178 # start bluetooth service
179 mstartunit bluetooth.service
180 }
181
182 postinstall_bluez-hid2hci()
183 {
184 if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
185 then
186 # reload udev-rules
187 udevadm control --reload-rules
188 udevadm trigger --subsystem-match=usb
189 fi
190 }
191
192 postremove_bluez()
193 {
194 # stop bluetooth service
195 mstopunit bluetooth.service
196
197 # reload dbus
198 mreloadunit dbus.service
199 }