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