Contents of /branches/magellan-next/extras/bluez/bluez-4.96-r3.smage2
Parent Directory | Revision Log
Revision 9575 -
(show annotations)
(download)
Tue Dec 13 13:47:03 2011 UTC (12 years, 9 months ago) by niro
File size: 4658 byte(s)
Tue Dec 13 13:47:03 2011 UTC (12 years, 9 months ago) by niro
File size: 4658 byte(s)
-split-package
1 | # $Id$ |
2 | |
3 | PNAME="bluez" |
4 | PVER="4.96" |
5 | PBUILD="r3" |
6 | |
7 | SPLIT_PACKAGES="bluez-libs bluez bluez-cups bluez-gstreamer bluez-alsa" |
8 | PCATEGORIE="net-wlan" |
9 | |
10 | HOMEPAGE="http://www.bluez.org/" |
11 | |
12 | COMMON_DEPEND=">= dev-libs/glib2-2.28 |
13 | >= dev-libs/libusb-1.0 |
14 | >= dev-libs/libnl-1.1 |
15 | >= sys-fs/udev-171 |
16 | >= sys-apps/dbus-1.4 |
17 | >= sys-libs/pam-1.1" |
18 | CUPS_DEPEND=">= net-print/cups-1.5" |
19 | GSTREAMER_DEPEND=">= media-libs/gstreamer-0.10.35 |
20 | >= media-libs/gst-plugins-base-0.10.35" |
21 | ALSA_DEPEND=">= media-libs/alsa-lib-1.0.24 |
22 | >= media-libs/libsndfile-1.0.25" |
23 | |
24 | SDEPEND="${COMMON_DEPEND} |
25 | ${CUPS_DEPEND} |
26 | ${GSTREAMER_DEPEND} |
27 | ${ALSA_DEPEND} |
28 | >= sys-dev/flex-2.5.35 |
29 | >= dev-util/pkgconfig-0.25" |
30 | |
31 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
32 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
33 | |
34 | sminclude mtools multilib cleanutils |
35 | |
36 | SRC_URI=( |
37 | http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/distfiles/${SRCFILE} |
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 | mirror://${PNAME}/${PNAME}-4.56-as-needed.patch |
43 | mirror://${PNAME}/${PNAME}-4.56-cups-location.patch |
44 | ) |
45 | |
46 | UP2DATE="updatecmd 'http://www.kernel.org/pub/linux/bluetooth/?C=M;O=A' | grep ${PNAME}-[0-9] | lasttarball gz" |
47 | |
48 | split_info_bluez-libs() |
49 | { |
50 | DESCRIPTION="Libraries for the Bluetooth protocol stack." |
51 | DEPEND="" |
52 | } |
53 | |
54 | split_info_bluez() |
55 | { |
56 | DESCRIPTION="Daemon and tools for the Bluetooth protocol stack." |
57 | DEPEND=">= net-wlan/bluez-libs-${PVER} |
58 | ${COMMON_DEPEND}" |
59 | } |
60 | |
61 | split_info_bluez-cups() |
62 | { |
63 | DESCRIPTION="CUPS backend for Bluetooth printers." |
64 | DEPEND=">= net-wlan/bluez-libs-${PVER} |
65 | ${CUPS_DEPEND}" |
66 | } |
67 | |
68 | split_info_bluez-gstreamer() |
69 | { |
70 | DESCRIPTION="Gstreamer support for SBC audio format." |
71 | DEPEND=">= net-wlan/bluez-libs-${PVER} |
72 | ${GSTREAMER_DEPEND}" |
73 | } |
74 | |
75 | split_info_bluez-alsa() |
76 | { |
77 | DESCRIPTION="ALSA support for Bluetooth audio devices." |
78 | DEPEND=">= net-wlan/bluez-libs-${PVER} |
79 | ${ALSA_DEPEND}" |
80 | } |
81 | |
82 | src_prepare() |
83 | { |
84 | munpack ${SRCFILE} || die |
85 | |
86 | # fix linking issues |
87 | mpatch ${PNAME}-4.56-as-needed.patch || die |
88 | |
89 | # fix cups location, needed for multilib systems |
90 | mpatch ${PNAME}-4.56-cups-location.patch || die |
91 | |
92 | # rebuild configure |
93 | mautoreconf || die |
94 | } |
95 | |
96 | src_compile() |
97 | { |
98 | mconfigure \ |
99 | --localstatedir=/var \ |
100 | --disable-debug \ |
101 | --disable-gtk-doc \ |
102 | --enable-network \ |
103 | --enable-serial \ |
104 | --enable-input \ |
105 | --enable-audio \ |
106 | --enable-service \ |
107 | --enable-gstreamer \ |
108 | --enable-alsa \ |
109 | --enable-usb \ |
110 | --enable-netlink \ |
111 | --enable-tools \ |
112 | --enable-bccmd \ |
113 | --enable-hid2hci \ |
114 | --enable-dfutool \ |
115 | --disable-hidd \ |
116 | --disable-pand \ |
117 | --disable-dund \ |
118 | --enable-cups \ |
119 | --disable-test \ |
120 | --enable-manpages \ |
121 | --enable-configfiles \ |
122 | --disable-initscripts \ |
123 | --disable-pcmciarules \ |
124 | || die |
125 | |
126 | mmake || die |
127 | } |
128 | |
129 | src_install_bluez-libs() |
130 | { |
131 | mmake DESTDIR=${BINDIR} install-libLTLIBRARIES || die |
132 | } |
133 | |
134 | src_install_bluez() |
135 | { |
136 | mmake DESTDIR=${BINDIR} install || die |
137 | |
138 | # udev rules |
139 | minstalludevrule udev-bluetooth.rules 70-bluetooth.rules || die |
140 | minstalludevrule scripts/bluetooth-serial.rules 70-bluetooth-pcmcia.rules || die |
141 | minstalludevrule scripts/bluetooth-hid2hci.rules 70-bluetooth-hid2hci.rules || die |
142 | # udev helper |
143 | minstalludevhelper udev-bluetooth.sh bluetooth.sh || die |
144 | minstalludevhelper scripts/bluetooth_serial || die |
145 | |
146 | # config |
147 | minstalldir /etc/bluetooth || die |
148 | minstallfile input/input.conf /etc/bluetooth || die |
149 | minstallfile audio/audio.conf /etc/bluetooth || die |
150 | minstallfile network/network.conf /etc/bluetooth || die |
151 | |
152 | minstalldocs AUTHORS ChangeLog README || die |
153 | |
154 | # cleanup and remove everything which is included in other packages |
155 | local myconf |
156 | [[ $(mlibdir) != lib ]] && myconf="usr/lib/bluetooth usr/lib/pkgconfig" |
157 | zapmost ${BINDIR} \ |
158 | etc \ |
159 | lib/systemd \ |
160 | lib/udev \ |
161 | var/lib/bluetooth \ |
162 | usr/bin \ |
163 | usr/include \ |
164 | usr/sbin \ |
165 | usr/share/doc \ |
166 | usr/share/man \ |
167 | usr/$(mlibdir)/bluetooth \ |
168 | usr/$(mlibdir)/pkgconfig \ |
169 | ${myconf} \ |
170 | || die |
171 | } |
172 | |
173 | src_install_bluez-cups() |
174 | { |
175 | mmake DESTDIR=${BINDIR} install-cupsPROGRAMS || die |
176 | } |
177 | |
178 | src_install_bluez-gstreamer() |
179 | { |
180 | mmake DESTDIR=${BINDIR} install-gstreamerLTLIBRARIES || die |
181 | } |
182 | |
183 | src_install_bluez-alsa() |
184 | { |
185 | mmake DESTDIR=${BINDIR} install-alsaLTLIBRARIES || die |
186 | mmake DESTDIR=${BINDIR} install-alsaconfDATA || die |
187 | } |
188 | |
189 | postinstall_bluez() |
190 | { |
191 | if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] |
192 | then |
193 | # reload udev-rules |
194 | udevadm control --reload-rules && udevadm trigger |
195 | fi |
196 | |
197 | # reload dbus |
198 | mreloadunit dbus.service |
199 | |
200 | # start bluetooth service |
201 | mstartunit bluetooth.service |
202 | } |
203 | |
204 | postremove_bluez() |
205 | { |
206 | # stop bluetooth service |
207 | mstopunit bluetooth.service |
208 | |
209 | # reload dbus |
210 | mreloadunit dbus.service |
211 | } |