summaryrefslogtreecommitdiff
path: root/extra/alsa-tools/PKGBUILD
blob: 9c19f436c8a0a76bcda3f214a36425c8cf89a48e (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: Limao Luo <luolimao+AUR@gmail.com>
# Contributor: Sebastien Luttringer <seblu+arch@seblu.net>
# Contributor: Jochen Immendœrfer <jochen.immendoerfer@gmail.com>

pkgname=alsa-tools
pkgver=1.0.27
pkgrel=5
pkgdesc="Advanced tools for certain sound cards"
arch=('i686' 'x86_64' 'mips64el')
url="http://alsa-project.org/"
license=('GPL')
depends=('gcc-libs' 'alsa-lib')
makedepends=('fltk' 'gtk2' 'gtk3')
optdepends=('fltk: hdspconf, hdspmixer'
            'gtk2: other GUI tools'
            'gtk3: hdajackretask'
            'bash: couple of tools')
provides=("$pkgname-emu10k1" "$pkgname-ice1712")
options=('!libtool')
source=("ftp://ftp.alsa-project.org/pub/tools/$pkgname-$pkgver.tar.bz2"
        "alsa-tools-1.0.27-mips.patch")
md5sums=('1ea381d00a6069a98613aa7effa4cb51'
         'b34bbbe42216354c4cafae6cd504bdc5')

_tools=("as10k1" "echomixer" "envy24control" "hdajackretask" "hda-verb"
        "hdspconf" "hdsploader" "hdspmixer" "ld10k1" "mixartloader"
        "pcxhrloader" "rmedigicontrol" "sb16_csp" "sbiload" "sscape_ctl"
        "us428control" "usx2yloader" "vxloader")

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  patch -Np1 -i ${srcdir}/alsa-tools-1.0.27-mips.patch
  # qlo10k1 cannot be built; it depends on ld10k1
  sed -i 's:ld10k1 qlo10k1 \\:ld10k1 \\:' Makefile

  # hwmixvolume requires pyalsa, not currently in repos
  sed -i 's:hwmixvolume hdajackretask :hdajackretask :' Makefile
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # not using upstream's global makefile as it's too clever
  for i in ${_tools[@]}; do
    if [ $i != sbiload ]; then
      (
      cd $i
      ./configure --prefix=/usr --sbindir=/usr/bin
      make
      )
    else
      (
      cd seq/sbiload
      ./configure --prefix=/usr --sbindir=/usr/bin
      make
      )
    fi
  done
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  for i in ${_tools[@]}; do
    if [ $i != sbiload ]; then
      (
      cd $i
      make DESTDIR="$pkgdir" install
      )
    else
      (
      cd seq/sbiload
      make DESTDIR="$pkgdir" install
      )
    fi
  done
}

# vim:set ts=2 sw=2 et: