summaryrefslogtreecommitdiff
path: root/bluez/Pkgfile
blob: 92b2d622ccfb764b19251fc5bddd002cc9feb25c (plain)
    1 # Description:	Bluetooth libraries and utilities
    2 # URL:		http://www.bluez.org/
    3 # Maintainer:	Alan Mizrahi, alan at mizrahi dot com dot ve
    4 # Depends on:	dbus alsa-lib libusb-compat glib
    5 # Optional:	pygobject dbus-python sox gst-plugins-base-compat
    6 
    7 name=bluez
    8 version=4.101
    9 release=5
   10 source=(http://www.kernel.org/pub/linux/bluetooth/bluez-$version.tar.xz
   11 	bluetoothd bluetooth.h)
   12 
   13 build() {
   14 	cd $name-$version
   15 
   16 	# Fix bluetooth.h to compile in strict C
   17 	# http://git.kernel.org/cgit/bluetooth/bluez.git/patch/lib/bluetooth.h?id=cf52a40302d0d20ccca22a7a1f53e46ef8abfca8
   18 	patch -p1 -i $SRC/bluetooth.h
   19 
   20 	./configure \
   21 		--prefix=/usr \
   22 		--sysconfdir=/etc \
   23 		--localstatedir=/var \
   24 		--libexecdir=/lib \
   25 		--mandir=/usr/share/man \
   26 		--enable-audio \
   27 		--enable-usb \
   28 		--enable-tools \
   29 		--enable-test \
   30 		--enable-hidd \
   31 		--enable-hid2hci \
   32 		--enable-pand \
   33 		--enable-cups \
   34 		--enable-alsa \
   35 		--enable-bccmd \
   36 		--enable-dfutool \
   37 		--enable-dund
   38 
   39 	make
   40 	make DESTDIR=$PKG install
   41 
   42 	# install all available tools and test programs with man pages
   43 	shopt -s nullglob
   44 	for i in test/* tools/*; do
   45 		if [ -x $i -a ! -d $i -a ! -x $PKG/usr/bin/${i##*/} -a ! -x $PKG/usr/sbin/${i##*/} ]; then
   46 			if [ -f $i.8 ]; then
   47 				install -D -m 755 $i $PKG/usr/sbin/bluez-${i#*/}
   48 			else
   49 				install -D -m 755 $i $PKG/usr/bin/bluez-${i#*/}
   50 			fi
   51 
   52 			for j in $i.[1-8]; do
   53 				install -D -m 644 $j $PKG/usr/share/man/man${j##*.}/bluez-${j##*/}
   54 			done
   55 		fi
   56 	done
   57 
   58 	# install init script
   59 	install -D -m 755 $SRC/bluetoothd $PKG/etc/rc.d/bluetoothd
   60 
   61 	# install config files
   62 	for i in audio input network serial; do
   63 		install -D -m 644 $i/$i.conf $PKG/etc/bluetooth/$i.conf
   64 	done
   65 
   66 	# this is because of the /usr/etc CRUX oddity
   67 	mkdir $PKG/usr/etc
   68 	mv $PKG/etc/dbus-1 $PKG/usr/etc
   69 
   70 	# fix some python scripts
   71 	sed -ie 's|from gi.repository import GObject|import gobject as GObject|g' \
   72 		$PKG/usr/bin/bluez-{simple-agent,test-device,test-discovery,test-manager}
   73 	sed -ie 's|hstest|bluez-hstest|g' $PKG/usr/bin/bluez-hsplay
   74 }

Generated by cgit