SPECS: btsco.spec (NEW) - initial - works on i686, but i can not t...

abram abram at pld-linux.org
Mon Nov 28 20:26:52 CET 2005


Author: abram                        Date: Mon Nov 28 19:26:52 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- initial
- works on i686, but i can not test it on other platforms

---- Files affected:
SPECS:
   btsco.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SPECS/btsco.spec
diff -u /dev/null SPECS/btsco.spec:1.1
--- /dev/null	Mon Nov 28 20:26:52 2005
+++ SPECS/btsco.spec	Mon Nov 28 20:26:46 2005
@@ -0,0 +1,204 @@
+# $Revision$, $Date$
+# Conditional build:
+%bcond_without	dist_kernel	# without kernel from distribution
+%bcond_without	kernel		# don't build kernel modules
+%bcond_without	smp		# don't build SMP module
+%bcond_with	verbose		# verbose build (V=1)
+
+#
+Summary:	Bluetooth-alsa Project
+Summary(pl):	Projekt Bluetooth-alsa
+Name:		btsco
+Version:	0.4
+%define	rel	1
+Release:	%{rel}
+License:	GPL
+Group:		Applications/Sound
+Source0:	http://dl.sourceforge.net/bluetooth-alsa/%{name}-%{version}.tar.gz
+# Source0-md5:	3f46d45db6f0e399044ae6a31b1f23c7
+Patch0:		%{name}-readme-pl.diff
+URL:		http://sourceforge.net/projects/bluetooth-alsa/
+%{?with_dist_kernel:BuildRequires:	kernel-module-build}
+BuildRequires:	bluez-libs-devel >= 2.21-1
+BuildRequires:	libao-devel >= 0.8.6-1
+BuildRequires:	alsa-driver-devel >= 1.0.9-1
+BuildRequires:	alsa-lib-devel >= 1.0.9-1
+BuildRequires:	autoconf
+BuildRequires:	automake
+BuildRequires:	libtool
+Requires:	kernel-sound-alsa
+ExclusiveArch:	%{ix86}
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This project provides a way to use a bluetooth headset with Linux. We
+do this currently by making an alsa kernel driver which uses bluez to
+reach the headset. It works well enough now to get voice-quality audio
+to and from most headsets.
+
+%description -l pl
+Dzięki temu oprogramowaniu można używać zestawów słuchawkowych
+Bluetooth Headset z Linuksem. Osiągnięto to dzięki zbudowaniu alsowego
+modułu do jądra, który to używa bluez'a do komunikacji z takim
+zestawem. Współpracuje z większością zestawów, ograniczeniem w
+komunikacji jest często urządzenie USB, które to może mieć
+nieobsługiwane częściowo protokoły, wskazówka: hciconfig hciXXX
+revision. W skrajnym wypadku można próbować użyć innego urządzenia
+USB.
+
+%package -n kernel-char-btsco
+Summary:	Linux ALSA kernel driver for Bluetooth Headset
+Summary(pl):	Sterownik ALSA do jądra linuksa dla Bluetooth Headset
+Release:	%{rel}@%{_kernel_ver_str}
+Group:		Base/Kernel
+%{?with_dist_kernel:%requires_releq_kernel_up}
+Requires(post,postun):	/sbin/depmod
+
+%description -n kernel-char-btsco
+Linux ALSA kernel driver for Bluetooth Headset named snd_bt_sco
+
+%description -n kernel-char-btsco -l pl
+Sterownik ALSA do jądra linuksa dla Bluetooth Headset o nazwie
+snd_bt_sco
+
+%package -n kernel-smp-char-btsco
+Summary:	Linux ALSA kernel driver for Bluetooth Headset (SMP)
+Summary(pl):	Sterownik ALSA do jądra linuksa dla Bluetooth Headset (SMP)
+Release:	%{rel}@%{_kernel_ver_str}
+Group:		Base/Kernel
+%{?with_dist_kernel:%requires_releq_kernel_smp}
+Requires(post,postun):	/sbin/depmod
+
+%description -n kernel-smp-char-btsco
+Linux ALSA kernel (SMP) driver for Bluetooth Headset named snd_bt_sco
+
+%description -n kernel-smp-char-btsco -l pl
+Sterownik ALSA do jądra linuksa SMP dla Bluetooth Headset o nazwie
+snd_bt_sco
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__automake}
+%configure
+
+%{__make}
+
+%if %{with kernel}
+cd kernel
+# kernel module(s)
+for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
+	if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
+		exit 1
+	fi
+	rm -rf include
+	install -d include/{linux,config}
+	ln -sf %{_kernelsrcdir}/config-$cfg .config
+	ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
+	ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
+	ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
+	touch include/config/MARKER
+
+	# patching/creating makefile(s) (optional)
+	%{__make} -C %{_kernelsrcdir} clean \
+		RCS_FIND_IGNORE="-name '*.ko' -o" \
+		M=$PWD O=$PWD \
+		%{?with_verbose:V=1}
+	%{__make} -C %{_kernelsrcdir} modules \
+		CC="%{__cc}" CPP="%{__cpp}" \
+		M=$PWD O=$PWD \
+		%{?with_verbose:V=1}
+	for mod in *.ko; do
+		mod=$(echo "$mod" | sed -e 's#\.ko##g')
+		mv $mod.ko ../$mod-$cfg.ko
+	done
+done
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_bindir},/lib/modules/%{_kernel_ver}{,smp}/misc}
+
+for file in avdtp/avtest sbc/rcplay sbc/sbcenc sbc/sbcinfo a2play btsco2 btsco ; do
+	install $file $RPM_BUILD_ROOT%{_bindir}
+done
+
+%if %{with kernel}
+	%if %{without dist_kernel}
+	for mod in *-nondist.ko; do
+		nmod=$(echo "$mod" | sed -e 's#-nondist##g')
+		pwd
+		install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$nmod
+	done
+	%else
+	for mod in *-up.ko; do
+		nmod=$(echo "$mod" | sed -e 's#-up##g')
+		pwd
+		install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$nmod
+	done
+	%endif
+
+	%if %{with smp}
+	for mod in *-smp.ko; do
+		nmod=$(echo "$mod" | sed -e 's#-smp##g')
+		pwd
+		install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/$nmod
+	done
+	%endif
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -n kernel-char-btsco
+%depmod %{_kernel_ver}
+echo "after install this package, remember add lines like this:"
+echo "alias snd-card-1 snd-bt-sco"
+echo "alias sound-slot-1 snd-bt-sco"
+echo "to %{_sysconfdir}/modprobe.conf"
+
+%postun -n kernel-char-btsco
+%depmod %{_kernel_ver}
+
+%post -n kernel-smp-char-btsco
+%depmod %{_kernel_ver}
+echo "after install this package, remember add lines like this:"
+echo "alias snd-card-1 snd-bt-sco"
+echo "alias sound-slot-1 snd-bt-sco"
+echo "to %{_sysconfdir}/modprobe.conf"
+
+%postun -n kernel-smp-char-btsco
+%depmod %{_kernel_ver}
+
+%files
+%defattr(644,root,root,755)
+%doc COPYING README README.PL.txt NEWS AUTHORS ChangeLog INSTALL
+%attr(755,root,root) %{_bindir}/*
+
+%if %{with kernel}
+%files -n kernel-char-btsco
+%defattr(644,root,root,755)
+/lib/modules/%{_kernel_ver}/misc/snd-bt-sco.ko.gz
+%endif
+
+%if %{with smp}
+%files -n kernel-smp-char-btsco
+%defattr(644,root,root,755)
+/lib/modules/%{_kernel_ver}smp/misc/snd-bt-sco.ko.gz
+%endif
+
+
+%define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <feedback at pld-linux.org>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+$Log$
+Revision 1.1  2005/11/28 19:26:46  abram
+- initial
+- works on i686, but i can not test it on other platforms
+
================================================================



More information about the pld-cvs-commit mailing list