# $Id$ PNAME="bluez" PVER="4.96" PBUILD="r2" PCATEGORIE="net-wlan" DESCRIPTION="Libraries and tools for the Bluetooth protocol stack." HOMEPAGE="http://www.bluez.org/" DEPEND=">= dev-libs/glib2-2.28 >= dev-libs/libusb-1.0 >= dev-libs/libnl-1.1 >= media-libs/alsa-lib-1.0.24 >= media-libs/gstreamer-0.10.35 >= media-libs/gst-plugins-base-0.10.35 >= media-libs/libsndfile-1.0.25 >= net-print/cups-1.4 >= sys-fs/udev-171 >= sys-apps/dbus-1.4 >= sys-libs/pam-1.1" SDEPEND=">= sys-dev/flex-2.5.35 >= dev-util/pkgconfig-0.25" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools multilib SRC_URI=( http://rz.linux.ruhr-uni-bochum.de/downloads/gentoo-mirror/distfiles/${SRCFILE} http://www.kernel.org/pub/linux/bluetooth/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/udev-bluetooth.rules mirror://${PNAME}/udev-bluetooth.sh mirror://${PNAME}/${PNAME}-4.56-as-needed.patch mirror://${PNAME}/${PNAME}-4.56-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 # fix linking issues mpatch ${PNAME}-4.56-as-needed.patch || die # fix cups location, needed for multilib systems mpatch ${PNAME}-4.56-cups-location.patch || die # rebuild configure mautoreconf || die } src_compile() { 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() { mmake DESTDIR=${BINDIR} install || 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 mreloadunit dbus.service # start bluetooth service mstartunit bluetooth.service } postremove() { # stop bluetooth service mstopunit bluetooth.service # reload dbus mreloadunit dbus.service }