]> git.pld-linux.org Git - packages/bluez-utils.git/blobdiff - bluez-utils.spec
- killed my previous bogus "fixes"
[packages/bluez-utils.git] / bluez-utils.spec
index 51b5e74e1f360de441ea61a09e6469e685aeb609..8ba9c803c134fadbd7b3070ef472e0ef23297d3f 100644 (file)
@@ -1,15 +1,25 @@
+# TODO: 
+# - check init script, add support for rfcomm bind on startup
 Summary:       Bluetooth utilities
+Summary(pl):   Narzêdzia Bluetooth
 Name:          bluez-utils
-Version:       2.2
-Release:       2
-License:       GPL
+Version:       2.3
+Release:       1
+License:       GPL v2
 Group:         Applications/System
 Source0:       http://bluez.sourceforge.net/download/%{name}-%{version}.tar.gz
-#Patch0:               %{name}-build.patch
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-URL:           http://bluez.sourceforge.net
+Source1:       %{name}.init
+Source2:       %{name}.sysconfig
+Patch0:                %{name}-opt.patch
+Patch1:                %{name}-etc_dir.patch
+URL:           http://bluez.sourceforge.net/
+BuildRequires: autoconf
+BuildRequires: automake
 BuildRequires: bluez-libs-devel >= 2.0
+BuildRequires: libtool
+Requires(post,preun):  /sbin/chkconfig
 ExcludeArch:   s390 s390x
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 Bluetooth utilities (bluez-utils):
@@ -18,37 +28,80 @@ Bluetooth utilities (bluez-utils):
  - hciconfig
  - hcid
  - l2ping
- - start scripts (RedHat)
- - pcmcia configuration files
+ - start scripts (PLD)
+ - PCMCIA configuration files
 
 The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
 
-
+%description -l pl
+Narzêdzia Bluetooth (bluez-utils):
+ - hcitool
+ - hciattach
+ - hciconfig
+ - hcid
+ - l2ping
+ - skrypty startowe (PLD)
+ - pliki konfiguracji PCMCIA
 %prep
-rm -rf $RPM_BUILD_ROOT
-
 %setup -q
-#%patch -p1
+%patch0 -p1
+%patch1 -p1
+
+# fix path (default prefix was /)
+sed -e "s@pin_helper.*bluepin;@pin_helper %{_bindir}/bluepin;@" \
+       hcid/hcid.conf > hcid.conf.tmp
+mv -f hcid.conf.tmp hcid/hcid.conf
 
 %build
-%configure2_13 --with-bluez-libs=%{_libdir}
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+%configure \
+       --enable-pcmcia
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
+
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT \
+       confdir=%{_sysconfdir}/bluetooth \
+       mandir=%{_mandir}
+
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/bluetooth
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/bluetooth
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/chkconfig --add bluetooth
+if [ -f /var/lock/subsys/bluetooth ]; then
+       /etc/rc.d/init.d/bluetooth restart >&2
+else
+       echo "Run \"/etc/rc.d/init.d/bluetooth\" to start bluetooth." >&2
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/bluetooth ]; then
+               /etc/rc.d/init.d/bluetooth stop 1>&2
+       fi
+       /sbin/chkconfig --del bluetooth
+fi
+
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS COPYING INSTALL ChangeLog NEWS README
-/etc/rc.d/init.d/bluetooth
+%doc AUTHORS ChangeLog README
 %attr(755,root,root) %{_bindir}/*
 %attr(755,root,root) %{_sbindir}/*
 %{_mandir}/man*/*
-%dir %{_sysconfdir}/bluetooth/
-%config %{_sysconfdir}/bluetooth/*
-%config %{_sysconfdir}/pcmcia/bluetooth.conf
-%config %{_sysconfdir}/pcmcia/bluetooth
+%attr(754,root,root) /etc/rc.d/init.d/bluetooth
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/bluetooth
+%dir %{_sysconfdir}/bluetooth
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/bluetooth/*
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pcmcia/bluetooth.conf
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/pcmcia/bluetooth
This page took 0.096374 seconds and 4 git commands to generate.