summaryrefslogtreecommitdiff
path: root/community/zita-alsa-pcmi/PKGBUILD
blob: 187be8e119f8c0a86da55b011b416b5b07ecf160 (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
# $Id: PKGBUILD 95509 2013-08-13 03:43:50Z speps $
# Maintainer: speps <speps at aur dot archlinux dot org>

pkgname=zita-alsa-pcmi
pkgver=0.2.0
pkgrel=1
pkgdesc="The successor of clalsadrv, provides easy access to ALSA PCM devices."
arch=(i686 x86_64)
url="http://kokkinizita.linuxaudio.org/linuxaudio/"
license=('GPL3')
depends=('gcc-libs' 'alsa-lib')
source=("${url}downloads/$pkgname-$pkgver.tar.bz2")
md5sums=('0ba4d59abce231056e2628d081124114')

prepare() {
  cd "$srcdir/$pkgname-$pkgver/libs"
  # call ldconfig locally
  sed -i 's/ldconfig/& -N $(DESTDIR)$(PREFIX)\/$(LIBDIR)/' Makefile
}

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

  # libs
  make PREFIX=/usr

  # create lib link for building apps
  ln -s lib$pkgname.so.$pkgver lib$pkgname.so

  # apps
  cd ../apps
  CXXFLAGS+=" -I../libs" \
  LDFLAGS+=" -L../libs" \
  make PREFIX=/usr
}

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

  # libs
  make -C libs DESTDIR="$pkgdir/" PREFIX=/usr LIBDIR=lib install

  # apps
  make -C apps DESTDIR="$pkgdir/" PREFIX=/usr LIBDIR=lib install
}

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