summaryrefslogtreecommitdiffstats
path: root/alsa-utils/Pkgfile
blob: 9ed1f32d17700d4ee3c119fab5b735523823a287 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Description: Utilitaires pour ALSA
# URL: http://www.alsa-project.org
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: alsa-lib, dialog, xmlto
# Run on: alsa-lib,dialog,xmlto

name=alsa-utils
version=1.0.25
release=1
source=(ftp://ftp.alsa-project.org/pub/utils/$name-$version.tar.bz2
	alsa.rules
	alsaunmute
	alsaunmute.1
	alsa-info.sh
	alsactl.conf)

build() {
	source /etc/blfs-bootscripts
        wget http://www.linuxfromscratch.org/blfs/downloads/svn/$scripts-$scriptsversion.tar.bz2
	tar xvf $scripts-$scriptsversion.tar.bz2

	cd $name-$version
	CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ./configure --disable-alsaconf \
		--with-udev-rules-dir=/lib/udev/rules.d
	make
	make DESTDIR=$PKG install

	mkdir -p $PKG/lib/udev/rules.d
	install -p -m 644 ../alsa.rules $PKG/lib/udev/rules.d/90-alsa-restore.rules

	install -p -m 755 ../alsaunmute $PKG/usr/bin
	install -p -m 644 ../alsaunmute.1 $PKG/usr/share/man/man1/alsaunmute.1

	# Move /usr/share/alsa/init to /usr/lib/alsa/init
	mkdir -p -m 755 $PKG/usr/lib/alsa
	mv $PKG/usr/share/alsa/init $PKG/usr/lib/alsa

	# Link /usr/lib/alsa/init to /usr/share/alsa/init back
	ln -s ../../lib/alsa/init $PKG/usr/share/alsa/init

	# Create a place for global configuration
	mkdir -p -m 755 $PKG/etc/alsa
	install -p -m 644 ../alsactl.conf $PKG/etc/alsa

	install -p -m 755 ../alsa-info.sh $PKG/usr/bin/alsa-info
	ln -s alsa-info $PKG/usr/bin/alsa-info.sh

	cd ../$scripts-$scriptsversion
	make DESTDIR=$PKG install-alsa
}