#!/bin/bash # # Maintainer: Deposite Pirate source /usr/src/ports/Build/build.sh NAME=bluetooth VERSION=4.101 BUILD=3 DEPENDS=('glib >= 2.36.0-1' 'dbus >= 1.6.8-1') OPTDEPENDS=('libical >= 1.0-1') # Description cat > ${PKG}/install/slack-desc <> ${PKG}/install/doinst.sh < etc/rc.d/rc.bluetooth.new.incoming mv etc/rc.d/rc.bluetooth.new.incoming etc/rc.d/rc.bluetooth.new fi config etc/rc.d/rc.bluetooth.new config etc/bluetooth/audio.conf.new config etc/bluetooth/input.conf.new config etc/bluetooth/main.conf.new config etc/bluetooth/network.conf.new config etc/bluetooth/serial.conf.new config etc/bluetooth/rfcomm.conf.new config etc/modprobe.d/bluetooth.conf.new EOF # Sources SRCNAME[0]=bluez SRCVERS[0]=${VERSION} SRCPACK[0]=http://www.kernel.org/pub/linux/bluetooth/${SRCNAME[0]}-${SRCVERS[0]}.tar.gz SRCCOPY[0]="GPL2 LGPL21" build0() { sed -i 's|$(libdir)/alsa-lib|$(libdir)/plugins/alsa-1|g' Makefile.in sed -i 's|$(libdir)/cups/backend|$(libdir)/exec/cups/backend|g' Makefile.in sed -i 's|$(libdir)/pkgconfig|$(datarootdir)/pkgconfig|g' Makefile.in sed -i 's|$(libdir)/bluetooth/plugins|$(libdir)/plugins/bluetooth|g' Makefile.{in,am} sed -i 's|${libdir}/bluetooth/plugins|${libdir}/plugins/bluetooth|g' configure acinclude.m4 sed -i 's|udevdir = @UDEV_DIR@|udevdir = $(libdir)/exec/udev|g' Makefile.in sed -i 's|rulesdir = @UDEV_DIR@/rules.d|rulesdir = $(datadir)/udev/rules|g' Makefile.in CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \ ./configure \ --build="${ARCH}-slackware-linux" \ --disable-dependency-tracking \ --disable-silent-rules \ --enable-shared=yes \ --enable-static=no \ --prefix="${SYS_DIR[usr]}" \ --mandir="${SYS_DIR[man]}" \ --sysconfdir="${SYS_DIR[etc]}" \ --libdir="${SYS_DIR[lib]}" \ --localstatedir="${SYS_DIR[var]}" \ --with-systemdunitdir="${SYS_DIR[systemdsystemunitdir]}" \ --enable-alsa \ --enable-usb \ --enable-pnat \ --enable-tools \ --enable-bccmd \ --enable-hid2hci \ --enable-dfutool \ --enable-hidd \ --enable-pand \ --enable-dund \ --enable-cups \ --enable-service \ --enable-datafiles make ${JOBS} make install DESTDIR="${PKG}" doc AUTHORS changelog ChangeLog install.dir ${PKG}${SYS_DIR[udevrules]} install.dir ${PKG}${SYS_DIR[udevscripts]} install.bin bluetooth.sh ${PKG}${SYS_DIR[udevscripts]}/bluetooth install.bin scripts/bluetooth_serial ${PKG}${SYS_DIR[udevscripts]} #FIXME: this will have to go when systemd arrives install.dat 97-bluetooth.rules ${PKG}${SYS_DIR[udevrules]} install.dir ${PKG}${SYS_DIR[etc]}/{rc.d,modprobe.d,bluetooth} install.cfg bluetooth.modprobe ${PKG}${SYS_DIR[etc]}/modprobe.d/bluetooth.conf.new install.cfg rc.bluetooth ${PKG}${SYS_DIR[etc]}/rc.d/rc.bluetooth.new install.cfg audio/audio.conf \ ${PKG}${SYS_DIR[etc]}/bluetooth/audio.conf.new install.cfg input/input.conf \ ${PKG}${SYS_DIR[etc]}/bluetooth/input.conf.new install.cfg network/network.conf \ ${PKG}${SYS_DIR[etc]}/bluetooth/network.conf.new install.cfg serial/serial.conf \ ${PKG}${SYS_DIR[etc]}/bluetooth/serial.conf.new config ${PKG}${SYS_DIR[etc]}/bluetooth/main.conf config ${PKG}${SYS_DIR[etc]}/bluetooth/rfcomm.conf rm -rf ${PKG}${SYS_DIR[lib]}/bluetooth # Remove this directory if there's no plugin in it rmdir ${PKG}${SYS_DIR[lib]}/plugins/bluetooth } SRCNAME[1]=obexd SRCVERS[1]=0.48 SRCPACK[1]=http://www.kernel.org/pub/linux/bluetooth/${SRCNAME[1]}-${SRCVERS[1]}.tar.gz SRCCOPY[1]="GPL2" build1() { sed -i 's|${libdir}/obex/plugins|${libdir}/plugins/obex|g' configure BLUEZ_CFLAGS="-I${PKG}${SYS_DIR[include]}" \ BLUEZ_LIBS="-L${PKG}${SYS_DIR[lib]} -lbluetooth" \ CFLAGS="${FLAGS}" CXXFLAGS="${FLAGS}" \ ./configure \ --build="${ARCH}-slackware-linux" \ --disable-dependency-tracking \ --disable-silent-rules \ --enable-static=no \ --enable-shared=yes \ --prefix="${SYS_DIR[usr]}" \ --mandir="${SYS_DIR[man]}" \ --sysconfdir="${SYS_DIR[etc]}" \ --libdir="${SYS_DIR[lib]}" \ --localstatedir="${SYS_DIR[var]}" \ --libexecdir="${SYS_DIR[lib]}/exec" \ --enable-usb \ --enable-pcsuite make ${JOBS} V=1 make install DESTDIR="${PKG}" doc AUTHORS changelog ChangeLog # Remove this directory if there's no plugin in it rmdir ${PKG}${SYS_DIR[lib]}/plugins/obex }