This commit is contained in:
parent
017961767d
commit
620d64b4f1
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:de7e492931c53339443dfdddfd1833f5fdd20f83e3a86d73940ae430dd809586
|
|
||||||
size 236300
|
|
@ -1,184 +0,0 @@
|
|||||||
diff -r 6b42089e67e3 alsa/alsa-oss.c
|
|
||||||
--- a/alsa/alsa-oss.c Tue Aug 22 14:40:57 2006 +0200
|
|
||||||
+++ b/alsa/alsa-oss.c Mon Feb 19 12:57:13 2007 +0100
|
|
||||||
@@ -69,6 +69,7 @@ static int (*_select)(int n, fd_set *rea
|
|
||||||
static int (*_select)(int n, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
|
|
||||||
static int (*_poll)(struct pollfd *ufds, unsigned int nfds, int timeout);
|
|
||||||
static int (*_open)(const char *file, int oflag, ...);
|
|
||||||
+static int (*_open64)(const char *file, int oflag, ...);
|
|
||||||
static int (*_close)(int fd);
|
|
||||||
static ssize_t (*_write)(int fd, const void *buf, size_t n);
|
|
||||||
static ssize_t (*_read)(int fd, void *buf, size_t n);
|
|
||||||
@@ -78,6 +79,7 @@ static int (*_munmap)(void* addr, size_t
|
|
||||||
static int (*_munmap)(void* addr, size_t len);
|
|
||||||
|
|
||||||
static FILE *(*_fopen)(const char *path, const char *mode);
|
|
||||||
+static FILE *(*_fopen64)(const char *path, const char *mode);
|
|
||||||
|
|
||||||
typedef struct ops {
|
|
||||||
int (*close)(int fd);
|
|
||||||
@@ -242,57 +244,73 @@ static ops_t ops[FD_CLASSES] = {
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
-int open(const char *file, int oflag, ...)
|
|
||||||
-{
|
|
||||||
- va_list args;
|
|
||||||
- mode_t mode = 0;
|
|
||||||
+static int dsp_open_helper(const char *file, int oflag)
|
|
||||||
+{
|
|
||||||
int fd;
|
|
||||||
-
|
|
||||||
- if (!initialized)
|
|
||||||
- initialize();
|
|
||||||
-
|
|
||||||
- if (oflag & O_CREAT) {
|
|
||||||
- va_start(args, oflag);
|
|
||||||
- mode = va_arg(args, mode_t);
|
|
||||||
- va_end(args);
|
|
||||||
- }
|
|
||||||
- if (is_dsp_device(file)) {
|
|
||||||
- fd = lib_oss_pcm_open(file, oflag);
|
|
||||||
- if (fd >= 0) {
|
|
||||||
- int nfds;
|
|
||||||
- fds[fd] = calloc(sizeof(fd_t), 1);
|
|
||||||
- if (fds[fd] == NULL) {
|
|
||||||
- ops[FD_OSS_DSP].close(fd);
|
|
||||||
- errno = ENOMEM;
|
|
||||||
- return -1;
|
|
||||||
- }
|
|
||||||
- fds[fd]->class = FD_OSS_DSP;
|
|
||||||
- fds[fd]->oflags = oflag;
|
|
||||||
- nfds = lib_oss_pcm_poll_fds(fd);
|
|
||||||
- if (nfds > 0) {
|
|
||||||
- fds[fd]->poll_fds = nfds;
|
|
||||||
- poll_fds_add += nfds;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- } else if (is_mixer_device(file)) {
|
|
||||||
- fd = lib_oss_mixer_open(file, oflag);
|
|
||||||
- if (fd >= 0) {
|
|
||||||
- fds[fd] = calloc(sizeof(fd_t), 1);
|
|
||||||
- if (fds[fd] == NULL) {
|
|
||||||
- ops[FD_OSS_MIXER].close(fd);
|
|
||||||
- errno = ENOMEM;
|
|
||||||
- return -1;
|
|
||||||
- }
|
|
||||||
- fds[fd]->class = FD_OSS_MIXER;
|
|
||||||
- fds[fd]->oflags = oflag;
|
|
||||||
- }
|
|
||||||
- } else {
|
|
||||||
- fd = _open(file, oflag, mode);
|
|
||||||
- if (fd >= 0)
|
|
||||||
- assert(fds[fd] == NULL);
|
|
||||||
+ fd = lib_oss_pcm_open(file, oflag);
|
|
||||||
+ if (fd >= 0) {
|
|
||||||
+ int nfds;
|
|
||||||
+ fds[fd] = calloc(sizeof(fd_t), 1);
|
|
||||||
+ if (fds[fd] == NULL) {
|
|
||||||
+ ops[FD_OSS_DSP].close(fd);
|
|
||||||
+ errno = ENOMEM;
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ fds[fd]->class = FD_OSS_DSP;
|
|
||||||
+ fds[fd]->oflags = oflag;
|
|
||||||
+ nfds = lib_oss_pcm_poll_fds(fd);
|
|
||||||
+ if (nfds > 0) {
|
|
||||||
+ fds[fd]->poll_fds = nfds;
|
|
||||||
+ poll_fds_add += nfds;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
return fd;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+static int mixer_open_helper(const char *file, int oflag)
|
|
||||||
+{
|
|
||||||
+ int fd;
|
|
||||||
+ fd = lib_oss_mixer_open(file, oflag);
|
|
||||||
+ if (fd >= 0) {
|
|
||||||
+ fds[fd] = calloc(sizeof(fd_t), 1);
|
|
||||||
+ if (fds[fd] == NULL) {
|
|
||||||
+ ops[FD_OSS_MIXER].close(fd);
|
|
||||||
+ errno = ENOMEM;
|
|
||||||
+ return -1;
|
|
||||||
+ }
|
|
||||||
+ fds[fd]->class = FD_OSS_MIXER;
|
|
||||||
+ fds[fd]->oflags = oflag;
|
|
||||||
+ }
|
|
||||||
+ return fd;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#define DECL_OPEN(name, callback) \
|
|
||||||
+int name(const char *file, int oflag, ...) \
|
|
||||||
+{ \
|
|
||||||
+ va_list args; \
|
|
||||||
+ mode_t mode = 0; \
|
|
||||||
+ int fd; \
|
|
||||||
+ if (!initialized) \
|
|
||||||
+ initialize(); \
|
|
||||||
+ if (oflag & O_CREAT) { \
|
|
||||||
+ va_start(args, oflag); \
|
|
||||||
+ mode = va_arg(args, mode_t); \
|
|
||||||
+ va_end(args); \
|
|
||||||
+ } \
|
|
||||||
+ if (is_dsp_device(file)) \
|
|
||||||
+ fd = dsp_open_helper(file, oflag); \
|
|
||||||
+ else if (is_mixer_device(file)) \
|
|
||||||
+ fd = mixer_open_helper(file, oflag); \
|
|
||||||
+ else { \
|
|
||||||
+ fd = callback(file, oflag, mode); \
|
|
||||||
+ if (fd >= 0) \
|
|
||||||
+ assert(fds[fd] == NULL); \
|
|
||||||
+ } \
|
|
||||||
+ return fd; \
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+DECL_OPEN(open, _open)
|
|
||||||
+DECL_OPEN(open64, _open64)
|
|
||||||
|
|
||||||
int close(int fd)
|
|
||||||
{
|
|
||||||
@@ -730,7 +748,7 @@ FILE *fopen64(const char* path, const ch
|
|
||||||
initialize();
|
|
||||||
|
|
||||||
if (!is_dsp_device(path))
|
|
||||||
- return _fopen(path, mode);
|
|
||||||
+ return _fopen64(path, mode);
|
|
||||||
|
|
||||||
return fake_fopen(path, mode, O_LARGEFILE);
|
|
||||||
}
|
|
||||||
@@ -765,19 +783,6 @@ int dup2(int fd, int fd2)
|
|
||||||
return fcntl(fd, F_DUPFD, fd2);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
-
|
|
||||||
-int open64(const char *file, int oflag, ...)
|
|
||||||
-{
|
|
||||||
- va_list args;
|
|
||||||
- mode_t mode = 0;
|
|
||||||
-
|
|
||||||
- if (oflag & O_CREAT) {
|
|
||||||
- va_start(args, oflag);
|
|
||||||
- mode = va_arg(args, mode_t);
|
|
||||||
- va_end(args);
|
|
||||||
- }
|
|
||||||
- return open(file, oflag | O_LARGEFILE, mode);
|
|
||||||
-}
|
|
||||||
|
|
||||||
# define strong_alias(name, aliasname) \
|
|
||||||
extern __typeof (name) aliasname __attribute__ ((alias (#name)));
|
|
||||||
@@ -809,6 +814,7 @@ static void initialize()
|
|
||||||
if (!fds)
|
|
||||||
exit(1);
|
|
||||||
_open = dlsym(RTLD_NEXT, "open");
|
|
||||||
+ _open64 = dlsym(RTLD_NEXT, "open64");
|
|
||||||
_close = dlsym(RTLD_NEXT, "close");
|
|
||||||
_write = dlsym(RTLD_NEXT, "write");
|
|
||||||
_read = dlsym(RTLD_NEXT, "read");
|
|
||||||
@@ -819,5 +825,6 @@ static void initialize()
|
|
||||||
_select = dlsym(RTLD_NEXT, "select");
|
|
||||||
_poll = dlsym(RTLD_NEXT, "poll");
|
|
||||||
_fopen = dlsym(RTLD_NEXT, "fopen");
|
|
||||||
+ _fopen64 = dlsym(RTLD_NEXT, "fopen64");
|
|
||||||
initialized = 1;
|
|
||||||
}
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:306bd7c4436c1c56a0a499317e23b5b58aea3718df17c138ab0df56fd9bf3e0c
|
|
||||||
size 981123
|
|
@ -1,24 +0,0 @@
|
|||||||
diff -r fe0e2571e09c amixer/amixer.c
|
|
||||||
--- a/amixer/amixer.c Mon Jan 15 14:47:34 2007 +0100
|
|
||||||
+++ b/amixer/amixer.c Thu Apr 05 17:21:33 2007 +0200
|
|
||||||
@@ -534,6 +534,7 @@ static int show_control(const char *spac
|
|
||||||
snd_ctl_elem_id_t *id;
|
|
||||||
snd_ctl_elem_info_t *info;
|
|
||||||
snd_ctl_elem_value_t *control;
|
|
||||||
+ snd_aes_iec958_t iec958;
|
|
||||||
snd_ctl_elem_id_alloca(&id);
|
|
||||||
snd_ctl_elem_info_alloca(&info);
|
|
||||||
snd_ctl_elem_value_alloca(&control);
|
|
||||||
@@ -604,6 +605,12 @@ static int show_control(const char *spac
|
|
||||||
break;
|
|
||||||
case SND_CTL_ELEM_TYPE_BYTES:
|
|
||||||
printf("0x%02x", snd_ctl_elem_value_get_byte(control, idx));
|
|
||||||
+ break;
|
|
||||||
+ case SND_CTL_ELEM_TYPE_IEC958:
|
|
||||||
+ snd_ctl_elem_value_get_iec958(control, &iec958);
|
|
||||||
+ printf("[AES0=0x%02x AES1=0x%02x AES2=0x%02x AES3=0x%02x]",
|
|
||||||
+ iec958.status[0], iec958.status[1],
|
|
||||||
+ iec958.status[2], iec958.status[3]);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
printf("?");
|
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 16 14:13:26 CEST 2007 - tiwai@suse.de
|
||||||
|
|
||||||
|
- split library files to libasound2 sub package
|
||||||
|
- split alsa-utils and alsa-oss to own sub packages
|
||||||
|
- remove static library and unneeded files
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 10 18:54:59 CEST 2007 - tiwai@suse.de
|
Tue Apr 10 18:54:59 CEST 2007 - tiwai@suse.de
|
||||||
|
|
||||||
|
266
alsa.spec
266
alsa.spec
@ -11,22 +11,18 @@
|
|||||||
# norootforbuild
|
# norootforbuild
|
||||||
|
|
||||||
Name: alsa
|
Name: alsa
|
||||||
BuildRequires: doxygen ncurses-devel
|
BuildRequires: doxygen
|
||||||
%define package_version 1.0.14rc3
|
%define package_version 1.0.14rc3
|
||||||
License: GNU General Public License (GPL)
|
License: GNU General Public License (GPL)
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Provides: alsa-lib alsa-utils alsa-conf
|
Requires: libasound2 alsa-utils
|
||||||
Requires: dialog pciutils
|
Recommends: alsa-plugins alsa-oss
|
||||||
PreReq: %insserv_prereq %fillup_prereq
|
PreReq: %insserv_prereq %fillup_prereq
|
||||||
Autoreqprov: on
|
Autoreqprov: on
|
||||||
Summary: Advanced Linux Sound Architecture
|
Summary: Advanced Linux Sound Architecture
|
||||||
Version: 1.0.13
|
Version: 1.0.13
|
||||||
Release: 39
|
Release: 40
|
||||||
Source1: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
|
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
|
||||||
# Source2: ftp://ftp.alsa-project.org/pub/util/alsa-utils-%{package_version}.tar.bz2
|
|
||||||
Source2: ftp://ftp.alsa-project.org/pub/util/alsa-utils-1.0.14rc2.tar.bz2
|
|
||||||
# Source5: ftp://ftp.alsa-project.org/pub/oss/alsa-oss-%{package_version}.tar.bz2
|
|
||||||
Source5: ftp://ftp.alsa-project.org/pub/oss/alsa-oss-1.0.12.tar.bz2
|
|
||||||
Source6: udev-soundfont
|
Source6: udev-soundfont
|
||||||
Source7: load-soundfont
|
Source7: load-soundfont
|
||||||
Source8: 40-alsa.rules
|
Source8: 40-alsa.rules
|
||||||
@ -42,31 +38,28 @@ Source30: all_notes_off
|
|||||||
Source31: all_notes_off.bin
|
Source31: all_notes_off.bin
|
||||||
Source32: all_notes_off.mid
|
Source32: all_notes_off.mid
|
||||||
Patch1: alsa-lib-hg-fixes.diff
|
Patch1: alsa-lib-hg-fixes.diff
|
||||||
Patch2: alsa-utils-hg-fixes.diff
|
|
||||||
Patch3: alsa-oss-hg-fixes.diff
|
|
||||||
Recommends: alsa-plugins
|
|
||||||
URL: http://www.alsa-project.org/
|
URL: http://www.alsa-project.org/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
ALSA stands for Advanced Linux Sound Architecture. It supports many
|
ALSA stands for Advanced Linux Sound Architecture. It supports many
|
||||||
PCI and ISA PnP sound cards.
|
PCI, ISA PnP and USB sound cards.
|
||||||
|
|
||||||
This package contains the standard ALSA library, utilities, and init
|
This package contains the ALSA init scripts to start the sound system
|
||||||
scripts to start the sound system on your Linux box. To set it up, run
|
on your Linux box. To set it up, run yast2 or alsaconf.
|
||||||
yast2 or alsaconf. They detect ALSA-supported PCI and ISA PnP cards.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
--------
|
--------
|
||||||
Jaroslav Kysela <perex@suse.de>
|
Jaroslav Kysela <perex@suse.de>
|
||||||
|
Takashi Iwai <tiwai@suse.de>
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Include Files and Libraries mandatory for Development.
|
Summary: Include Files and Libraries mandatory for Development.
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
|
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
|
||||||
Requires: glibc-devel %{name}
|
Requires: glibc-devel, libasound2 = %{name}
|
||||||
Obsoletes: alsadev
|
Obsoletes: alsadev
|
||||||
Provides: alsadev alsa-lib-devel
|
Provides: alsadev alsa-lib-devel
|
||||||
|
|
||||||
@ -78,7 +71,10 @@ to develop applications that require these.
|
|||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
--------
|
--------
|
||||||
Jaroslav Kysela <perex@suse.cz>
|
Jaroslav Kysela <perex@suse.de>
|
||||||
|
Takashi Iwai <tiwai@suse.de>
|
||||||
|
Abramo Bagnara <abramo@alsa-project.org>
|
||||||
|
Frank van de Pol <fvdpol@coil.demon.nl>
|
||||||
|
|
||||||
%package docs
|
%package docs
|
||||||
Summary: Additional Package Documentation.
|
Summary: Additional Package Documentation.
|
||||||
@ -93,58 +89,41 @@ this package's base documentation.
|
|||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
--------
|
--------
|
||||||
Jaroslav Kysela <perex@suse.cz>
|
Jaroslav Kysela <perex@suse.de>
|
||||||
|
Takashi Iwai <tiwai@suse.de>
|
||||||
|
Abramo Bagnara <abramo@alsa-project.org>
|
||||||
|
Frank van de Pol <fvdpol@coil.demon.nl>
|
||||||
|
|
||||||
|
%package -n libasound2
|
||||||
|
Summary: Advanced Linux Sound Architecture Library
|
||||||
|
Group: System/Libraries
|
||||||
|
Provides: alsa-lib
|
||||||
|
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
|
||||||
|
|
||||||
|
%description -n libasound2
|
||||||
|
This package contains the library for ALSA, Advanced Linux Sound
|
||||||
|
Architecture.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Jaroslav Kysela <perex@suse.de>
|
||||||
|
Takashi Iwai <tiwai@suse.de>
|
||||||
|
Abramo Bagnara <abramo@alsa-project.org>
|
||||||
|
Frank van de Pol <fvdpol@coil.demon.nl>
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -c -n alsa -T -a 1 -a 2 -a 5
|
%setup -n alsa-lib-%{package_version}
|
||||||
cd alsa-lib*/.
|
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
cd ..
|
%{?suse_update_config:%{suse_update_config -f .}}
|
||||||
cd alsa-utils*/.
|
|
||||||
%patch2 -p1
|
|
||||||
cd ..
|
|
||||||
cd alsa-oss*/.
|
|
||||||
%patch3 -p1
|
|
||||||
cd ..
|
|
||||||
%{?suse_update_config:%{suse_update_config -f alsa-lib*/. alsa-utils*/. alsa-oss*/.}}
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
ALSA_ROOT=`pwd`
|
|
||||||
ALSA_ROOT_INC=$ALSA_ROOT/alsa-lib-%{package_version}/include
|
|
||||||
ALSA_ROOT_LIB=$ALSA_ROOT/alsa-lib-%{package_version}/src/.libs
|
|
||||||
ALSA_ROOT_ACLOCAL=$ALSA_ROOT/alsa-lib-%{package_version}/utils
|
|
||||||
#
|
|
||||||
# build alsa-lib
|
# build alsa-lib
|
||||||
#
|
|
||||||
cd alsa-lib*/.
|
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
#
|
|
||||||
# needed an extra option for MIPS
|
|
||||||
#
|
|
||||||
%ifarch mips
|
%ifarch mips
|
||||||
ARCH_CFLAGS="-mips2"
|
ARCH_CFLAGS="-mips2"
|
||||||
%endif
|
%endif
|
||||||
#
|
|
||||||
# now, build the static library at first.
|
|
||||||
# due to gratuitous use of #ifdef PIC, we cannot build shared and static
|
|
||||||
# libraries at the same time...
|
|
||||||
#
|
|
||||||
CFLAGS="$RPM_OPT_FLAGS $ARCH_CFLAGS" \
|
|
||||||
./configure \
|
|
||||||
--libdir=%{_libdir} \
|
|
||||||
--mandir=%{_mandir} \
|
|
||||||
--datadir=%{_datadir} \
|
|
||||||
--disable-shared \
|
|
||||||
--enable-static \
|
|
||||||
--disable-aload \
|
|
||||||
--disable-alisp
|
|
||||||
make %{?jobs:-j %jobs}
|
|
||||||
# install it to save
|
|
||||||
make DESTDIR=$ALSA_ROOT install
|
|
||||||
#
|
|
||||||
# ok, then clean up and rebuild the shared library
|
|
||||||
#
|
|
||||||
make clean
|
|
||||||
CFLAGS="$RPM_OPT_FLAGS $ARCH_CFLAGS" \
|
CFLAGS="$RPM_OPT_FLAGS $ARCH_CFLAGS" \
|
||||||
./configure \
|
./configure \
|
||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
@ -152,127 +131,50 @@ CFLAGS="$RPM_OPT_FLAGS $ARCH_CFLAGS" \
|
|||||||
--datadir=%{_datadir} \
|
--datadir=%{_datadir} \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
|
--enable-symbolic-functoins \
|
||||||
--disable-aload \
|
--disable-aload \
|
||||||
--disable-alisp
|
--disable-alisp
|
||||||
make %{?jobs:-j %jobs}
|
make %{?jobs:-j %jobs}
|
||||||
#
|
|
||||||
# run doxygen
|
# run doxygen
|
||||||
#
|
|
||||||
make -C doc doc
|
make -C doc doc
|
||||||
cd ..
|
|
||||||
#
|
|
||||||
# build alsa-utils
|
|
||||||
#
|
|
||||||
cd alsa-utils*/.
|
|
||||||
ACLOCAL="aclocal -I $ALSA_ROOT_ACLOCAL" autoreconf -fi
|
|
||||||
CFLAGS="$RPM_OPT_FLAGS" ./configure \
|
|
||||||
--prefix=%{_prefix} \
|
|
||||||
--with-alsa-prefix=$ALSA_ROOT_LIB \
|
|
||||||
--with-alsa-inc-prefix=$ALSA_ROOT_INC \
|
|
||||||
--libdir=%{_libdir} \
|
|
||||||
--mandir=%{_mandir} \
|
|
||||||
--datadir=%{_datadir} \
|
|
||||||
--with-curses=ncursesw
|
|
||||||
make %{?jobs:-j %jobs}
|
|
||||||
cd ..
|
|
||||||
#
|
|
||||||
# build alsa-oss
|
|
||||||
#
|
|
||||||
cd alsa-oss*/.
|
|
||||||
ACLOCAL="aclocal -I $ALSA_ROOT_ACLOCAL" autoreconf -fi
|
|
||||||
export LD_LIBRARY_PATH=$ALSA_ROOT_LIB
|
|
||||||
CFLAGS="$RPM_OPT_FLAGS" ./configure \
|
|
||||||
--prefix=%{_prefix} \
|
|
||||||
--with-alsa-inc-prefix=$ALSA_ROOT_INC \
|
|
||||||
--disable-alsatest \
|
|
||||||
--libdir=%{_libdir} \
|
|
||||||
--mandir=%{_mandir} \
|
|
||||||
--datadir=%{_datadir}
|
|
||||||
make %{?jobs:-j %jobs}
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
ALSA_ROOT=`pwd`
|
# install shared library
|
||||||
ALSA_ROOT_LIB=$ALSA_ROOT/alsa-lib-%{package_version}/src/.libs
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
export LD_LIBRARY_PATH=$ALSA_ROOT_LIB
|
# clean up unneeded files
|
||||||
# Create directories:
|
rm -f $RPM_BUILD_ROOT%{_libdir}/*.*a
|
||||||
# (/usr/lib for fixed all_notes_off data, %_libdir for libs)
|
rm -f $RPM_BUILD_ROOT%{_libdir}/alsa-lib/smixer/*.*a
|
||||||
for I in %{_bindir} \
|
rm -f $RPM_BUILD_ROOT%{_bindir}/aserver
|
||||||
%{_libdir} \
|
|
||||||
/usr/lib \
|
|
||||||
%{_sbindir} \
|
|
||||||
/etc/init.d \
|
|
||||||
%{_datadir}/sounds/alsa \
|
|
||||||
/etc/udev/rules.d \
|
|
||||||
/etc/alsa.d \
|
|
||||||
%{_datadir}/alsa \
|
|
||||||
%{_docdir}/%{name}
|
|
||||||
do
|
|
||||||
install -m 755 -d $RPM_BUILD_ROOT$I
|
|
||||||
done
|
|
||||||
make -C alsa-lib*/. DESTDIR=$RPM_BUILD_ROOT install
|
|
||||||
find $ALSA_ROOT%{_libdir} -name "*.a" -printf "%{_libdir}/%%P\n" |
|
|
||||||
while read L; do cp $ALSA_ROOT$L $RPM_BUILD_ROOT$L; done
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/alsa-lib/smixer/*.a
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/alsa-lib/smixer/*.la
|
|
||||||
make -C alsa-utils*/. DESTDIR=$RPM_BUILD_ROOT install
|
|
||||||
make -C alsa-oss*/. DESTDIR=$RPM_BUILD_ROOT install
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libaoss.a
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libaoss.la
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libalsatoss.a
|
|
||||||
rm -f $RPM_BUILD_ROOT%{_libdir}/libalsatoss.la
|
|
||||||
#
|
|
||||||
# install alsa-lib documents
|
|
||||||
#
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-lib
|
|
||||||
cd alsa-lib*/.
|
|
||||||
cp COPYING ChangeLog INSTALL TODO MEMORY-LEAK $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-lib
|
|
||||||
cp doc/asoundrc.txt $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-lib
|
|
||||||
cd ..
|
|
||||||
#
|
|
||||||
# install alsa-utils documents
|
|
||||||
#
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-utils
|
|
||||||
cd alsa-utils*/.
|
|
||||||
cp COPYING ChangeLog INSTALL README TODO $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-utils
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-utils/alsamixer
|
|
||||||
cp alsamixer/README $RPM_BUILD_ROOT/%{_docdir}/%{name}/alsa-utils/alsamixer
|
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-utils/aconnect
|
|
||||||
cp seq/aconnect/README* $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-utils/aconnect
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_docdir}/%{name}/alsa-utils/aseqnet
|
|
||||||
cp seq/aseqnet/README* $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-utils/aseqnet
|
|
||||||
cd ..
|
|
||||||
#
|
|
||||||
# install documents by suse
|
|
||||||
#
|
|
||||||
cp %{SOURCE20} $RPM_BUILD_ROOT%{_docdir}/%{name}
|
|
||||||
cp %{SOURCE21} $RPM_BUILD_ROOT%{_docdir}/%{name}
|
|
||||||
#
|
|
||||||
# install set_default_volume script
|
|
||||||
#
|
#
|
||||||
|
# install helper scripts
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||||
install -c -m 0755 %{SOURCE16} $RPM_BUILD_ROOT%{_bindir}
|
install -c -m 0755 %{SOURCE16} $RPM_BUILD_ROOT%{_bindir}
|
||||||
#
|
|
||||||
# install test wave file
|
# install test wave file
|
||||||
#
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/sounds/alsa
|
||||||
install -c -m 0644 %{SOURCE17} $RPM_BUILD_ROOT%{_datadir}/sounds/alsa/test.wav
|
install -c -m 0644 %{SOURCE17} $RPM_BUILD_ROOT%{_datadir}/sounds/alsa/test.wav
|
||||||
#
|
|
||||||
# install all_notes_off stuff
|
# install all_notes_off stuff
|
||||||
#
|
|
||||||
install -c -m 0755 %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}
|
install -c -m 0755 %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/usr/lib
|
||||||
install -c -m 0644 %{SOURCE31} $RPM_BUILD_ROOT/usr/lib
|
install -c -m 0644 %{SOURCE31} $RPM_BUILD_ROOT/usr/lib
|
||||||
install -c -m 0644 %{SOURCE32} $RPM_BUILD_ROOT/usr/lib
|
install -c -m 0644 %{SOURCE32} $RPM_BUILD_ROOT/usr/lib
|
||||||
#
|
#
|
||||||
# install alsasound and joystick scripts
|
# install init scripts
|
||||||
#
|
#
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||||
install -c -m 0755 %{SOURCE11} $RPM_BUILD_ROOT/etc/init.d
|
install -c -m 0755 %{SOURCE11} $RPM_BUILD_ROOT/etc/init.d
|
||||||
install -c -m 0755 %{SOURCE13} $RPM_BUILD_ROOT/etc/init.d
|
install -c -m 0755 %{SOURCE13} $RPM_BUILD_ROOT/etc/init.d
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
||||||
rm -f $RPM_BUILD_ROOT%{_sbindir}/rcalsasound
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/rcalsasound
|
||||||
ln -s ../../etc/init.d/alsasound $RPM_BUILD_ROOT%{_sbindir}/rcalsasound
|
ln -s ../../etc/init.d/alsasound $RPM_BUILD_ROOT%{_sbindir}/rcalsasound
|
||||||
rm -f $RPM_BUILD_ROOT%{_sbindir}/rcjoystick
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/rcjoystick
|
||||||
ln -s ../../etc/init.d/joystick $RPM_BUILD_ROOT%{_sbindir}/rcjoystick
|
ln -s ../../etc/init.d/joystick $RPM_BUILD_ROOT%{_sbindir}/rcjoystick
|
||||||
|
#
|
||||||
# udev rules
|
# udev rules
|
||||||
|
#
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/udev/rules.d
|
||||||
install -c -m 0644 %{SOURCE8} $RPM_BUILD_ROOT/etc/udev/rules.d
|
install -c -m 0644 %{SOURCE8} $RPM_BUILD_ROOT/etc/udev/rules.d
|
||||||
# install helper scripts
|
# install udev-helper scripts
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/alsa.d
|
||||||
install -c -m 0744 %{SOURCE6} $RPM_BUILD_ROOT/etc/alsa.d
|
install -c -m 0744 %{SOURCE6} $RPM_BUILD_ROOT/etc/alsa.d
|
||||||
install -c -m 0744 %{SOURCE7} $RPM_BUILD_ROOT/etc/alsa.d
|
install -c -m 0744 %{SOURCE7} $RPM_BUILD_ROOT/etc/alsa.d
|
||||||
#
|
#
|
||||||
@ -284,10 +186,16 @@ mkdir -p -m 755 $RPM_BUILD_ROOT/etc/sysconfig
|
|||||||
for i in sound joystick; do
|
for i in sound joystick; do
|
||||||
install -m 644 $RPM_SOURCE_DIR/sysconfig.$i $RPM_BUILD_ROOT/var/adm/fillup-templates
|
install -m 644 $RPM_SOURCE_DIR/sysconfig.$i $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||||
done
|
done
|
||||||
|
#
|
||||||
|
# documents
|
||||||
|
#
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
||||||
|
cp $RPM_SOURCE_DIR/README* $RPM_BUILD_ROOT%{_docdir}/%{name}
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-lib
|
||||||
|
cp COPYING ChangeLog INSTALL TODO MEMORY-LEAK $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-lib
|
||||||
|
cp doc/asoundrc.txt $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-lib
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%run_ldconfig
|
|
||||||
%ifnarch sparc sparc64
|
|
||||||
%{rename_sysconfig_variable START_ALSA_SEQ LOAD_SEQUENCER}
|
%{rename_sysconfig_variable START_ALSA_SEQ LOAD_SEQUENCER}
|
||||||
# fixed obsolete (wrong) variable.
|
# fixed obsolete (wrong) variable.
|
||||||
if [ -f /etc/sysconfig/sound ]; then
|
if [ -f /etc/sysconfig/sound ]; then
|
||||||
@ -310,66 +218,60 @@ else
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
%endif
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%ifnarch sparc sparc64
|
|
||||||
%stop_on_removal alsasound joystick
|
%stop_on_removal alsasound joystick
|
||||||
%endif
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%run_ldconfig
|
|
||||||
%ifnarch sparc sparc64
|
|
||||||
%restart_on_update alsasound joystick
|
%restart_on_update alsasound joystick
|
||||||
%insserv_cleanup
|
|
||||||
%endif
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
%post -n libasound2
|
||||||
|
%run_ldconfig
|
||||||
|
|
||||||
|
%postun -n libasound2
|
||||||
|
%run_ldconfig
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%doc %{_docdir}/%{name}
|
%doc %{_docdir}/%{name}
|
||||||
%{_libdir}/libasound.so.*
|
|
||||||
# .so must be in the main package because aoss requires it
|
|
||||||
%{_libdir}/libaoss.so*
|
|
||||||
# .so must be in the main package because oss-redir requires it
|
|
||||||
%{_libdir}/libalsatoss.so*
|
|
||||||
%{_libdir}/alsa-lib
|
|
||||||
%ifnarch sparc sparc64
|
|
||||||
%{_datadir}/sounds/alsa
|
|
||||||
/etc/init.d/*
|
/etc/init.d/*
|
||||||
%{_sbindir}/*
|
%{_sbindir}/*
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
/usr/lib/all_notes_off.*
|
/usr/lib/all_notes_off.*
|
||||||
%{_datadir}/alsa
|
%{_datadir}/sounds/alsa
|
||||||
%{_datadir}/locale/*/*/*
|
|
||||||
/var/adm/fillup-templates/*
|
/var/adm/fillup-templates/*
|
||||||
/etc/udev
|
/etc/udev
|
||||||
/etc/alsa.d
|
/etc/alsa.d
|
||||||
%doc %{_mandir}/man*/*
|
|
||||||
%doc %{_mandir}/fr
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%{_libdir}/libasound.so
|
%{_libdir}/libasound.so
|
||||||
%{_libdir}/libasound.*a
|
|
||||||
%{_libdir}/libossredir.*a
|
|
||||||
%{_includedir}/sys/*
|
%{_includedir}/sys/*
|
||||||
%{_includedir}/alsa
|
%{_includedir}/alsa
|
||||||
%{_includedir}/oss-redir.h
|
|
||||||
%{_datadir}/aclocal/*.m4
|
%{_datadir}/aclocal/*.m4
|
||||||
%{_libdir}/pkgconfig/*.pc
|
%{_libdir}/pkgconfig/*.pc
|
||||||
|
|
||||||
%files docs
|
%files docs
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%doc alsa-lib*/doc/doxygen/html/*
|
%doc doc/doxygen/html/*
|
||||||
|
|
||||||
|
%files -n libasound2
|
||||||
|
%defattr(-, root, root)
|
||||||
|
%{_libdir}/libasound.so.*
|
||||||
|
%{_libdir}/alsa-lib
|
||||||
|
%{_datadir}/alsa
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 16 2007 - tiwai@suse.de
|
||||||
|
- split library files to libasound2 sub package
|
||||||
|
- split alsa-utils and alsa-oss to own sub packages
|
||||||
|
- remove static library and unneeded files
|
||||||
* Tue Apr 10 2007 - tiwai@suse.de
|
* Tue Apr 10 2007 - tiwai@suse.de
|
||||||
- update alsa-lib & utils 20070410 snapshot
|
- update alsa-lib & utils 20070410 snapshot
|
||||||
* add missing smixer.conf file
|
* add missing smixer.conf file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user