- updated to 2.6 (for bluez-libs 2.6), obsoletes bluez-sdp
[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.6
7 Release:        1
8 License:        GPL v2
9 Group:          Applications/System
10 Source0:        http://bluez.sourceforge.net/download/%{name}-%{version}.tar.gz
11 # Source0-md5:  c8fa21bec5f226f3af8a36d281d77202
12 Source1:        %{name}.init
13 Source2:        %{name}.sysconfig
14 Patch0:         %{name}-opt.patch
15 Patch1:         %{name}-etc_dir.patch
16 Patch2:         %{name}-sdp.patch
17 URL:            http://bluez.sourceforge.net/
18 BuildRequires:  autoconf
19 BuildRequires:  automake
20 BuildRequires:  bison
21 BuildRequires:  bluez-libs-devel >= 2.6
22 BuildRequires:  libtool
23 PreReq:         rc-scripts
24 Requires(post,preun):   /sbin/chkconfig
25 Requires:       bluez-libs >= 2.6
26 Obsoletes:      bluez-sdp
27 ExcludeArch:    s390 s390x
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Bluetooth utilities (bluez-utils):
32  - hcitool
33  - hciattach
34  - hciconfig
35  - hcid
36  - l2ping
37  - start scripts (PLD)
38  - PCMCIA configuration files
39
40 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
41
42 %description -l pl
43 Narz√™dzia Bluetooth (bluez-utils):
44  - hcitool
45  - hciattach
46  - hciconfig
47  - hcid
48  - l2ping
49  - skrypty startowe (PLD)
50  - pliki konfiguracji PCMCIA
51
52 %prep
53 %setup -q
54 %patch0 -p1
55 %patch1 -p1
56 %patch2 -p1
57
58 # fix path (default prefix was /)
59 sed -e "s@pin_helper.*bluepin;@pin_helper %{_bindir}/bluepin;@" \
60         hcid/hcid.conf > hcid.conf.tmp
61 mv -f hcid.conf.tmp hcid/hcid.conf
62
63 %build
64 %{__libtoolize}
65 %{__aclocal}
66 %{__autoconf}
67 %{__automake}
68 %configure \
69         --enable-pcmcia
70 %{__make}
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
75
76 %{__make} install \
77         DESTDIR=$RPM_BUILD_ROOT
78
79 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
80 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %post
86 /sbin/chkconfig --add bluetooth
87 if [ -f /var/lock/subsys/bluetooth ]; then
88         /etc/rc.d/init.d/bluetooth restart >&2
89 else
90         echo "Run \"/etc/rc.d/init.d/bluetooth\" to start bluetooth." >&2
91 fi
92
93 %postun
94 if [ "$1" = "0" ]; then
95         if [ -f /var/lock/subsys/bluetooth ]; then
96                 /etc/rc.d/init.d/bluetooth stop 1>&2
97         fi
98         /sbin/chkconfig --del bluetooth
99 fi
100
101 %files
102 %defattr(644,root,root,755)
103 %doc AUTHORS ChangeLog README
104 %attr(755,root,root) %{_bindir}/*
105 %attr(755,root,root) %{_sbindir}/*
106 %{_mandir}/man*/*
107 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
108 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/bluetooth
109 %dir %{_sysconfdir}/bluetooth
110 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bluetooth/*
111 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pcmcia/bluetooth.conf
112 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pcmcia/bluetooth
This page took 0.128739 seconds and 4 git commands to generate.