# Maintainer: Natanael Copa global pkgname := 'bluez' global pkgver := '5.47' global pkgrel := '2' global pkgdesc := '"Tools for the Bluetooth protocol stack'" global url := '"http://www.bluez.org/'" global arch := '"all'" global license := '"GPL2+'" global depends := '"consolekit2 dbus'" global replaces := '"udev'" global makedepends := '"dbus-dev libusb-compat-dev eudev-dev json-c-dev libical-dev readline-dev glib-dev linux-headers autoconf automake libtool'" global subpackages := ""$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-bccmd $pkgname-btmon $pkgname-cups $pkgname-deprecated $pkgname-hid2hci $pkgname-meshctl $pkgname-obexd"" global source := ""http://www.kernel.org/pub/linux/bluetooth/bluez-$pkgver.tar.xz bluetooth.initd rfcomm.initd rfcomm.confd 001-bcm43xx-Add-bcm43xx-3wire-variant.patch 002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch 003-Increase-firmware-load-timeout-to-30s.patch 004-Move-the-43xx-firmware-into-lib-firmware.patch bluez-5.40-obexd_without_systemd-1.patch "" global builddir := ""$srcdir/$pkgname-$pkgver"" proc build { cd $builddir ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --libexecdir=/usr/lib \ --disable-systemd \ --enable-library \ --enable-deprecated \ --enable-mesh \ || return 1 make || return 1 } proc package { cd $builddir make install DESTDIR="$pkgdir" || return 1 install -D -m644 src/main.conf "$pkgdir"/etc/bluetooth/main.conf \ || return 1 install -Dm755 "$srcdir"/bluetooth.initd "$pkgdir"/etc/init.d/bluetooth install -Dm755 "$srcdir"/rfcomm.initd "$pkgdir"/etc/init.d/rfcomm install -Dm644 "$srcdir"/rfcomm.confd "$pkgdir"/etc/conf.d/rfcomm install -Dm755 test/simple-agent "$pkgdir"/usr/bin/bluez-simple-agent } proc bccmd { global pkgdesc := '"Bluez utility for the CSR BCCMD interface'" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/bccmd "$subpkgdir"/usr/bin/ } proc btmon { global pkgdesc := '"Bluez bluetooth monitor'" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/btmon "$subpkgdir"/usr/bin/ } proc cups { global pkgdesc := '"Bluez backend for CUPS'" mkdir -p "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/lib/cups "$subpkgdir"/usr/lib/ } proc hid2hci { global pkgdesc := '"Put HID proxying bluetooth HCI's into HCI mode'" global replaces := '"bluez'" mkdir -p $subpkgdir mv "$pkgdir"/lib "$subpkgdir"/ } proc deprecated { global pkgdesc := '"Deprecated bluetooth tools'" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/ciptool \ "$pkgdir"/usr/bin/hciattach \ "$pkgdir"/usr/bin/hciconfig \ "$pkgdir"/usr/bin/hcidump \ "$pkgdir"/usr/bin/hcitool \ "$pkgdir"/usr/bin/rfcomm \ "$pkgdir"/usr/bin/sdptool \ "$subpkgdir"/usr/bin/ } proc meshctl { global pkgdesc := '"Bluez tool for interacting with bluetooth mesh networks'" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/meshctl "$subpkgdir"/usr/bin/ } proc obexd { global pkgdesc := '"Bluez OBEX daemon'" mkdir -p "$subpkgdir"/usr/lib/bluetooth mv "$pkgdir"/usr/lib/bluetooth/obexd "$subpkgdir"/usr/lib/bluetooth } global sha512sums := '"86fa1baae1593d4824038db8418358b0be624c81fc23ee8f96ec08979d309a2377be3924ab53cc0fcb712aec8e696360e9a9f4de4c12cc31b14de5cf495a11a6 bluez-5.47.tar.xz fc43c78ed248ea412529eed5ae8bb47bacca9bf5b3b10de121ddd4e792c85893561a88be4aa2c6318106e5d2146a721445152d44fa60ca257ca0b4eb87318c1e bluetooth.initd 8d7b7c8938a2316ce0a855e9bdf1ef8fcdf33d23f4011df828270a088b88b140a19c432e83fef15355d0829e3c86be05b63e7718fef88563254ea239b8dc12ac rfcomm.initd a70aa0dbbabe7e29ee81540a6f98bf191a850da55a28f678975635caf34b363cf4d461a801b3484120ee28fdd21240bd456a4f5d706262700924bd2e9a0972fb rfcomm.confd 73202915fda01d420b2864da77b1c25af5a55c815e9be6546400a0940bfb6097d83322790bc22a80ec0fcd557144fdd1877e243a79285a7f040ff96ba3600b94 001-bcm43xx-Add-bcm43xx-3wire-variant.patch d5fd1c962bd846eaa6fff879bab85f753eb367d514f82d133b5d3242e1da989af5eddd942c60a87d5b67783e060f91bfa0f74fb1e8e6699cdee6e5bbe6a431ea 002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch 784e9644c8de4e2693e2eeed988a245608b8cb14e1fc0dff8795c60c527b2e8d0c87862cfbfd6b850b47ae80cdf993a5ed3f477078ea1068fd7374899c7a1a77 003-Increase-firmware-load-timeout-to-30s.patch 42ac04044a8c66e07487598b3a75ef52efc32999ebce4e7c63f6198e2f603f4a1442e74600e43a0938cb4f52d4db0298aa99050b18144b84990cda71748e9de5 004-Move-the-43xx-firmware-into-lib-firmware.patch 41ce7ccf78cca97563f0ef31e01dac6eb4484c24fe57be360b5e8de8c5bff5845e9d395766f891bd3f123788344456c88c9fc00cd1bb7c6a1dca89d09f19172b bluez-5.40-obexd_without_systemd-1.patch'" (CommandList children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgname) op:Equal rhs:{(bluez)} spids:[3])] spids: [3] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgver) op:Equal rhs:{(5.47)} spids:[6])] spids: [6] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:pkgrel) op:Equal rhs:{(2)} spids:[9])] spids: [9] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Tools for the Bluetooth protocol stack"))} spids: [12] ) ] spids: [12] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:url) op: Equal rhs: {(DQ ("http://www.bluez.org/"))} spids: [17] ) ] spids: [17] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:arch) op:Equal rhs:{(DQ (all))} spids:[22])] spids: [22] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:license) op:Equal rhs:{(DQ ("GPL2+"))} spids:[27])] spids: [27] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:depends) op: Equal rhs: {(DQ ("consolekit2 dbus"))} spids: [32] ) ] spids: [32] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:replaces) op:Equal rhs:{(DQ (udev))} spids:[37])] spids: [37] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:makedepends) op: Equal rhs: { (DQ ("dbus-dev libusb-compat-dev eudev-dev json-c-dev\n") ("\tlibical-dev readline-dev glib-dev linux-headers\n") ("\tautoconf automake libtool") ) } spids: [42] ) ] spids: [42] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:subpackages) op: Equal rhs: { (DQ ($ VSub_Name "$pkgname") ("-dev ") ($ VSub_Name "$pkgname") ("-doc ") ($ VSub_Name "$pkgname") ("-libs ") ($ VSub_Name "$pkgname") ("-bccmd ") ($ VSub_Name "$pkgname") ("-btmon ") ($ VSub_Name "$pkgname") ("-cups\n") ("\t") ($ VSub_Name "$pkgname") ("-deprecated ") ($ VSub_Name "$pkgname") ("-hid2hci ") ($ VSub_Name "$pkgname") ("-meshctl ") ($ VSub_Name "$pkgname") (-obexd) ) } spids: [49] ) ] spids: [49] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:source) op: Equal rhs: { (DQ ("http://www.kernel.org/pub/linux/bluetooth/bluez-") ($ VSub_Name "$pkgver") (".tar.xz\n") ("\tbluetooth.initd\n") ("\trfcomm.initd\n") ("\trfcomm.confd\n") (" 001-bcm43xx-Add-bcm43xx-3wire-variant.patch\n") (" 002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch\n") (" 003-Increase-firmware-load-timeout-to-30s.patch\n") (" 004-Move-the-43xx-firmware-into-lib-firmware.patch\n") ("\tbluez-5.40-obexd_without_systemd-1.patch\n") ("\t") ) } spids: [74] ) ] spids: [74] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:builddir) op: Equal rhs: {(DQ ($ VSub_Name "$srcdir") (/) ($ VSub_Name "$pkgname") (-) ($ VSub_Name "$pkgver"))} spids: [90] ) ] spids: [90] ) (FuncDef name: build body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (AndOr children: [ (C {(./configure)} {(--build) (Lit_Other "=") ($ VSub_Name "$CBUILD")} {(--host) (Lit_Other "=") ($ VSub_Name "$CHOST")} {(--prefix) (Lit_Other "=") (/usr)} {(--sysconfdir) (Lit_Other "=") (/etc)} {(--mandir) (Lit_Other "=") (/usr/share/man)} {(--localstatedir) (Lit_Other "=") (/var)} {(--libexecdir) (Lit_Other "=") (/usr/lib)} {(--disable-systemd)} {(--enable-library)} {(--enable-deprecated)} {(--enable-mesh)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [(C {(make)}) (ControlFlow token: arg_word:{(1)})] op_id: Op_DPipe ) ] spids: [104] ) spids: [100 103] ) (FuncDef name: package body: (BraceGroup children: [ (C {(cd)} {(DQ ($ VSub_Name "$builddir"))}) (AndOr children: [ (C {(make)} {(install)} {(Lit_VarLike "DESTDIR=") (DQ ($ VSub_Name "$pkgdir"))}) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (AndOr children: [ (C {(install)} {(-D)} {(-m644)} {(src/main.conf)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/bluetooth/main.conf)} ) (ControlFlow token: arg_word:{(1)}) ] op_id: Op_DPipe ) (C {(install)} {(-Dm755)} {(DQ ($ VSub_Name "$srcdir")) (/bluetooth.initd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/init.d/bluetooth)} ) (C {(install)} {(-Dm755)} {(DQ ($ VSub_Name "$srcdir")) (/rfcomm.initd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/init.d/rfcomm)} ) (C {(install)} {(-Dm644)} {(DQ ($ VSub_Name "$srcdir")) (/rfcomm.confd)} {(DQ ($ VSub_Name "$pkgdir")) (/etc/conf.d/rfcomm)} ) (C {(install)} {(-Dm755)} {(test/simple-agent)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/bluez-simple-agent)} ) ] spids: [198] ) spids: [194 197] ) (FuncDef name: bccmd body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Bluez utility for the CSR BCCMD interface"))} spids: [313] ) ] spids: [313] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/bccmd)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/)} ) ] spids: [310] ) spids: [306 309] ) (FuncDef name: btmon body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Bluez bluetooth monitor"))} spids: [351] ) ] spids: [351] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/btmon)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/)} ) ] spids: [348] ) spids: [344 347] ) (FuncDef name: cups body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Bluez backend for CUPS"))} spids: [389] ) ] spids: [389] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/lib/cups)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/)} ) ] spids: [386] ) spids: [382 385] ) (FuncDef name: hid2hci body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Put HID proxying bluetooth HCI's into HCI mode"))} spids: [427] ) ] spids: [427] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:replaces) op: Equal rhs: {(DQ (bluez))} spids: [433] ) ] spids: [433] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir"))}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/lib)} {(DQ ($ VSub_Name "$subpkgdir")) (/)}) ] spids: [424] ) spids: [420 423] ) (FuncDef name: deprecated body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Deprecated bluetooth tools"))} spids: [470] ) ] spids: [470] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/ciptool)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/hciattach)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/hciconfig)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/hcidump)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/hcitool)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/rfcomm)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/sdptool)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/)} ) ] spids: [467] ) spids: [463 466] ) (FuncDef name: meshctl body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Bluez tool for interacting with bluetooth mesh networks"))} spids: [552] ) ] spids: [552] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/bin/meshctl)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/bin/)} ) ] spids: [549] ) spids: [545 548] ) (FuncDef name: obexd body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pkgdesc) op: Equal rhs: {(DQ ("Bluez OBEX daemon"))} spids: [590] ) ] spids: [590] ) (C {(mkdir)} {(-p)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/bluetooth)}) (C {(mv)} {(DQ ($ VSub_Name "$pkgdir")) (/usr/lib/bluetooth/obexd)} {(DQ ($ VSub_Name "$subpkgdir")) (/usr/lib/bluetooth)} ) ] spids: [587] ) spids: [583 586] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:sha512sums) op: Equal rhs: { (DQ ( "86fa1baae1593d4824038db8418358b0be624c81fc23ee8f96ec08979d309a2377be3924ab53cc0fcb712aec8e696360e9a9f4de4c12cc31b14de5cf495a11a6 bluez-5.47.tar.xz\n" ) ( "fc43c78ed248ea412529eed5ae8bb47bacca9bf5b3b10de121ddd4e792c85893561a88be4aa2c6318106e5d2146a721445152d44fa60ca257ca0b4eb87318c1e bluetooth.initd\n" ) ( "8d7b7c8938a2316ce0a855e9bdf1ef8fcdf33d23f4011df828270a088b88b140a19c432e83fef15355d0829e3c86be05b63e7718fef88563254ea239b8dc12ac rfcomm.initd\n" ) ( "a70aa0dbbabe7e29ee81540a6f98bf191a850da55a28f678975635caf34b363cf4d461a801b3484120ee28fdd21240bd456a4f5d706262700924bd2e9a0972fb rfcomm.confd\n" ) ( "73202915fda01d420b2864da77b1c25af5a55c815e9be6546400a0940bfb6097d83322790bc22a80ec0fcd557144fdd1877e243a79285a7f040ff96ba3600b94 001-bcm43xx-Add-bcm43xx-3wire-variant.patch\n" ) ( "d5fd1c962bd846eaa6fff879bab85f753eb367d514f82d133b5d3242e1da989af5eddd942c60a87d5b67783e060f91bfa0f74fb1e8e6699cdee6e5bbe6a431ea 002-bcm43xx-The-UART-speed-must-be-reset-after-the-firmw.patch\n" ) ( "784e9644c8de4e2693e2eeed988a245608b8cb14e1fc0dff8795c60c527b2e8d0c87862cfbfd6b850b47ae80cdf993a5ed3f477078ea1068fd7374899c7a1a77 003-Increase-firmware-load-timeout-to-30s.patch\n" ) ( "42ac04044a8c66e07487598b3a75ef52efc32999ebce4e7c63f6198e2f603f4a1442e74600e43a0938cb4f52d4db0298aa99050b18144b84990cda71748e9de5 004-Move-the-43xx-firmware-into-lib-firmware.patch\n" ) ( "41ce7ccf78cca97563f0ef31e01dac6eb4484c24fe57be360b5e8de8c5bff5845e9d395766f891bd3f123788344456c88c9fc00cd1bb7c6a1dca89d09f19172b bluez-5.40-obexd_without_systemd-1.patch" ) ) } spids: [621] ) ] spids: [621] ) ] )