bluez-vl.spec 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. %bcond_with systemd
  2. %define _unpackaged_files_terminate_build 1
  3. %if "0%{?_udevrulesdir}" == "0"
  4. %global _udevrulesdir /lib/udev/rules.d
  5. %endif
  6. Summary: Bluetooth utilities
  7. Summary(ja): Bluetooth ユーティリティ
  8. Name: bluez
  9. Version: 5.59
  10. Release: 1%{?_dist_release}%{?with_systemd:.systemd}
  11. Group: system,admin-tools
  12. Vendor: Project Vine
  13. Distribution: Vine Linux
  14. Packager: daisuke
  15. License: GPLv2+
  16. URL: http://www.bluez.org/
  17. #----------------------------------------------------------------------------
  18. Source: http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.xz
  19. Source1: bluetooth.init.vine
  20. Source3: bluez-uinput.modules
  21. Source11: trusts.txt
  22. Source20: main.conf
  23. # Scripts for automatically btattach-ing serial ports connected to Broadcom HCIs
  24. Source22: 69-btattach-bcm.rules
  25. Source23: btattach-bcm@.service
  26. Source24: btattach-bcm-service.sh
  27. # from http://www.linuxfromscratch.org/patches/downloads/bluez/
  28. Patch0: 0001-bluez-5.54-obexd_without_systemd-1.patch
  29. # https://github.com/hadess/bluez/commits/obex-5.46
  30. Patch1: 0001-obex-Use-GLib-helper-function-to-manipulate-paths.patch
  31. # https://github.com/hadess/bluez/commits/systemd-hardening
  32. Patch10: 0001-build-Always-define-confdir-and-statedir.patch
  33. Patch11: 0002-systemd-Add-PrivateTmp-and-NoNewPrivileges-options.patch
  34. Patch12: 0003-systemd-Add-more-filesystem-lockdown.patch
  35. Patch13: 0004-systemd-More-lockdown.patch
  36. # Patch for Vine
  37. Patch100: 0002-bluez-5.54-daemon.patch
  38. Patch101: 0003-bluez-5.54-config-vine.patch
  39. #----------------------------------------------------------------------------
  40. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  41. BuildRequires: flex
  42. BuildRequires: bison
  43. BuildRequires: dbus-devel
  44. BuildRequires: glib2-devel
  45. BuildRequires: readline-devel
  46. BuildRequires: libical-devel
  47. BuildRequires: json-c-devel
  48. BuildRequires: python3-docutils
  49. %if %{with systemd}
  50. BuildRequires: systemd-devel
  51. %{?systemd_requires}
  52. %else
  53. BuildRequires: eudev-libudev-devel
  54. Requires(post): /sbin/chkconfig, /sbin/service
  55. Requires(preun): /sbin/chkconfig, /sbin/service
  56. Requires(postun): /sbin/service
  57. %endif
  58. ExcludeArch: s390 s390x
  59. Obsoletes: bluez-pan < 4.0, bluez-sdp < 4.0
  60. Requires: initscripts, bluez-libs = %{version}
  61. Requires: dbus >= 0.60
  62. # Requires: fuse
  63. ## Requires: hwdata >= 0.215
  64. Requires: hwdata >= 0.146
  65. #----------------------------------------------------------------------------
  66. Obsoletes: bluez-utils < 4.5-2
  67. Provides: bluez-utils = %{version}-%{release}
  68. Obsoletes: bluez-gstreamer < 5.0
  69. Obsoletes: bluez-alsa < 5.0
  70. #----------------------------------------------------------------------------
  71. %description
  72. Utilities for use in Bluetooth applications:
  73. - hcitool
  74. - hciattach
  75. - hciconfig
  76. - bluetoothd
  77. - l2ping
  78. - start scripts VineLinux (RedHat base)
  79. - pcmcia configuration files
  80. Please, read %{_defaultdocdir}/%{name}-%{version}/trusts.txt
  81. The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
  82. %description -l ja
  83. Bluetooth ユーティリティ (bluez-utils):
  84. - hcitool
  85. - hciattach
  86. - hciconfig
  87. - l2ping
  88. - 起動スクリプト (Red Hat用をVineLinuxに合わせました)
  89. - pcmcia コンフィグレーション ファイル
  90. ※付属の%{_defaultdocdir}/%{name}-%{version}/trusts.txtもご覧下さい。
  91. (BLUETOOTH は Bluetooth SIG, Inc.(USA)のトレードマークです)
  92. #----------------------------------------------------------------------------
  93. %package libs
  94. Summary: Libraries for use in Bluetooth applications
  95. Summary(ja): BlueTooth アプリケーションの使用するライブラリ(BlueZ)
  96. Group: system
  97. %description libs
  98. Libraries for use in Bluetooth applications.
  99. %description libs -l ja
  100. Bluetooth アプリケーションのためのライブラリです。
  101. ※BlueZ のユーティリティのためにも必要です
  102. #----------------------------------------------------------------------------
  103. %package libs-devel
  104. Summary: Development libraries for Bluetooth applications
  105. Summary(ja): Bluetooth アプリケーション開発のためのdevelパッケージ
  106. Group: programming
  107. Requires: bluez-libs = %{version}
  108. Requires: pkgconfig
  109. Obsoletes: bluez-sdp-devel < 4.0
  110. %description libs-devel
  111. bluez-libs-devel contains development libraries and headers for
  112. use in Bluetooth applications.
  113. %description libs-devel -l ja
  114. bluez-libs-devel パッケージは Bluetooth アプリケーション開発のための
  115. ライブラリやヘッダーファイルを提供します。
  116. #----------------------------------------------------------------------------
  117. %package cups
  118. Summary: CUPS printer backend for Bluetooth printers
  119. Summary(ja): Bluetooth 経由の CUPS プリンタシステム用
  120. Group: servers
  121. Obsoletes: bluez-utils-cups < 4.5-2
  122. Provides: bluez-utils-cups = %{version}-%{release}
  123. Requires: bluez-libs = %{version}
  124. Requires: cups
  125. %description cups
  126. This package contains the CUPS backend
  127. %description cups -l ja
  128. Bluetooth対応 プリンターを CUPS印刷システムから利用する
  129. ためのバックエンドです。
  130. #----------------------------------------------------------------------------
  131. %prep
  132. rm -rf $RPM_BUILD_ROOT
  133. %setup -q
  134. %if !%{with systemd}
  135. %patch0 -p1
  136. %patch1 -p1
  137. %else
  138. %patch1 -p1
  139. %patch10 -p1
  140. %patch11 -p1
  141. %patch12 -p1
  142. %patch13 -p1
  143. %endif
  144. %patch100 -p1
  145. %patch101 -p1
  146. %build
  147. %configure \
  148. %if %{with systemd}
  149. --with-systemdsystemunitdir=%{_unitdir} \
  150. --with-systemduserunitdir=%{_userunitdir} \
  151. --enable-mesh \
  152. %else
  153. --disable-systemd \
  154. %endif
  155. --enable-library \
  156. --enable-cups \
  157. --enable-tools \
  158. --enable-sixaxis \
  159. --enable-nfc \
  160. --enable-hid2hci \
  161. --disable-android
  162. make %{?_smp_mflags}
  163. #----------------------------------------------------------------------------
  164. %install
  165. rm -rf %{buildroot}
  166. make install DESTDIR=%{buildroot}
  167. # Remove autocrap and libtool droppings
  168. find %{buildroot} -name '*.la' -exec rm -f {} \;
  169. mkdir -p %{buildroot}%{_sysconfdir}/bluetooth/
  170. mkdir -p %{buildroot}%{_libdir}/bluetooth/
  171. mkdir -p %{buildroot}%{_sbindir}
  172. install -d -m0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/bluetooth
  173. %if %{with systemd}
  174. install -d -m0755 $RPM_BUILD_ROOT/%{_localstatedir}/lib/bluetooth/mesh
  175. #serial port connected Broadcom HCIs scripts
  176. install -D -p -m0644 %{SOURCE22} %{buildroot}/%{_udevrulesdir}/
  177. install -D -p -m0644 %{SOURCE23} %{buildroot}/%{_unitdir}/
  178. install -D -p -m0755 %{SOURCE24} %{buildroot}/%{_libexecdir}/bluetooth/
  179. %else
  180. install -D -m0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/rc.d/init.d/bluetooth
  181. ln -s ../libexec/bluetooth/bluetoothd %{buildroot}%{_sbindir}/bluetoothd
  182. %endif
  183. #copy bluetooth config file and setup auto enable
  184. install -D -p -m0644 src/main.conf %{buildroot}/etc/bluetooth/main.conf
  185. install -D -p -m0644 mesh/mesh-main.conf %{buildroot}/etc/bluetooth/mesh-main.conf
  186. sed -i 's/#\[Policy\]$/\[Policy\]/; s/#AutoEnable=false/AutoEnable=true/' %{buildroot}/%{_sysconfdir}/bluetooth/main.conf
  187. install -D -m0755 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/modules/bluez-uinput.modules
  188. #----------------------------------------------------------------------------
  189. %clean
  190. rm -rf %{buildroot}
  191. #----------------------------------------------------------------------------
  192. %post
  193. %if %{with systemd}
  194. %systemd_post bluetooth.service
  195. %systemd_user_post bluetooth-mesh.service
  196. %systemd_user_post obex.service
  197. /bin/udevadm trigger --subsystem-match=usb
  198. %else
  199. /sbin/chkconfig --add bluetooth
  200. /sbin/udevadm trigger --subsystem-match=usb
  201. %endif
  202. exit 0
  203. %preun
  204. %if %{with systemd}
  205. %systemd_preun bluetooth.service
  206. %systemd_user_preun bluetooth-mesh.service
  207. %systemd_user_preun obex.service
  208. %else
  209. if [ "$1" = "0" -o -x /bin/systemctl ]; then
  210. /sbin/service bluetooth stop >/dev/null 2>&1 || :
  211. /sbin/chkconfig --del bluetooth
  212. fi
  213. exit 0
  214. %endif
  215. %postun
  216. %if %{with systemd}
  217. %systemd_postun_with_restart bluetooth.service
  218. %else
  219. if [ "$1" -ge "0" ]; then
  220. /sbin/service bluetooth condrestart >/dev/null 2>&1 || :
  221. fi
  222. %endif
  223. #----------------------------------------------------------------------------
  224. %files
  225. %defattr(-, root, root)
  226. %license COPYING
  227. %doc AUTHORS INSTALL ChangeLog NEWS README
  228. %dir %{_sysconfdir}/bluetooth/
  229. %config(noreplace) %{_sysconfdir}/bluetooth/*
  230. %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
  231. %{_sysconfdir}/sysconfig/modules/bluez-uinput.modules
  232. %{_bindir}/*
  233. %{_libexecdir}/bluetooth/bluetoothd
  234. %{_libexecdir}/bluetooth/obexd
  235. %dir %{_libdir}/bluetooth
  236. %dir %{_libdir}/bluetooth/plugins
  237. %{_libdir}/bluetooth/plugins/sixaxis.so
  238. %{_mandir}/man1/*
  239. %{_mandir}/man8/*
  240. /lib/udev/hid2hci
  241. %{_udevrulesdir}/97-hid2hci.rules
  242. %dir %{_datadir}/zsh
  243. %dir %{_datadir}/zsh/site-functions
  244. %{_datadir}/zsh/site-functions/_bluetoothctl
  245. %dir %{_localstatedir}/lib/bluetooth
  246. %if %{with systemd}
  247. %{_unitdir}/bluetooth.service
  248. %{_unitdir}/btattach-bcm@.service
  249. %{_libexecdir}/bluetooth/btattach-bcm-service.sh
  250. %{_udevrulesdir}/69-btattach-bcm.rules
  251. %{_userunitdir}/obex.service
  252. %{_datadir}/dbus-1/system-services/org.bluez.service
  253. %{_datadir}/dbus-1/services/org.bluez.obex.service
  254. # mesh files
  255. %doc tools/mesh-gatt/*.json
  256. %config %{_sysconfdir}/dbus-1/system.d/bluetooth-mesh.conf
  257. %{_datadir}/dbus-1/system-services/org.bluez.mesh.service
  258. %{_libexecdir}/bluetooth/bluetooth-meshd
  259. %{_unitdir}/bluetooth-mesh.service
  260. %dir %{_localstatedir}/lib/bluetooth/mesh
  261. %else
  262. %{_sysconfdir}/rc.d/init.d/bluetooth
  263. %{_sbindir}/bluetoothd
  264. %endif
  265. %files libs
  266. %defattr(-, root, root)
  267. %{_libdir}/libbluetooth.so.*
  268. %files libs-devel
  269. %defattr(-, root, root)
  270. %{_libdir}/libbluetooth.so
  271. %dir %{_includedir}/bluetooth
  272. %{_includedir}/bluetooth/*
  273. %{_libdir}/pkgconfig/bluez.pc
  274. %files cups
  275. %defattr(-, root, root)
  276. %{_libdir}/cups/backend/bluetooth
  277. %changelog
  278. * Tue Jun 22 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.59-1
  279. - updated to 5.59.
  280. - dropped ldconfig scriptlets.
  281. * Thu Oct 22 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.55-1
  282. - updated to 5.55.
  283. - added systemd support (disabled as default).
  284. * Sun Mar 22 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.54-1
  285. - updated to 5.54.
  286. - updated all patches.
  287. * Sun Sep 01 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.50-1
  288. - updated to 5.50.
  289. * Fri Jan 26 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 5.48-1
  290. - updated to 5.48.
  291. * Sat Nov 07 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.35-1
  292. - update to 5.35
  293. - remove %%{name}-gstreamer, %%{name}-alsa subpackages
  294. - add Patch0 (bluez-5.35-obexd_without_systemd-1.patch)
  295. - add Patch100 (bluez-5.35-daemon.patch)
  296. - add Patch101 (bluez-5.35-config-vine.patch)
  297. * Sat Jul 18 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.101-5
  298. - rebuild with readline-6.3
  299. * Tue Jun 17 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.101-4
  300. - change BuildRequires: eudev-libudev-devel instead of libudev-devel
  301. * Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.101-3
  302. - rebuild with VineSeed environment
  303. * Thu Jul 11 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 4.101-2
  304. - build with sbc
  305. - add BR: sbc-devel
  306. * Sun Jun 24 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.101-1
  307. - new upstream release
  308. * Sun Mar 11 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.99-1
  309. - new upstream release
  310. * Thu Feb 23 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.98-1
  311. - new upstream release
  312. * Sun Dec 25 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.97-1
  313. - new upstream release
  314. - add BuildRequires: check-devel, readline-devel
  315. * Sun Aug 28 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.96-1
  316. - new upstream release
  317. - add BuildRequires: libudev-devel
  318. * Thu Feb 24 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.89-1
  319. - new upstream release
  320. * Sat Feb 05 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.87-1
  321. - new upstream release
  322. * Thu Dec 30 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.84-1
  323. - new upstream release
  324. * Sun Dec 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.82-1
  325. - new upstream release
  326. * Fri Dec 10 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.81-1
  327. - new upstream release
  328. * Tue Nov 16 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.79-1
  329. - new upstream release
  330. - drop Patch2
  331. * Wed Nov 03 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.77-1
  332. - new upstream release
  333. - fix %files (change path of alsa/bluetooth.conf)
  334. * Thu Sep 23 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.69-2
  335. - rebuild with rpm-4.8.1 for pkg-config file
  336. * Mon Jul 19 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.69-1
  337. - new upstream release
  338. * Mon Jun 21 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.66-1
  339. - new upstream release
  340. * Sat May 01 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.64-1
  341. - new upstream release
  342. - drop Patch1, Patch5, Patch6
  343. * Sun Jul 05 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 4.42-2
  344. - add bluetooth.init again.
  345. - on-demand startup on bootup process will fail, because
  346. D-BUS service is not started yet.
  347. * Sun Jun 28 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 4.42-1
  348. - new upstream release
  349. * Mon Jun 22 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 4.41-2
  350. - remove bluetooth.init
  351. - on-demand start/stop bluetoothd using udev
  352. - run hid2hci using udev
  353. - add missing files to %%files
  354. * Fri Jun 19 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 4.41-1
  355. - new upstream release
  356. - add udev rule
  357. - add upstream Patch[2-6]
  358. * Tue May 26 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 4.37-1
  359. - new upstream release
  360. * Fri Oct 24 2008 Seiichirou Babasaki 4.15-1
  361. - Update to 4.15
  362. - added # Maintainers: comments.
  363. - FedoraCore - LOGS
  364. -- 4.14-2
  365. -- Add script to autoload uinput on startup, so the PS3 remote
  366. works out-of-the-box
  367. -- 4.14-1 - Update to 4.14
  368. -- 4.13-3
  369. -- Update udev rules (#246840)
  370. -- 4.13-2
  371. -- Fix PS3 BD remote input event generation
  372. -- 4.13-1 - Update to 4.13
  373. -- 4.12-1 - Update to 4.12
  374. -- 4.11-1 - Update to 4.11
  375. -- 4.10-1 - Update to 4.10
  376. -- 4.9-1 - Update to 4.9
  377. -- 4.8-1 - Update to 4.8
  378. -- 4.7-1 - Update to 4.7
  379. -- 4.6-4
  380. -- Fix patch application
  381. -- 4.6-3
  382. -- Add fuzz
  383. -- 4.6-2
  384. -- Fix possible crasher on resume from suspend
  385. -- 4.6-1 - Update to 4.6
  386. -- 4.5-4
  387. -- SDP browse fixes
  388. -- 4.5-3
  389. -- Bluez-alsa needs to provide/obsolete bluez-utils-alsa
  390. -- Use versioned Obsoletes:
  391. -- 4.5-2
  392. -- Change main utils package name to 'bluez'; likewise its subpackages
  393. -- Remove references to obsolete initscripts (hidd,pand,dund)
  394. -- 4.5-1
  395. -- Update to 4.5
  396. -- Fix initscript to actually start bluetoothd by hand
  397. -- Add chkconfig information to the initscript
  398. -- 4.4-2
  399. -- Fix rpmlint problems
  400. -- Fix input device handling
  401. -- 4.4-1
  402. -- Update to 4.4
  403. -- Update source address, and remove unneeded deps (thanks Marcel)
  404. -- 4.1-1
  405. -- Initial build
  406. - updated specfile
  407. - VineLinux-4.2 logfile
  408. -- *Thu Oct 2 2008 Seiichirou Babasaki 3.24-4
  409. -- update bleuz-gnome, rebuild bluez-utils
  410. -- Requires: fuse
  411. -- updated specfile
  412. -- *Tue Sep 30 2008 Seiichirou Babasaki 3.24-3
  413. -- trusts.txt update (added audio profile)
  414. -- updated specfile
  415. #----------------------------------------------------------------------------
  416. * Fri Sep 26 2008 Seiichirou Babasaki 3.32-2
  417. - *.conf update
  418. - updated specfile
  419. * Fri Jun 13 2008 Seiichirou Babasaki 3.32-1
  420. - Updated 3.32
  421. - Updated specfile
  422. - ** LOGS 3.31-2
  423. - ** Add a .service file, starting up hcid only when used (#446918)
  424. - ** Fix descriptions in the initscript headers (#433647)
  425. - ** LOGS 3.30-2
  426. - ** Add support for Dell HID/HCI switch
  427. - ** LOGS 3.27-1
  428. - ** Ship audio.conf (#278831)
  429. - ** Ship network service
  430. * Sat Jan 26 2008 Seiichirou Babasaki 3.24-2
  431. - Updated specfile
  432. - marge bluez-utils-3.24-conf-vl.patch
  433. - << bluez-utils-2.3-conf.patch
  434. - add trusts.txt(ja)
  435. - Updated specfile
  436. * Mon Jan 21 2008 Seiichirou Babasaki 3.24-1vl2
  437. - Updated specfile for (dbus-devel >= 0.90)
  438. * Wed Jan 16 2008 Seiichirou Babasaki 3.24-1vl1
  439. - Import bluez-utils - Packager: Babasaki
  440. - Updated specfile for (dbus-devel >= 0.60)
  441. - Update to 3.24