Files
Arch-R/packages/network/bluez/package.mk
Sascha Kuehndel (InuSasha) 3846ec7dac buildsystem: replace PKG_AUTORECONF
2017-11-22 00:41:12 +01:00

86 lines
3.0 KiB
Makefile

################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="bluez"
PKG_VERSION="5.47"
PKG_SHA256="cf75bf7cd5d564f21cc4a2bd01d5c39ce425397335fd47d9bbe43af0a58342c8"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.bluez.org/"
PKG_URL="http://www.kernel.org/pub/linux/bluetooth/$PKG_NAME-$PKG_VERSION.tar.xz"
PKG_DEPENDS_TARGET="toolchain dbus glib readline systemd"
PKG_SECTION="network"
PKG_SHORTDESC="bluez: Bluetooth Tools and System Daemons for Linux."
PKG_LONGDESC="Bluetooth Tools and System Daemons for Linux."
PKG_TOOLCHAIN="autotools"
if [ "$DEBUG" = "yes" ]; then
BLUEZ_CONFIG="--enable-debug"
else
BLUEZ_CONFIG="--disable-debug"
fi
if [ "$DEVTOOLS" = "yes" ]; then
BLUEZ_CONFIG="$BLUEZ_CONFIG --enable-monitor --enable-test"
else
BLUEZ_CONFIG="$BLUEZ_CONFIG --disable-monitor --disable-test"
fi
PKG_CONFIGURE_OPTS_TARGET="--disable-dependency-tracking \
--disable-silent-rules \
--disable-library \
--enable-udev \
--disable-cups \
--disable-obex \
--enable-client \
--enable-systemd \
--enable-tools --enable-deprecated \
--enable-datafiles \
--disable-experimental \
--enable-sixaxis \
--with-gnu-ld \
$BLUEZ_CONFIG \
storagedir=/storage/.cache/bluetooth"
pre_configure_target() {
# bluez fails to build in subdirs
cd $PKG_BUILD
rm -rf .$TARGET_NAME
export LIBS="-lncurses"
}
post_makeinstall_target() {
rm -rf $INSTALL/usr/lib/systemd
rm -rf $INSTALL/usr/bin/bccmd
rm -rf $INSTALL/usr/bin/bluemoon
rm -rf $INSTALL/usr/bin/ciptool
rm -rf $INSTALL/usr/share/dbus-1
mkdir -p $INSTALL/etc/bluetooth
cp src/main.conf $INSTALL/etc/bluetooth
sed -i $INSTALL/etc/bluetooth/main.conf \
-e "s|^#\[Policy\]|\[Policy\]|g" \
-e "s|^#AutoEnable.*|AutoEnable=true|g"
}
post_install() {
enable_service bluetooth.service
enable_service obex.service
}