Magellan Linux

Contents of /branches/magellan-next/extras/bluez/bluez-4.96-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9343 - (show annotations) (download)
Sun Nov 27 15:23:23 2011 UTC (12 years, 5 months ago) by niro
File size: 3021 byte(s)
-fixed SRC_URI - kernel.org temporally not available
1 # $Id$
2
3 PNAME="bluez"
4 PVER="4.96"
5 PBUILD="r2"
6
7 PCATEGORIE="net-wlan"
8
9 DESCRIPTION="Libraries and tools for the Bluetooth protocol stack."
10 HOMEPAGE="http://www.bluez.org/"
11
12 DEPEND=">= dev-libs/glib2-2.28
13 >= dev-libs/libusb-1.0
14 >= dev-libs/libnl-1.1
15 >= media-libs/alsa-lib-1.0.24
16 >= media-libs/gstreamer-0.10.35
17 >= media-libs/gst-plugins-base-0.10.35
18 >= media-libs/libsndfile-1.0.25
19 >= net-print/cups-1.4
20 >= sys-fs/udev-171
21 >= sys-apps/dbus-1.4
22 >= sys-libs/pam-1.1"
23
24 SDEPEND=">= sys-dev/flex-2.5.35
25 >= dev-util/pkgconfig-0.25"
26
27 SRCFILE="${PNAME}-${PVER}.tar.gz"
28 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
29
30 sminclude mtools multilib
31
32 SRC_URI=(
33 http://linux.rz.ruhr-uni-bochum.de/downloads/gentoo-mirror/distfiles/${SRCFILE}
34 http://www.kernel.org/pub/linux/bluetooth/${SRCFILE}
35 mirror://${PNAME}/${SRCFILE}
36 mirror://${PNAME}/udev-bluetooth.rules
37 mirror://${PNAME}/udev-bluetooth.sh
38 mirror://${PNAME}/${PNAME}-4.56-as-needed.patch
39 mirror://${PNAME}/${PNAME}-4.56-cups-location.patch
40 )
41
42 UP2DATE="updatecmd 'http://www.kernel.org/pub/linux/bluetooth/?C=M;O=A' | grep ${PNAME}-[0-9] | lasttarball gz"
43
44 src_prepare()
45 {
46 munpack ${SRCFILE} || die
47
48 # fix linking issues
49 mpatch ${PNAME}-4.56-as-needed.patch || die
50
51 # fix cups location, needed for multilib systems
52 mpatch ${PNAME}-4.56-cups-location.patch || die
53
54 # rebuild configure
55 mautoreconf || die
56 }
57
58 src_compile()
59 {
60 mconfigure \
61 --localstatedir=/var \
62 --disable-debug \
63 --disable-gtk-doc \
64 --enable-network \
65 --enable-serial \
66 --enable-input \
67 --enable-audio \
68 --enable-service \
69 --enable-gstreamer \
70 --enable-alsa \
71 --enable-usb \
72 --enable-netlink \
73 --enable-tools \
74 --enable-bccmd \
75 --enable-hid2hci \
76 --enable-dfutool \
77 --disable-hidd \
78 --disable-pand \
79 --disable-dund \
80 --enable-cups \
81 --disable-test \
82 --enable-manpages \
83 --enable-configfiles \
84 --disable-initscripts \
85 --disable-pcmciarules \
86 || die
87
88 mmake || die
89 }
90
91 src_install()
92 {
93 mmake DESTDIR=${BINDIR} install || die
94
95 # udev rules
96 minstalludevrule udev-bluetooth.rules 70-bluetooth.rules || die
97 minstalludevrule scripts/bluetooth-serial.rules 70-bluetooth-pcmcia.rules || die
98 minstalludevrule scripts/bluetooth-hid2hci.rules 70-bluetooth-hid2hci.rules || die
99 # udev helper
100 minstalludevhelper udev-bluetooth.sh bluetooth.sh || die
101 minstalludevhelper scripts/bluetooth_serial || die
102
103 # config
104 minstalldir /etc/bluetooth || die
105 minstallfile input/input.conf /etc/bluetooth || die
106 minstallfile audio/audio.conf /etc/bluetooth || die
107 minstallfile network/network.conf /etc/bluetooth || die
108
109 minstalldocs AUTHORS ChangeLog README || die
110 }
111
112 postinstall()
113 {
114 if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
115 then
116 # reload udev-rules
117 udevadm control --reload-rules && udevadm trigger
118 fi
119
120 # reload dbus
121 mreloadunit dbus.service
122
123 # start bluetooth service
124 mstartunit bluetooth.service
125 }
126
127 postremove()
128 {
129 # stop bluetooth service
130 mstopunit bluetooth.service
131
132 # reload dbus
133 mreloadunit dbus.service
134 }