# $Id$ PNAME="bluez" PVER="4.41" PBUILD="r1" PCATEGORIE="net-wlan" STATE="unstable" DESCRIPTION="" HOMEPAGE="http://www.bluez.org/" DEPEND=">= dev-libs/glib2-2.20 >= dev-libs/libusb-0.1.12 >= dev-libs/libnl-1.1 >= media-libs/alsa-lib-1.0.19 >= media-libs/gstreamer-0.10.23 >= media-libs/gst-plugins-base-0.10.23 >= media-libs/libsndfile-1.0.20 >= net-print/cups-1.3 >= sys-fs/udev-142 >= sys-apps/dbus-1.2.14 >= sys-libs/pam-1" SDEPEND=">= sys-dev/flex-2.5.35 >= dev-util/pkgconfig-0.23" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools SRC_URI=( http://www.kernel.org/pub/linux/bluetooth/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/bluetoothd.rc mirror://${PNAME}/bluetoothd.confd mirror://${PNAME}/udev-bluetooth.rules mirror://${PNAME}/udev-bluetooth.sh mirror://${PNAME}/${PNAME}-${PVER}-as-needed.patch mirror://${PNAME}/${PNAME}-${PVER}-cups-location.patch ) UP2DATE="updatecmd 'http://www.kernel.org/pub/linux/bluetooth/?C=M;O=A' | grep ${PNAME}-[0-9] | lasttarball gz" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # fix linking issues mpatch ${PNAME}-${PVER}-as-needed.patch || die # fix cups location, needed for multilib systems mpatch ${PNAME}-${PVER}-cups-location.patch || die # rebuild configure autoreconf --install --force --verbose || die } src_compile() { cd ${SRCDIR} mconfigure \ --localstatedir=/var \ --disable-debug \ --disable-gtk-doc \ --enable-network \ --enable-serial \ --enable-input \ --enable-audio \ --enable-service \ --enable-gstreamer \ --enable-alsa \ --enable-usb \ --enable-netlink \ --enable-tools \ --enable-bccmd \ --enable-hid2hci \ --enable-dfutool \ --disable-hidd \ --disable-pand \ --disable-dund \ --enable-cups \ --disable-test \ --enable-manpages \ --enable-configfiles \ --disable-initscripts \ --disable-pcmciarules \ || die mmake || die } src_install() { cd ${SRCDIR} mmake DESTDIR=${BINDIR} install || die # initscript minstallrc bluetoothd.rc bluetoothd || die minstallconf bluetoothd.confd bluetoothd || die # udev rules minstalludevrule udev-bluetooth.rules 70-bluetooth.rules || die minstalludevrule scripts/bluetooth-serial.rules 70-bluetooth-pcmcia.rules || die minstalludevrule scripts/bluetooth-hid2hci.rules 70-bluetooth-hid2hci.rules || die # udev helper minstalludevhelper udev-bluetooth.sh bluetooth.sh || die minstalludevhelper scripts/bluetooth_serial || die # config minstalldir /etc/bluetooth || die minstallfile input/input.conf /etc/bluetooth || die minstallfile audio/audio.conf /etc/bluetooth || die minstallfile network/network.conf /etc/bluetooth || die minstalldocs AUTHORS ChangeLog README || die } postinstall() { if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]] then # reload udev-rules udevadm control --reload-rules && udevadm trigger fi # reload dbus mreloadservice dbus # start bluetooth service mstartservice bluetoothd } postremove() { # stop bluetooth service mstopservice bluetoothd # reload dbus mreloadservice dbus }