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