Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9341 - (show annotations) (download)
Sun Nov 27 15:19:29 2011 UTC (12 years, 6 months ago) by niro
File size: 2940 byte(s)
-rev bump, multilib rebuild
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://www.kernel.org/pub/linux/bluetooth/${SRCFILE}
34 mirror://${PNAME}/${SRCFILE}
35 mirror://${PNAME}/udev-bluetooth.rules
36 mirror://${PNAME}/udev-bluetooth.sh
37 mirror://${PNAME}/${PNAME}-4.56-as-needed.patch
38 mirror://${PNAME}/${PNAME}-4.56-cups-location.patch
39 )
40
41 UP2DATE="updatecmd 'http://www.kernel.org/pub/linux/bluetooth/?C=M;O=A' | grep ${PNAME}-[0-9] | lasttarball gz"
42
43 src_prepare()
44 {
45 munpack ${SRCFILE} || die
46
47 # fix linking issues
48 mpatch ${PNAME}-4.56-as-needed.patch || die
49
50 # fix cups location, needed for multilib systems
51 mpatch ${PNAME}-4.56-cups-location.patch || die
52
53 # rebuild configure
54 mautoreconf || die
55 }
56
57 src_compile()
58 {
59 mconfigure \
60 --localstatedir=/var \
61 --disable-debug \
62 --disable-gtk-doc \
63 --enable-network \
64 --enable-serial \
65 --enable-input \
66 --enable-audio \
67 --enable-service \
68 --enable-gstreamer \
69 --enable-alsa \
70 --enable-usb \
71 --enable-netlink \
72 --enable-tools \
73 --enable-bccmd \
74 --enable-hid2hci \
75 --enable-dfutool \
76 --disable-hidd \
77 --disable-pand \
78 --disable-dund \
79 --enable-cups \
80 --disable-test \
81 --enable-manpages \
82 --enable-configfiles \
83 --disable-initscripts \
84 --disable-pcmciarules \
85 || die
86
87 mmake || die
88 }
89
90 src_install()
91 {
92 mmake DESTDIR=${BINDIR} install || die
93
94 # udev rules
95 minstalludevrule udev-bluetooth.rules 70-bluetooth.rules || die
96 minstalludevrule scripts/bluetooth-serial.rules 70-bluetooth-pcmcia.rules || die
97 minstalludevrule scripts/bluetooth-hid2hci.rules 70-bluetooth-hid2hci.rules || die
98 # udev helper
99 minstalludevhelper udev-bluetooth.sh bluetooth.sh || die
100 minstalludevhelper scripts/bluetooth_serial || die
101
102 # config
103 minstalldir /etc/bluetooth || die
104 minstallfile input/input.conf /etc/bluetooth || die
105 minstallfile audio/audio.conf /etc/bluetooth || die
106 minstallfile network/network.conf /etc/bluetooth || die
107
108 minstalldocs AUTHORS ChangeLog README || die
109 }
110
111 postinstall()
112 {
113 if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
114 then
115 # reload udev-rules
116 udevadm control --reload-rules && udevadm trigger
117 fi
118
119 # reload dbus
120 mreloadunit dbus.service
121
122 # start bluetooth service
123 mstartunit bluetooth.service
124 }
125
126 postremove()
127 {
128 # stop bluetooth service
129 mstopunit bluetooth.service
130
131 # reload dbus
132 mreloadunit dbus.service
133 }