summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO39
-rw-r--r--PKGBUILD122
-rw-r--r--fake-ps3.patch14
3 files changed, 108 insertions, 67 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c13de2423a3d..8707d0c19cf1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,29 +1,32 @@
pkgbase = bluez-ps3
- pkgdesc = Daemons for the bluetooth protocol stack. Patched to support PS3 controllers, including Gasia/Shanwan clones
- pkgver = 5.44
+ pkgver = 5.75
pkgrel = 1
- url = https://github.com/luetzel/bluez
- arch = i686
+ url = http://www.bluez.org/
arch = x86_64
- license = GPL2
+ license = GPL-2.0-only
makedepends = dbus
makedepends = libical
makedepends = systemd
- depends = libical
- depends = dbus
- depends = glib2
+ makedepends = alsa-lib
+ makedepends = json-c
+ makedepends = ell
+ makedepends = python-docutils
provides = bluez
- provides = bluez-plugins
- conflicts = bluez
- conflicts = bluez-plugins
- conflicts = obexd-client
- conflicts = obexd-server
- backup = etc/dbus-1/system.d/bluetooth.conf
- backup = etc/bluetooth/main.conf
- source = git+https://github.com/luetzel/bluez
+ source = https://www.kernel.org/pub/linux/bluetooth/bluez-5.75.tar.xz
+ source = fake-ps3.patch
source = bluetooth.modprobe
- sha256sums = SKIP
+ sha256sums = 988cb3c4551f6e3a667708a578f5ca9f93fc896508f98f08709be4f8ab033c2f
+ sha256sums = 2eb8953fa0491315af34eaa940c77f7373cbd18d7f67acc780f460f3edb64ffb
sha256sums = 46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4
pkgname = bluez-ps3
-
+ pkgdesc = Daemons for the bluetooth protocol stack ( add support for non shanwan fake ps3 controllers )
+ depends = systemd-libs
+ depends = dbus
+ depends = glib2
+ depends = alsa-lib
+ depends = glibc
+ conflicts = bluez
+ backup = etc/bluetooth/main.conf
+ backup = etc/bluetooth/input.conf
+ backup = etc/bluetooth/network.conf
diff --git a/PKGBUILD b/PKGBUILD
index 9da8c18c0e49..2cca3be3610d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,74 +1,98 @@
-# $Id$
-# Maintainer: Tom Gundersen <teg@jklm.no>
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Maintainer: Robin Candau <antiz@archlinux.org>
+# Contributor: Tom Gundersen <teg@jklm.no>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Geoffroy Carrier <geoffroy@archlinux.org>
-# Contributor : ianux <ianux@free.fr>
-
-pkgname=bluez-ps3
-_gitname=bluez
-pkgver=5.44
+# Maintainer: Cooky-12 cooky-12@qq.com
+provides=('bluez')
+pkgname=('bluez-ps3')
+pkgver=5.75
pkgrel=1
-pkgdesc="Daemons for the bluetooth protocol stack. Patched to support PS3 controllers, including Gasia/Shanwan clones"
-url="https://github.com/luetzel/bluez"
-arch=('i686' 'x86_64')
-license=('GPL2')
-provides=('bluez' 'bluez-plugins')
-makedepends=('dbus' 'libical' 'systemd')
-depends=('libical' 'dbus' 'glib2')
-backup=('etc/dbus-1/system.d/bluetooth.conf'
- 'etc/bluetooth/main.conf')
-conflicts=('bluez' 'bluez-plugins' 'obexd-client' 'obexd-server')
-source=('git+https://github.com/luetzel/bluez'
- 'bluetooth.modprobe')
-sha256sums=('SKIP'
+url="http://www.bluez.org/"
+arch=('x86_64')
+license=('GPL-2.0-only')
+makedepends=('dbus' 'libical' 'systemd' 'alsa-lib' 'json-c' 'ell' 'python-docutils') # 'python-pygments' 'cups')
+source=(https://www.kernel.org/pub/linux/bluetooth/bluez-${pkgver}.tar.xz fake-ps3.patch
+ bluetooth.modprobe)
+# see https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc
+sha256sums=('988cb3c4551f6e3a667708a578f5ca9f93fc896508f98f08709be4f8ab033c2f'
+ '2eb8953fa0491315af34eaa940c77f7373cbd18d7f67acc780f460f3edb64ffb'
'46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4')
-#pkgver() {
-# cd ${srcdir}/${_gitname}
-# echo "$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
-#}
build() {
- cd ${srcdir}/${_gitname}
+ cd bluez-${pkgver} ; patch --forward --strip=1 --input="${srcdir}/fake-ps3.patch"
./configure \
--prefix=/usr \
--mandir=/usr/share/man \
--sysconfdir=/etc \
--localstatedir=/var \
--libexecdir=/usr/lib \
+ --with-dbusconfdir=/usr/share \
+ --enable-btpclient \
+ --enable-midi \
--enable-sixaxis \
- --enable-experimental
+ --enable-mesh \
+ --enable-hid2hci \
+ --enable-experimental \
+ --enable-datafiles \
+ --enable-library --enable-deprecated # libraries and these tools are deprecated
make
+
+ # fake installation to be seperated into packages
+ make DESTDIR="${srcdir}/fakeinstall" install
+
+ # add missing tools FS#41132, FS#41687, FS#42716
+ for files in `find tools/ -type f -perm -755`; do
+ filename=$(basename $files)
+ install -Dm755 "${srcdir}"/bluez-${pkgver}/tools/$filename "${srcdir}/fakeinstall"/usr/bin/$filename
+ done
+}
+
+_install() {
+ local src f dir
+ for src; do
+ f="${src#fakeinstall/}"
+ dir="${pkgdir}/${f%/*}"
+ install -m755 -d "${dir}"
+ # use copy so a new file is created and fakeroot can track properties such as setuid
+ cp -av "${src}" "${dir}/"
+ rm -rf "${src}"
+ done
}
check() {
- cd ${srcdir}/${_gitname}
- make check
+ cd bluez-$pkgver
+ # fails test-vcp due to lto - https://github.com/bluez/bluez/issues/683
+ make check || /bin/true
}
-package() {
- cd ${srcdir}/${_gitname}
- make DESTDIR=${pkgdir} \
- install-libexecPROGRAMS \
- install-dbussessionbusDATA \
- install-systemdsystemunitDATA \
- install-systemduserunitDATA \
- install-dbussystembusDATA \
- install-dbusDATA \
- install-pluginLTLIBRARIES \
- install-man8
- # ship upstream main config file
- install -dm755 ${pkgdir}/etc/bluetooth
- install -Dm644 ${srcdir}/${_gitname}/src/main.conf ${pkgdir}/etc/bluetooth/main.conf
+package_bluez-ps3() {
+ pkgdesc="Daemons for the bluetooth protocol stack ( add support for non shanwan fake ps3 controllers )"
+ depends=('systemd-libs' 'dbus' 'glib2' 'alsa-lib' 'glibc')
+ backup=(etc/bluetooth/{main,input,network}.conf)
+ conflicts=('bluez')
+ _install fakeinstall/etc/bluetooth/main.conf
+ _install fakeinstall/etc/bluetooth/input.conf
+ _install fakeinstall/etc/bluetooth/network.conf
+ _install fakeinstall/usr/lib/bluetooth/bluetoothd
+ _install fakeinstall/usr/lib/systemd/system/bluetooth.service
+ _install fakeinstall/usr/share/dbus-1/system-services/org.bluez.service
+ _install fakeinstall/usr/share/dbus-1/system.d/bluetooth.conf
+ _install fakeinstall/usr/share/man/man8/bluetoothd.8
+
+ # bluetooth.service wants ConfigurationDirectoryMode=0555
+ chmod -v 555 "${pkgdir}"/etc/bluetooth
# add basic documention
- install -dm755 ${pkgdir}/usr/share/doc/${pkgbase}/dbus-apis
- cp -a doc/*.txt ${pkgdir}/usr/share/doc/${pkgbase}/dbus-apis/
+ install -dm755 "${pkgdir}"/usr/share/doc/bluez/dbus-apis
+ cp -a bluez-${pkgver}/doc/*.txt "${pkgdir}"/usr/share/doc/bluez/dbus-apis/
# fix module loading errors
- install -dm755 ${pkgdir}/usr/lib/modprobe.d
- install -Dm644 ${srcdir}/bluetooth.modprobe ${pkgdir}/usr/lib/modprobe.d/bluetooth-usb.conf
-
- # fix obex file transfer - https://bugs.archlinux.org/task/45816
- ln -fs /usr/lib/systemd/user/obex.service ${pkgdir}/usr/lib/systemd/user/dbus-org.bluez.obex.service
+ install -dm755 "${pkgdir}"/usr/lib/modprobe.d
+ install -Dm644 "${srcdir}"/bluetooth.modprobe "${pkgdir}"/usr/lib/modprobe.d/bluetooth-usb.conf
+ # load module at system start required by some functions
+ # https://bugzilla.kernel.org/show_bug.cgi?id=196621
+ install -dm755 "$pkgdir"/usr/lib/modules-load.d
+ echo "crypto_user" > "$pkgdir"/usr/lib/modules-load.d/bluez.conf
}
diff --git a/fake-ps3.patch b/fake-ps3.patch
new file mode 100644
index 000000000000..0c09728a5ee0
--- /dev/null
+++ b/fake-ps3.patch
@@ -0,0 +1,14 @@
+diff --unified --recursive --text --color bluez-5.61.org/profiles/input/sixaxis.h bluez-5.61.new/profiles/input/sixaxis.h
+--- bluez-5.61.org/profiles/input/sixaxis.h 2021-02-23 04:26:59.000000000 +0800
++++ bluez-5.61.new/profiles/input/sixaxis.h 2021-08-29 16:30:07.102346000 +0800
+@@ -87,6 +87,10 @@
+ return &devices[i];
+ }
+
++ if ( vid == 0x054c && pid == 0x0268 )
++
++ return &devices[1];
++
+ return NULL;
+ }
+