Magellan Linux

Contents of /branches/R11-stable/extras/bluez/bluez-4.101-r5.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18071 - (show annotations) (download)
Thu Jun 27 06:56:02 2013 UTC (10 years, 11 months ago) by niro
File size: 4117 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="bluez"
4 PVER="4.101"
5 PBUILD="r5"
6
7 SPLIT_PACKAGES="bluez-libs bluez bluez-cups bluez-gstreamer bluez-alsa"
8
9 PCAT="net-wlan"
10
11 HOMEPAGE="http://www.bluez.org/"
12
13 COMMON_DEPEND=">= dev-libs/glib2-2.36
14 >= dev-libs/libusb-compat-0.1
15 >= sys-libs/readline-6.2
16 >= sys-fs/libudev-204
17 >= sys-apps/dbus-1.6
18 >= sys-libs/pam-1.1"
19 CUPS_DEPEND=">= net-print/cups-1.6"
20 GSTREAMER_DEPEND=">= media-libs/gstreamer0.10-0.10
21 >= media-libs/gstreamer0.10-plugins-base-0.10
22 >= dev-libs/libxml2-2.9"
23 ALSA_DEPEND=">= media-libs/alsa-lib-1.0.27"
24
25 SDEPEND="${COMMON_DEPEND}
26 ${CUPS_DEPEND}
27 ${GSTREAMER_DEPEND}
28 ${ALSA_DEPEND}
29 >= sys-dev/flex-2.5.35
30 >= dev-util/pkgconfig-0.25"
31
32 SRCFILE="${PNAME}-${PVER}.tar.xz"
33 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
34
35 sminclude mbuild mtools multilib cleanutils
36
37 SRC_URI=(
38 http://www.kernel.org/pub/linux/bluetooth/${SRCFILE}
39 mirror://${PNAME}/${SRCFILE}
40 mirror://${PNAME}/udev-bluetooth.rules
41 mirror://${PNAME}/udev-bluetooth.sh
42 )
43
44 UP2DATE="updatecmd 'http://www.kernel.org/pub/linux/bluetooth/?C=M;O=A' | grep ${PNAME}-[0-9] | lasttarball xz"
45
46 split_info_bluez-libs()
47 {
48 DESCRIPTION="Libraries for the Bluetooth protocol stack."
49 DEPEND=">= virtual/glibc"
50 }
51
52 split_info_bluez()
53 {
54 DESCRIPTION="Daemon and tools for the Bluetooth protocol stack."
55 DEPEND=">= net-wlan/bluez-libs-${PVER}
56 ${COMMON_DEPEND}"
57 }
58
59 split_info_bluez-cups()
60 {
61 DESCRIPTION="CUPS backend for Bluetooth printers."
62 DEPEND=">= net-wlan/bluez-libs-${PVER}
63 ${CUPS_DEPEND}"
64 }
65
66 split_info_bluez-gstreamer()
67 {
68 DESCRIPTION="Gstreamer support for SBC audio format."
69 DEPEND=">= net-wlan/bluez-libs-${PVER}
70 ${GSTREAMER_DEPEND}"
71 }
72
73 split_info_bluez-alsa()
74 {
75 DESCRIPTION="ALSA support for Bluetooth audio devices."
76 DEPEND=">= net-wlan/bluez-libs-${PVER}
77 ${ALSA_DEPEND}"
78 }
79
80 src_compile()
81 {
82 mconfigure \
83 --localstatedir=/var \
84 --disable-debug \
85 --enable-network \
86 --enable-serial \
87 --enable-input \
88 --enable-audio \
89 --enable-service \
90 --enable-gstreamer \
91 --enable-alsa \
92 --enable-usb \
93 --enable-tools \
94 --enable-bccmd \
95 --enable-hid2hci \
96 --enable-dfutool \
97 --disable-hidd \
98 --disable-pand \
99 --disable-dund \
100 --enable-cups \
101 --disable-test \
102 || die
103
104 mmake || die
105 }
106
107 src_install_bluez-libs()
108 {
109 mmake DESTDIR=${BINDIR} install-libLTLIBRARIES || die
110 }
111
112 src_install_bluez()
113 {
114 mmake DESTDIR=${BINDIR} install || die
115
116 # udev rules
117 minstalludevrule udev-bluetooth.rules 70-bluetooth.rules || die
118 minstalludevrule scripts/bluetooth-serial.rules 70-bluetooth-pcmcia.rules || die
119 minstalludevrule scripts/bluetooth-hid2hci.rules 70-bluetooth-hid2hci.rules || die
120 # udev helper
121 minstalludevhelper udev-bluetooth.sh bluetooth.sh || die
122 minstalludevhelper scripts/bluetooth_serial || die
123
124 # config
125 minstalldir /etc/bluetooth || die
126 minstallfile input/input.conf /etc/bluetooth || die
127 minstallfile audio/audio.conf /etc/bluetooth || die
128 minstallfile network/network.conf /etc/bluetooth || die
129
130 minstalldocs AUTHORS ChangeLog README || die
131
132 # cleanup and remove everything which is included in other packages
133 local myconf
134 [[ $(mlibdir) != lib ]] && myconf="usr/lib/bluetooth usr/lib/pkgconfig"
135 zapmost ${BINDIR} \
136 etc \
137 usr/lib/systemd \
138 usr/lib/udev \
139 var/lib/bluetooth \
140 usr/bin \
141 usr/include \
142 usr/sbin \
143 usr/share/doc \
144 usr/share/man \
145 usr/$(mlibdir)/bluetooth \
146 usr/$(mlibdir)/pkgconfig \
147 ${myconf} \
148 || die
149 }
150
151 src_install_bluez-cups()
152 {
153 mmake DESTDIR=${BINDIR} install-cupsPROGRAMS || die
154 }
155
156 src_install_bluez-gstreamer()
157 {
158 mmake DESTDIR=${BINDIR} install-gstreamerLTLIBRARIES || die
159 }
160
161 src_install_bluez-alsa()
162 {
163 mmake DESTDIR=${BINDIR} install-alsaLTLIBRARIES || die
164 mmake DESTDIR=${BINDIR} install-alsaconfDATA || die
165 }
166
167 postinstall_bluez()
168 {
169 if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
170 then
171 # reload udev-rules
172 udevadm control --reload-rules && udevadm trigger
173 fi
174
175 # reload dbus
176 mreloadunit dbus.service
177
178 # start bluetooth service
179 mstartunit bluetooth.service
180 }
181
182 postremove_bluez()
183 {
184 # stop bluetooth service
185 mstopunit bluetooth.service
186
187 # reload dbus
188 mreloadunit dbus.service
189 }