bluez-vl.spec 15 KB

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