wok view alsa-utils/receipt @ rev 25130

e4rat: modified recipe
author Hans-G?nter Theisgen
date Wed Jun 29 07:04:49 2022 +0100 (2022-06-29)
parents 68cf96abc146
children
line source
1 # SliTaz package receipt.
3 PACKAGE="alsa-utils"
4 VERSION="1.2.7"
5 CATEGORY="multimedia"
6 SHORT_DESC="Alsa sound system utilities and configuration tools."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.alsa-project.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.bz2"
12 WGET_URL="ftp://ftp.alsa-project.org/pub/utils/$TARBALL"
14 SUGGESTED="bash"
15 DEPENDS="alsa-lib ncurses util-linux-getopt"
16 BUILD_DEPENDS="alsa-lib-dev ncurses-dev"
18 CONFIG_FILES="/var/lib/alsa/asound.state"
20 HOST_ARCH="i486 arm"
22 current_version()
23 {
24 wget -O - ${WEB_SITE}wiki/Download 2>/dev/null | \
25 sed '/alsa-utils-/!d;s|.*alsa-utils-||;s|.tar.*||;q'
26 }
28 # Rules to configure and make the package.
29 compile_rules()
30 {
31 ./configure \
32 --disable-xmlto \
33 $CONFIGURE_ARGS &&
34 make &&
35 make install DESTDIR=$DESTDIR
36 }
38 # Rules to gen a SliTaz package suitable for Tazpkg.
39 genpkg_rules()
40 {
41 mkdir -p $fs/usr/share/alsa
42 mkdir -p $fs/var/lib/alsa
43 mkdir -p $fs/etc
45 #touch $fs/etc/asound.state
46 cp -a $install/usr/bin $fs/usr
47 cp -a $install/usr/sbin $fs/usr
48 cp -a $install/usr/share/alsa/init $fs/usr/share/alsa
50 # Declare asound.state
51 touch $fs/var/lib/alsa/asound.state
52 chmod 755 $fs/usr/sbin/*
54 # Remove speaker-test (18 Ko and needs sounds)
55 rm $fs/usr/bin/speaker-test
57 # For conf we need /var/tmp
58 mkdir -p $fs/var/tmp
59 chmod 1777 $fs/var/tmp
61 # Remove alsaconf (use soundconf).
62 rm $fs/usr/sbin/alsaconf
63 }
65 # Main alsa configuration (card name, volumes, etc) have moved upstream. So backup
66 # current one and reenable it after package install so user still have ther
67 # sound card and settings working.
68 pre_install()
69 {
70 if [ -f "$1/etc/asound.state" ]
71 then
72 mv "$1/etc/asound.state" "$1/tmp"
73 fi
74 }
76 post_install()
77 {
78 if [ -f "$1/tmp/asound.state" ]
79 then
80 mv "$1/tmp/asound.state" "$1/var/lib/alsa"
81 fi
82 }