]> git.pld-linux.org Git - packages/bluez-utils.git/blob - bluez-utils.spec
- init script moved into init subpackage (initscripts is not required for
[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:      bluez-sdp
27 ExcludeArch:    s390 s390x
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Bluetooth utilities:
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:
44  - hcitool
45  - hciattach
46  - hciconfig
47  - hcid
48  - l2ping
49  - skrypty startowe (PLD)
50  - pliki konfiguracji PCMCIA
51
52 %package -n cups-backend-bluetooth
53 Summary:        Bluetooth backend for CUPS
54 Summary(pl):    Backend Bluetooth dla CUPS-a
55 Group:          Applications/Printing
56 Requires:       bluez-libs >= 2.7
57 Requires:       cups
58
59 %description -n cups-backend-bluetooth
60 Bluetooth backend for CUPS.
61
62 %description -n cups-backend-bluetooth -l pl
63 Backend Bluetooth dla CUPS-a.
64
65 %package init
66 Summary:        Init script for Bluetooth subsystem
67 Summary(pl):    Skrypt init dla podsystemu Bluetooth
68 Group:          Applications/System
69 Requires:       %{name} = %{epoch}:%{version}
70 Requires(post,preun):   /sbin/chkconfig
71
72 %description init
73 Init script for Bluetooth subsystem.
74
75 %description init -l pl
76 Skrypt init dla podsystemu Bluetooth.
77
78 %prep
79 %setup -q
80 %patch0 -p1
81 %patch1 -p1
82 %patch2 -p1
83
84 # fix path (default prefix was /)
85 sed -e "s@pin_helper.*bluepin;@pin_helper %{_bindir}/bluepin;@" \
86         hcid/hcid.conf > hcid.conf.tmp
87 mv -f hcid.conf.tmp hcid/hcid.conf
88
89 %build
90 %{__libtoolize}
91 %{__aclocal}
92 %{__autoconf}
93 %{__automake}
94 %configure \
95         --enable-pcmcia \
96         --with-cups=/usr
97 %{__make}
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
102
103 %{__make} install \
104         DESTDIR=$RPM_BUILD_ROOT
105
106 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
107 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post init
113 /sbin/chkconfig --add bluetooth
114 if [ -f /var/lock/subsys/bluetooth ]; then
115         /etc/rc.d/init.d/bluetooth restart >&2
116 else
117         echo "Run \"/etc/rc.d/init.d/bluetooth\" to start bluetooth." >&2
118 fi
119
120 %postun init
121 if [ "$1" = "0" ]; then
122         if [ -f /var/lock/subsys/bluetooth ]; then
123                 /etc/rc.d/init.d/bluetooth stop 1>&2
124         fi
125         /sbin/chkconfig --del bluetooth
126 fi
127
128 %files
129 %defattr(644,root,root,755)
130 %doc AUTHORS ChangeLog README
131 %attr(755,root,root) %{_bindir}/*
132 %attr(755,root,root) %{_sbindir}/*
133 %{_mandir}/man*/*
134 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/bluetooth
135 %dir %{_sysconfdir}/bluetooth
136 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bluetooth/*
137 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pcmcia/bluetooth.conf
138 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pcmcia/bluetooth
139
140 %files -n cups-backend-bluetooth
141 %defattr(644,root,root,755)
142 %attr(755,root,root) %{_prefix}/lib/cups/backend/bluetooth
143
144 %files init
145 %defattr(644,root,root,755)
146 %attr(754,root,root) /etc/rc.d/init.d/bluetooth
This page took 0.038125 seconds and 3 git commands to generate.