%define pfx /opt/freescale/rootfs/%{_target_cpu} Summary : BlueZ bluetooth Name : bluez Version : 4.18 Release : 1 License : GPL Vendor : Freescale Packager : Alan Carvalho de Assis Group : Applications/System Source : %{name}-%{version}.tar.gz BuildRoot : %{_tmppath}/%{name} Prefix : %{pfx} %Description %{summary} %Prep %setup %Build # Determine whether certain libraries exist, and # what to tell ./configure about them. if [ -f $DEV_IMAGE/usr/lib/libasound.so ] ; then _alsa_lib="--with-alsa=$DEV_IMAGE/usr/lib" else _alsa_lib="--without-alsa" fi if [ -f $DEV_IMAGE/usr/lib/libusb.so ] ; then _usb_lib="--with-usb=$DEV_IMAGE/usr/lib" else _usb_lib="--without-usb" fi ./configure --prefix=%{_prefix} --host=$CFGHOST --build=%{_build} \ --sysconfdir=%{_sysconfdir} --localstatedir=/var \ $_alsa_lib \ $_usb_lib \ --enable-bccmd \ --without-openobex \ --without-fuse make all %Install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{pfx} make install DESTDIR=${RPM_BUILD_ROOT}/%{pfx} # install the init script mkdir -p $RPM_BUILD_ROOT/%{pfx}/etc/default $RPM_BUILD_ROOT/%{pfx}/etc/rc.d/init.d cp scripts/bluetooth.init $RPM_BUILD_ROOT/%{pfx}/etc/rc.d/init.d/bluetooth chmod +x $RPM_BUILD_ROOT/%{pfx}/etc/rc.d/init.d/bluetooth # install config file cp scripts/bluetooth.default $RPM_BUILD_ROOT/%{pfx}/etc/default/bluetooth %Clean rm -rf $RPM_BUILD_ROOT %Files %defattr(-,root,root) %{pfx}/*