updated on Fri Jan 20 20:16:25 UTC 2012
[aur-mirror.git] / sndlib / PKGBUILD
blob64ce991381368bfbcda06eab97a9018f6cdbe726
1 # Maintainer: SpepS <dreamspepser at yahoo dot it>
3 pkgname=sndlib
4 pkgver=2011.08.17
5 pkgrel=1
6 pkgdesc="The Snd/CLM sound library"
7 arch=('i686' 'x86_64')
8 url="http://ccrma-ftp.stanford.edu/"
9 license=('GPL')
10 depends=('alsa-lib' 'jack' 'portaudio' 'esound' 'gsl')
11 source=("ftp://ccrma-ftp.stanford.edu/pub/Lisp/$pkgname.tar.gz")
12 md5sums=(`wget -qO- $source | md5sum | cut -c -32`)
14 build() {
15   cd "$srcdir/$pkgname"
17   # x86_64 fPIC
18   export CFLAGS="$CFLAGS -fPIC"
20   # add missing LDFLAGS
21   export LDFLAGS="$LDFLAGS `pkg-config --libs alsa jack esound portaudio-2.0`"
23   # use gcc -shared instead of ld
24   sed -i "s|@SO_LD@|gcc -shared|" makefile.in
26   # replace repeated -lm with missing -lesd in sndlib-config
27   sed -i "s|lm|lesd|" sndlib-config.in
29   # enable most
30   ./configure --prefix=/usr \
31               --with-esd \
32               --with-alsa \
33               --with-oss \
34               --with-jack \
35               --with-doubles \
36               --with-gsl \
37               --with-s7 \
38               --with-portaudio
40   make
43 package() {
44   cd "$srcdir/$pkgname"
46   # prepare dirs
47   install -d "$pkgdir"/usr/{bin,include,lib}
49   # config tool
50   install -Dm 755 sndlib-config "$pkgdir/usr/bin"
52   # shared lib
53   install -Dm 755 libsndlib.so "$pkgdir/usr/lib"
55   # static lib
56   install -Dm 644 libsndlib.a "$pkgdir/usr/lib"
58   # headers
59   install -Dm 644 [^_]*.h "$pkgdir/usr/include"