upgpkg: sbcl 2.2.4-1
[arch-packages.git] / bluez / trunk / PKGBUILD
blob7fa359167e6173b5b3ac930e412e389b290c3553
1 # Maintainer: Andreas Radke <andyrtr@archlinux.org>
2 # Contributor: Tom Gundersen <teg@jklm.no>
3 # Contributor: Andrea Scarpino <andrea@archlinux.org>
4 # Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
6 pkgbase=bluez
7 pkgname=('bluez' 'bluez-utils' 'bluez-libs' 'bluez-cups' 'bluez-hid2hci' 'bluez-plugins')
8 pkgver=5.64
9 pkgrel=2
10 url="http://www.bluez.org/"
11 arch=('x86_64')
12 license=('GPL2')
13 options=('debug')
14 makedepends=('dbus' 'libical' 'systemd' 'alsa-lib' 'json-c' 'ell' 'python-docutils')
15 source=(https://www.kernel.org/pub/linux/bluetooth/${pkgname}-${pkgver}.tar.{xz,sign}
16         bluetooth.modprobe
18 # see https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc
19 sha256sums=('ae437e65b6b3070c198bc5b0109fe9cdeb9eaa387380e2072f9de65fe8a1de34'
20             'SKIP'
21             '46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4')
22 validpgpkeys=('E932D120BC2AEC444E558F0106CA9F5D1DCF2659') # Marcel Holtmann <marcel@holtmann.org>
24 build() {
25   cd "${pkgname}"-${pkgver}
26   ./configure \
27           --prefix=/usr \
28           --mandir=/usr/share/man \
29           --sysconfdir=/etc \
30           --localstatedir=/var \
31           --libexecdir=/usr/lib \
32           --with-dbusconfdir=/usr/share \
33           --enable-btpclient \
34           --enable-midi \
35           --enable-sixaxis \
36           --enable-mesh \
37           --enable-hid2hci \
38           --enable-experimental \
39           --enable-library # this is deprecated
40   make
43 check() {
44   cd "$pkgname"-$pkgver
45   make check
49 package_bluez() {
50   pkgdesc="Daemons for the bluetooth protocol stack"
51   depends=('libical' 'dbus' 'glib2' 'alsa-lib' 'json-c')
52   backup=('etc/bluetooth/main.conf')
53   conflicts=('obexd-client' 'obexd-server')
55   cd "${pkgbase}"-${pkgver}
56   make DESTDIR=${pkgdir} \
57        install-pkglibexecPROGRAMS \
58        install-dbussessionbusDATA \
59        install-systemdsystemunitDATA \
60        install-systemduserunitDATA \
61        install-dbussystembusDATA \
62        install-dbusDATA \
63        install-man8
65   # ship upstream main config file
66   install -dm755 "${pkgdir}"/etc/bluetooth
67   install -Dm644 "${srcdir}"/"${pkgbase}"-${pkgver}/src/main.conf "${pkgdir}"/etc/bluetooth/main.conf
69   # add basic documention
70   install -dm755 "${pkgdir}"/usr/share/doc/"${pkgbase}"/dbus-apis
71   cp -a doc/*.txt "${pkgdir}"/usr/share/doc/"${pkgbase}"/dbus-apis/
72   # fix module loading errors
73   install -dm755 "${pkgdir}"/usr/lib/modprobe.d
74   install -Dm644 "${srcdir}"/bluetooth.modprobe "${pkgdir}"/usr/lib/modprobe.d/bluetooth-usb.conf
75   # load module at system start required by some functions
76   # https://bugzilla.kernel.org/show_bug.cgi?id=196621
77   install -dm755 "$pkgdir"/usr/lib/modules-load.d
78   echo "crypto_user" > "$pkgdir"/usr/lib/modules-load.d/bluez.conf
79   
80   # fix obex file transfer - https://bugs.archlinux.org/task/45816
81   ln -fs /usr/lib/systemd/user/obex.service "${pkgdir}"/usr/lib/systemd/user/dbus-org.bluez.obex.service
83   # FS#74157 - bluez systemd service fails without localstatedir present
84   install -dm700 "${pkgdir}"/var/lib/bluetooth
87 package_bluez-utils() {
88   pkgdesc="Development and debugging utilities for the bluetooth protocol stack"
89   depends=('dbus' 'systemd' 'glib2')
90   optdepends=('ell: for btpclient')
91   conflicts=('bluez-hcidump')
92   provides=('bluez-hcidump')
93   replaces=('bluez-hcidump' 'bluez<=4.101')
95   cd "${pkgbase}"-${pkgver}
96   make DESTDIR="${pkgdir}" \
97        install-binPROGRAMS \
98        install-dist_zshcompletionDATA \
99        install-man1
101   # add missing tools FS#41132, FS#41687, FS#42716
102   for files in `find tools/ -type f -perm -755`; do
103     filename=$(basename $files)
104     install -Dm755 "${srcdir}"/"${pkgbase}"-${pkgver}/tools/$filename "${pkgdir}"/usr/bin/$filename
105   done
106   
107   # libbluetooth.so* are part of libLTLIBRARIES and binPROGRAMS targets
108   #make DESTDIR=${pkgdir} uninstall-libLTLIBRARIES
109   #rmdir ${pkgdir}/usr/lib
110   rm -rf "${pkgdir}"/usr/lib
111   
112   # move the hid2hci man page out
113   mv "${pkgdir}"/usr/share/man/man1/hid2hci.1 "${srcdir}"/
116 package_bluez-libs() {
117   pkgdesc="Deprecated libraries for the bluetooth protocol stack"
118   depends=('glibc')
119   provides=('libbluetooth.so')
120   license=('LGPL2.1')
122   cd "${pkgbase}"-${pkgver}
123   make DESTDIR="${pkgdir}" \
124        install-pkgincludeHEADERS \
125        install-libLTLIBRARIES \
126        install-pkgconfigDATA
129 package_bluez-cups() {
130   pkgdesc="CUPS printer backend for Bluetooth printers"
131   depends=('cups')
133   cd "${pkgbase}"-${pkgver}
134   make DESTDIR="${pkgdir}" install-cupsPROGRAMS
137 package_bluez-hid2hci() {
138   pkgdesc="Put HID proxying bluetooth HCI's into HCI mode"
139   depends=('systemd')
141   cd "${pkgbase}"-${pkgver}
142   make DESTDIR=${pkgdir} \
143        install-udevPROGRAMS \
144        install-rulesDATA
145   
146   install -dm755 "${pkgdir}"/usr/share/man/man1
147   mv "${srcdir}"/hid2hci.1 "${pkgdir}"/usr/share/man/man1/hid2hci.1
150 package_bluez-plugins() {
151   pkgdesc="bluez plugins (PS3 Sixaxis controller)"
152   depends=('systemd')
154   cd "${pkgbase}"-${pkgver}
155   make DESTDIR="${pkgdir}" \
156        install-pluginLTLIBRARIES