diff --git a/README.md b/README.md index e25c83b..e1dbd1f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # alsa-oss +This package contains the compatibility library and wrapper script for running legacy OSS applications through ALSA. Unlike the kernel driver, this has the advantage of supporting DMIX software mixing. + diff --git a/alsa-oss-1.0.12-aoss.patch b/alsa-oss-1.0.12-aoss.patch new file mode 100644 index 0000000..c3baf6f --- /dev/null +++ b/alsa-oss-1.0.12-aoss.patch @@ -0,0 +1,58 @@ +diff -urN alsa-oss-1.0.12/alsa/aoss.1 alsa-oss-1.0.12-patched/alsa/aoss.1 +--- alsa-oss-1.0.12/alsa/aoss.1 2006-08-22 13:43:53.000000000 -0500 ++++ alsa-oss-1.0.12-patched/alsa/aoss.1 2007-02-08 09:34:47.000000000 -0600 +@@ -3,7 +3,7 @@ + aoss \- Wrapper script to facilitate use of the ALSA OSS compatibility + library. + .SH SYNOPSIS +-\fBaoss\fP \fIosscommand\fP [arguments] ++\fBaoss\fP [-32] \fIosscommand\fP [arguments] + + .SH DESCRIPTION + \fBaoss\fP is a simple wrapper script which facilitates the use of the +@@ -38,6 +38,8 @@ + + .SS Arguments + .TP ++\f-32\fP ++Use 32-bit alsa-oss library (on 64-bit systems) + \fIosscommand\fP + A command that uses the OSS API + .TP +diff -urN alsa-oss-1.0.12/alsa/aoss.in alsa-oss-1.0.12-patched/alsa/aoss.in +--- alsa-oss-1.0.12/alsa/aoss.in 2006-08-22 13:43:53.000000000 -0500 ++++ alsa-oss-1.0.12-patched/alsa/aoss.in 2007-02-08 09:47:20.000000000 -0600 +@@ -2,12 +2,29 @@ + + # A simple script to facilitate the use of the OSS compatibility library. + # Usage: +-# aoss ++# aoss [-32] ++ ++if [ -f @prefix@/lib64/libaoss.so.0 ] ++then ++ AOSS_LIBDIR=@prefix@/lib64 ++else ++ AOSS_LIBDIR=@prefix@/lib ++fi ++ ++if [ "$1" = "-32" ] ++then ++ if [ -f @prefix@/lib/libaoss.so.0 ] ++ then ++ AOSS_LIBDIR=@prefix@/lib ++ shift ++ else ++ echo "$0 -32 called, but 32-bit alsa-oss-libs not found! Exiting..." ++ exit 2 ++ fi ++fi + + if [ -d /proc/asound ]; then +- prefix=@prefix@ +- exec_prefix=@exec_prefix@ +- LD_PRELOAD=${exec_prefix}/\$LIB/libaoss.so${LD_PRELOAD:+:$LD_PRELOAD} exec "$@" ++ LD_PRELOAD=${AOSS_LIBDIR}/libaoss.so.0${LD_PRELOAD:+:$LD_PRELOAD} exec "$@" + else + exec "$@" + fi diff --git a/alsa-oss-1.0.14-glibc-open.patch b/alsa-oss-1.0.14-glibc-open.patch new file mode 100644 index 0000000..bdbdfea --- /dev/null +++ b/alsa-oss-1.0.14-glibc-open.patch @@ -0,0 +1,12 @@ +--- alsa-oss-1.0.14/alsa/alsa-oss.c.orig 2007-05-31 03:11:51.000000000 -0500 ++++ alsa-oss-1.0.14/alsa/alsa-oss.c 2007-08-16 16:21:27.000000000 -0500 +@@ -284,6 +284,9 @@ static int mixer_open_helper(const char + return fd; + } + ++#undef open ++#undef open64 ++ + #define DECL_OPEN(name, callback) \ + int name(const char *file, int oflag, ...) \ + { \ diff --git a/alsa-oss.spec b/alsa-oss.spec new file mode 100644 index 0000000..a31482f --- /dev/null +++ b/alsa-oss.spec @@ -0,0 +1,110 @@ +Name: alsa-oss +Version: 1.0.25 +Release: 2mamba +Summary: Advanced Linux Sound Architecture (ALSA) wrapper for OSS +Group: Applications/Multimedia +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://www.alsa-project.org/ +Source: ftp://ftp.alsa-project.org/pub/oss-lib/alsa-oss-%{version}.tar.bz2 +Patch0: alsa-oss-1.0.12-aoss.patch +Patch1: alsa-oss-1.0.14-glibc-open.patch +License: GPL +# AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libalsa-devel +## AUTOBUILDREQ-END +Requires: lib%{name} = %{version}-%{release} +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +This package contains the compatibility library and wrapper script for running legacy OSS applications through ALSA. Unlike the kernel driver, this has the advantage of supporting DMIX software mixing. + +%package -n lib%{name} +Summary: ALSA/OSS wrapper libraries +Group: System/Libraries + +%description -n lib%{name} +System libraries for alsa-oss. + +%package -n lib%{name}-devel +Summary: Devel package for %{name} +Group: Development/Libraries +Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release} +Provides: %{name}-devel +Obsoletes: %{name}-devel + +%description -n lib%{name}-devel +This package contains libraries and header files need for development. + +%package -n lib%{name}-static +Summary: Static libraries package for %{name} +Group: Development/Libraries +Requires: lib%{name}-devel = %{?epoch:%epoch:}%{version}-%{release} +Provides: %{name}-static +Obsoletes: %{name}-static + +%description -n lib%{name}-static +This package contains static libraries need for development. + +%prep +%setup -q +%patch0 -p1 +%patch1 -p1 + +%build +%configure +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -n lib%{name} -p /sbin/ldconfig +%postun -n lib%{name} -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/aoss +%{_mandir}/man1/aoss.1.gz +%doc COPYING + +%files -n lib%{name} +%defattr(-,root,root) +%{_libdir}/libalsatoss.so.* +%{_libdir}/libaoss.so.* + +%files -n lib%{name}-devel +%defattr(-,root,root) +%dir %{_includedir} +%{_includedir}/*.h +%{_libdir}/libalsatoss.la +%{_libdir}/libalsatoss.so +%{_libdir}/libaoss.la +%{_libdir}/libaoss.so +%{_libdir}/libossredir.la +%doc oss-redir/README + +%files -n lib%{name}-static +%defattr(-,root,root) +%{_libdir}/libaoss.a +%{_libdir}/libalsatoss.a +%{_libdir}/libossredir.a + +%changelog +* Tue May 22 2012 Silvan Calarco 1.0.25-2mamba +- move aoss man file from libalsa-oss to alsa-oss package + +* Mon Jan 30 2012 Automatic Build System 1.0.25-1mamba +- automatic version update by autodist + +* Tue Feb 01 2011 Silvan Calarco 1.0.17-2mamba +- libalsa-oss: remove requirement for alsa-oss to prevent loop +- rename alsa-oss-devel to libalsa-oss-devel and alsa-oss-static to libalsa-oss-static + +* Fri Dec 19 2008 gil 1.0.17-1mamba +- package created by autospec