]> git.pld-linux.org Git - packages/bluez-utils.git/blob - bluez-utils.spec
- chkconfig must be run in preun, rel 2; STBR
[packages/bluez-utils.git] / bluez-utils.spec
1 # TODO:
2 # - check init script, add support for rfcomm bind on startup
3 Summary:        Bluetooth utilities
4 Summary(pl):    Narzêdzia Bluetooth
5 Name:           bluez-utils
6 Version:        2.25
7 Release:        2
8 Epoch:          0
9 License:        GPL v2
10 Group:          Applications/System
11 Source0:        http://bluez.sourceforge.net/download/%{name}-%{version}.tar.gz
12 # Source0-md5:  ae3729ab5592be06ed01b973d4b3e9fe
13 Source1:        %{name}.init
14 Source2:        %{name}.sysconfig
15 Patch0:         %{name}-etc_dir.patch
16 URL:            http://bluez.sourceforge.net/
17 BuildRequires:  autoconf
18 BuildRequires:  automake
19 BuildRequires:  bison
20 BuildRequires:  bluez-libs-devel >= 2.25
21 BuildRequires:  dbus-devel >= 0.33
22 BuildRequires:  libtool
23 BuildRequires:  libusb-devel
24 # alsa-lib-devel, openobex-devel - currently only checked for, not used
25 Requires:       bluez-libs >= 2.21
26 Requires:       rc-scripts
27 Obsoletes:      bluez-pan
28 Obsoletes:      bluez-sdp
29 Conflicts:      bluez-bluefw
30 ExcludeArch:    s390 s390x
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 # currently lib, not %{_lib} (see cups.spec)
34 %define         cupsdir         /usr/lib/cups/backend
35
36 %description
37 Bluetooth utilities:
38  - hcitool
39  - hciattach
40  - hciconfig
41  - hcid
42  - l2ping
43  - start scripts (PLD)
44  - PCMCIA configuration files
45
46 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
47
48 %description -l pl
49 Narzêdzia Bluetooth:
50  - hcitool
51  - hciattach
52  - hciconfig
53  - hcid
54  - l2ping
55  - skrypty startowe (PLD)
56  - pliki konfiguracji PCMCIA
57
58 %package -n cups-backend-bluetooth
59 Summary:        Bluetooth backend for CUPS
60 Summary(pl):    Backend Bluetooth dla CUPS-a
61 Group:          Applications/Printing
62 Requires:       bluez-libs >= 2.21
63 Requires:       cups
64
65 %description -n cups-backend-bluetooth
66 Bluetooth backend for CUPS.
67
68 %description -n cups-backend-bluetooth -l pl
69 Backend Bluetooth dla CUPS-a.
70
71 %package init
72 Summary:        Init script for Bluetooth subsystem
73 Summary(pl):    Skrypt init dla podsystemu Bluetooth
74 Group:          Applications/System
75 Requires(post,preun):   /sbin/chkconfig
76 Requires:       %{name} = %{epoch}:%{version}-%{release}
77
78 %description init
79 Init script for Bluetooth subsystem.
80
81 %description init -l pl
82 Skrypt init dla podsystemu Bluetooth.
83
84 %prep
85 %setup -q
86 %patch0 -p1
87
88 %build
89 %{__libtoolize}
90 %{__aclocal}
91 %{__autoconf}
92 %{__automake}
93 %configure \
94         --enable-bcm203x \
95         --enable-cups \
96         --enable-pcmcia \
97         --with-cups=/usr
98 %{__make} \
99         cupsdir=%{cupsdir}
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
104
105 %{__make} install \
106         DESTDIR=$RPM_BUILD_ROOT \
107         cupsdir=%{cupsdir}
108
109 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
110 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %post init
116 /sbin/chkconfig --add bluetooth
117 if [ -f /var/lock/subsys/bluetooth ]; then
118         /etc/rc.d/init.d/bluetooth restart >&2
119 else
120         echo "Run \"/etc/rc.d/init.d/bluetooth\" to start bluetooth." >&2
121 fi
122
123 %preun init
124 if [ "$1" = "0" ]; then
125         if [ -f /var/lock/subsys/bluetooth ]; then
126                 /etc/rc.d/init.d/bluetooth stop 1>&2
127         fi
128         /sbin/chkconfig --del bluetooth
129 fi
130
131 %files
132 %defattr(644,root,root,755)
133 %doc AUTHORS ChangeLog README
134 %attr(755,root,root) %{_bindir}/*
135 %attr(755,root,root) %{_sbindir}/*
136 %{_mandir}/man*/*
137 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/bluetooth
138 %dir %{_sysconfdir}/bluetooth
139 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/bluetooth/*
140 %attr(755,root,root) %{_sysconfdir}/hotplug/usb/bcm203x
141 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hotplug/usb/bcm203x.usermap
142 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pcmcia/bluetooth.conf
143 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pcmcia/bluetooth
144
145 %files -n cups-backend-bluetooth
146 %defattr(644,root,root,755)
147 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
148
149 %files init
150 %defattr(644,root,root,755)
151 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
This page took 0.065962 seconds and 4 git commands to generate.