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