opt/bluez/Pkgfile

75 lines
2.0 KiB
Plaintext
Raw Normal View History

2013-08-07 09:48:20 +02:00
# Description: Bluetooth libraries and utilities
# URL: http://www.bluez.org/
# Maintainer: Alan Mizrahi, alan at mizrahi dot com dot ve
2017-03-13 09:40:11 +01:00
# Depends on: dbus alsa-lib libusb-compat glib
# Optional: pygobject dbus-python sox gst-plugins-base-compat
2013-08-07 09:48:20 +02:00
name=bluez
version=4.101
2017-02-21 16:05:15 +01:00
release=5
2018-02-25 07:10:35 +01:00
source=(http://www.kernel.org/pub/linux/bluetooth/bluez-$version.tar.xz
bluetoothd bluetooth.h)
2013-08-07 09:48:20 +02:00
build() {
cd $name-$version
2017-02-21 03:51:21 +01:00
# Fix bluetooth.h to compile in strict C
2018-02-25 07:10:35 +01:00
# http://git.kernel.org/cgit/bluetooth/bluez.git/patch/lib/bluetooth.h?id=cf52a40302d0d20ccca22a7a1f53e46ef8abfca8
patch -p1 -i $SRC/bluetooth.h
2017-02-21 03:51:21 +01:00
2013-08-07 09:48:20 +02:00
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--libexecdir=/lib \
--mandir=/usr/share/man \
2013-08-07 09:48:20 +02:00
--enable-audio \
--enable-usb \
--enable-tools \
--enable-test \
2013-08-07 09:48:20 +02:00
--enable-hidd \
--enable-hid2hci \
--enable-pand \
--enable-cups \
--enable-alsa \
--enable-bccmd \
--enable-dfutool \
--enable-dund
make
make DESTDIR=$PKG install
# install all available tools and test programs with man pages
shopt -s nullglob
for i in test/* tools/*; do
if [ -x $i -a ! -d $i -a ! -x $PKG/usr/bin/${i##*/} -a ! -x $PKG/usr/sbin/${i##*/} ]; then
if [ -f $i.8 ]; then
install -D -m 755 $i $PKG/usr/sbin/bluez-${i#*/}
else
install -D -m 755 $i $PKG/usr/bin/bluez-${i#*/}
fi
2013-08-07 09:48:20 +02:00
for j in $i.[1-8]; do
install -D -m 644 $j $PKG/usr/share/man/man${j##*.}/bluez-${j##*/}
2013-08-07 09:48:20 +02:00
done
fi
done
# install init script
install -D -m 755 $SRC/bluetoothd $PKG/etc/rc.d/bluetoothd
# install config files
for i in audio input network serial; do
install -D -m 644 $i/$i.conf $PKG/etc/bluetooth/$i.conf
done
# this is because of the /usr/etc CRUX oddity
mkdir $PKG/usr/etc
mv $PKG/etc/dbus-1 $PKG/usr/etc
# fix some python scripts
sed -ie 's|from gi.repository import GObject|import gobject as GObject|g' \
$PKG/usr/bin/bluez-{simple-agent,test-device,test-discovery,test-manager}
sed -ie 's|hstest|bluez-hstest|g' $PKG/usr/bin/bluez-hsplay
2013-08-07 09:48:20 +02:00
}