blob: 89c63cb8b7126191495a067c9d32fc9424f52f88 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
}
|