summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcooky-122024-03-11 23:17:03 +0800
committercooky-122024-03-11 23:17:03 +0800
commitb85798a83b01f4e08fb9320971ee4bdb003e4aac (patch)
treeef4d693ceac87888a1efd5a81993c520e1ebbacb
parent52abb7a66ac4e04be5c49b0a1a3baf4fc71ff7ea (diff)
downloadaur-b85798a83b01f4e08fb9320971ee4bdb003e4aac.tar.gz
first try for simple patch
-rw-r--r--.SRCINFO44
-rw-r--r--PKGBUILD126
-rw-r--r--fake-ps3.patch14
3 files changed, 112 insertions, 72 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 335543b54297..fa48c75486be 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,29 +1,31 @@
-pkgbase = bluez-ps3
- pkgdesc = Daemons for the bluetooth protocol stack. Patched to support PS3 controllers, including Gasia/Shanwan clones
- pkgver = 5.45
- pkgrel = 1
- url = https://github.com/luetzel/bluez
- arch = i686
+pkgbase = bluez
+ pkgver = 5.73
+ pkgrel = 0
+ 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
- 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
+ makedepends = alsa-lib
+ makedepends = json-c
+ makedepends = ell
+ makedepends = python-docutils
+ source = https://www.kernel.org/pub/linux/bluetooth/bluez-5.73.tar.xz
source = bluetooth.modprobe
- sha256sums = SKIP
+ source = fake-ps3.patch
+ sha256sums = 257e9075ce05c70d48c5defd254e78c418416f7584b45f9dddc884ff88e3fc53
sha256sums = 46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4
+ sha256sums = 2eb8953fa0491315af34eaa940c77f7373cbd18d7f67acc780f460f3edb64ffb
pkgname = bluez-ps3
-
+ pkgdesc = Daemons for the bluetooth protocol stack ( add support for non shanwan fake ps3 controllers )
+ depends = systemd
+ 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 50da28482c37..b0b0b58314d4 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>
+# Maintainer: Cooky-12 cooky-12@qq.com
+pkgbase=bluez
+pkgname=('bluez-ps3')
+pkgver=5.73
+pkgrel=0
+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
+ bluetooth.modprobe fake-ps3.patch)
+# see https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc
+sha256sums=('257e9075ce05c70d48c5defd254e78c418416f7584b45f9dddc884ff88e3fc53'
+ '46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4'
+ '2eb8953fa0491315af34eaa940c77f7373cbd18d7f67acc780f460f3edb64ffb')
-pkgname=bluez-ps3
-_gitname=bluez
-pkgver=5.45
-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'
- '46c021be659c9a1c4e55afd04df0c059af1f3d98a96338236412e449bf7477b4')
-
-#pkgver() {
-# cd ${srcdir}/${_gitname}
-# echo "$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)"
-#}
build() {
- cd ${srcdir}/${_gitname}
+ cd "${pkgbase}"-${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}"/"${pkgbase}"-${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 "$pkgbase"-$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' '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/"${pkgbase}"/dbus-apis
+ cp -a "${pkgbase}"-${pkgver}/doc/*.txt "${pkgdir}"/usr/share/doc/"${pkgbase}"/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;
+ }
+