diff options
Diffstat (limited to 'base/bluetooth/bluetooth.build')
-rwxr-xr-x | base/bluetooth/bluetooth.build | 171 |
1 files changed, 171 insertions, 0 deletions
diff --git a/base/bluetooth/bluetooth.build b/base/bluetooth/bluetooth.build new file mode 100755 index 0000000..89c63cb --- /dev/null +++ b/base/bluetooth/bluetooth.build @@ -0,0 +1,171 @@ +#!/bin/bash +# +# Maintainer: Deposite Pirate <ofni.sknuplatem@etaripd> + +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 <<EOF +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + +$(padd)|-----handy-ruler------------------------------------------------------| +${NAME}: bluetooth +${NAME}: +${NAME}: A wireless standard for exchanging data over short distances. +${NAME}: +${NAME}: This package provides the libraries and utilities and other support +${NAME}: files to use bluetooth adapters and devices. +${NAME}: +${NAME}: Homepage: http://www.bluez.org +${NAME}: +${NAME}: +${NAME}: +EOF + +cat >> ${PKG}/install/doinst.sh <<EOF +#!/bin/sh + +config() { + NEW="\$1" + OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r \$OLD ]; then + mv \$NEW \$OLD + elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then + # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +# Keep same perms on rc.bluetooth.new: +if [ -e etc/rc.d/rc.bluetooth ]; then + cp -a etc/rc.d/rc.bluetooth etc/rc.d/rc.bluetooth.new.incoming + cat etc/rc.d/rc.bluetooth.new > 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 +} |