ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Andrey Astafiev <andrei@tvcell.ru>
To: devel@altlinux.ru
Subject: Re: [devel] aureal drivers
Date: Mon, 28 Jan 2002 15:26:09 +0300
Message-ID: <20020128122609.GI2485@ok-computer.tvcell.ru> (raw)
In-Reply-To: <20020128100115.GG2485@ok-computer.tvcell.ru>

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

On Mon, Jan 28, 2002 at 01:01:15PM +0300, Andrey Astafiev wrote:
> сделал спек для драйверов aureal, думаю,
> стоит положить в unsupported.

что-то у меня сегодня аттачи не приаттачиваются :)

--
andrei at tvcell d0t ru

[-- Attachment #2: aureal.spec --]
[-- Type: text/plain, Size: 2891 bytes --]

# possible chip versions are auto, au8810, au8820, au8830.
%define CHIP auto

# collect informaition about current kernel
%define kunamever %(uname -r)
%define kver		%(echo "%kunamever"| awk -F'-' '{print $1}')
%define kbuild		%(echo "%kunamever"| awk -F'-' '{print $2}')
%define kncpu		%(echo "%kunamever"| awk -F'-' '{print $3}')
%define kpkgprfx	%(if echo "%kver"| grep '2.4.'>/dev/null; then echo "24"; else echo "22"; fi)

Name: aureal
Version: 1.1.3
Release: alt0.1cvs

Summary: Kernel module for Aureal soundcards support.
Summary(ru_RU.CP1251): Модуль ядра для поддержки звуковых карт Aureal.
License: GPL
Group: System/Kernel and hardware
Url: http://aureal.sourceforge.net

Source: %name.tar.bz2
Patch1: %name-makefile.patch
NoSource: 0

BuildPreReq: grep awk sh-utils gcc rpm >= 3.0.4
BuildPreReq: kernel%kpkgprfx-headers = %kver-%kbuild
BuildPreReq: kernel%kpkgprfx-%kncpu = %kver-%kbuild

Provides: %name = %version-%release

Requires: kernel%kpkgprfx-%kncpu = %kver-%kbuild
Requires: rpm >= 3.0.4 textutils modutils sh-utils fileutils sed awk

# Automatically added by buildreq on Sat Jan 26 2002
BuildRequires: glibc-core glibc-gconv-modules glibc-locales pciutils

%description
Kernel module for Aureal soundcards support.

%description -l ru_RU.CP1251
Модуль ядра для поддержки звуковых карт Aureal.

%prep
%setup -q -n %name
%patch1 -p1

%build
%if %CHIP == auto
%make_build
%endif
%if %CHIP == au8810
%make_build au8810
%endif
%if %CHIP == au8820
%make_build au8820
%endif
%if %CHIP == au8830
%make_build au8830
%endif

%install
if [ -z "$KERNEL_VERSION" ]; then
    export KERNEL_VERSION=`uname -r`
fi
if [ -d $RPM_ROOT/lib/modules/$KERNEL_VERSION/kernel ]; then
    INSTALLPATH=/lib/modules/$KERNEL_VERSION/kernel/drivers/sound
else
    INSTALLPATH=/lib/modules/$KERNEL_VERSION/sound
fi

%__mkdir -p $RPM_BUILD_ROOT/$INSTALLPATH
%__install -m 0444 au88* $RPM_BUILD_ROOT/$INSTALLPATH
echo `ls $RPM_BUILD_ROOT/$INSTALLPATH` > /tmp/%name-%version-module.tmp
echo "%attr(444 root root)" $INSTALLPATH/au88* > /tmp/%name-%version-files.lst

%post
module=`head -c 6 /tmp/%name-%version-module.tmp`
confmod="/etc/conf.modules"
[ -f /etc/modules.conf ] && confmod="/etc/modules.conf"
conftmp=/tmp/%name-%version-conf$$

/sbin/rmmod $module >/dev/null 2>&1
/sbin/modprobe soundcore
    
sed '/^alias.*sound.*$module/d' < $confmod > $conftmp
echo "alias sound $module" >> $conftmp
mv $conftmp $confmod
sed '/^alias.*midi.*$module/d' < $confmod > $conftmp
echo "alias midi $module" >> $conftmp
mv $conftmp $confmod

/sbin/depmod -a
/sbin/modprobe $module
exit 0

%preun
if [ $1 = 0 ] ; then
    if [ -n "`/sbin/lsmod | grep au88`" ]; then
	/sbin/rmmod `/sbin/lsmod | grep au88 | awk {'print $1'}`
    fi
fi

%files -f /tmp/%name-%version-files.lst
%doc README ChangeLog

%changelog
* Mon Jan 28 2002 Andrey Astafiev <andrei@tvcell.ru> 1.1.3-alt0.1cvs
- First version of RPM package

[-- Attachment #3: aureal-makefile.patch --]
[-- Type: text/plain, Size: 605 bytes --]

diff -ur aureal.orig/Makefile aureal/Makefile
--- aureal.orig/Makefile	Sat Dec  1 01:12:48 2001
+++ aureal/Makefile	Thu Jan 24 06:25:10 2002
@@ -19,15 +19,17 @@
 # Contact: http://aureal.sourceforge.net
 #
 
-ifneq ($(shell /sbin/lspci -d '12eb:3'),)
+LSPCI = `which lspci`
+
+ifneq ($(shell $(LSPCI) -d '12eb:3'),)
 NAME = au8810
 ASP_OBJ = asp10.o
 endif
-ifneq ($(shell /sbin/lspci -d '12eb:1'),)
+ifneq ($(shell $(LSPCI) -d '12eb:1'),)
 NAME = au8820
 ASP_OBJ = asp20.o
 endif
-ifneq ($(shell /sbin/lspci -d '12eb:2'),)
+ifneq ($(shell $(LSPCI) -d '12eb:2'),)
 NAME = au8830
 ASP_OBJ = asp30.o
 endif

      reply	other threads:[~2002-01-28 12:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-28 10:01 Andrey Astafiev
2002-01-28 12:26 ` Andrey Astafiev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020128122609.GI2485@ok-computer.tvcell.ru \
    --to=andrei@tvcell.ru \
    --cc=devel@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git