updated on Wed Jan 11 16:09:51 UTC 2012
[aur-mirror.git] / osdlyrics / PKGBUILD
blobace50194cd2dc4f9d30659953791f0b9fe8ed1d6
1 # Maintainer: Auguste Pop <auguste [at] gmail [dot] com>
3 pkgname=osdlyrics
4 pkgver=0.4.1
5 pkgrel=3
6 pkgdesc="A lyric show compatible with various media players"
7 arch=('i686' 'x86_64')
8 url="http://code.google.com/p/osd-lyrics/"
9 license=('GPL3')
10 depends=('gtk2' 'dbus-glib' 'curl' 'libnotify' 'sqlite3'
11          'desktop-file-utils' 'hicolor-icon-theme')
12 makedepends=('intltool')
13 optdepends=('libmpd: MPD support'
14             'xmms2:   XMMS2 support')
15 install=$pkgname.install
16 source=(http://osd-lyrics.googlecode.com/files/$pkgname-$pkgver.tar.gz
17         liclib-4.x.patch)
18 md5sums=('958c8dcf6af0f94529d013c28cdad998'
19          '0464875f1fc91f7c19104c59d1646fe6')
21 _ods=()
22 _tmpfile="$pkgdir/.tmp"
24 add_ods()
26     pkg-config $1 && echo "$3" >> "$_tmpfile" || _ods=("${_ods[@]}" "$2")
29 unset_optdepend()
31     for _idx in ${!optdepends[@]}
32     do
33         if [[ "${optdepends[$_idx]}" =~ ^$1:* ]]
34         then
35             unset optdepends[$_idx]
36             break
37         fi
38     done
41 build()
43     cd "$srcdir/$pkgname-$pkgver"
44     patch -Np1 -i "$srcdir/liclib-4.x.patch"
46     aclocal
47     autoheader
48     autoconf
49     automake --add-missing
51     rm -rf "$_tmpfile"
52     add_ods libmpd "--disable-mpd" libmpd
53     add_ods xmms2-client "--disable-xmms2" xmms2
55     LIBS=-lm ./configure --prefix=/usr "${_ods[@]}"
56     make
59 package()
61     cd "$srcdir/$pkgname-$pkgver"
62     make DESTDIR="$pkgdir" install
64     while read _ch
65     do
66         if [ 1 -gt 0 ]; then depends=("${depends[@]}" "$_ch"); fi
67         unset_optdepend "$_ch"
68     done < "$_tmpfile"
69     optdepends=("${optdepends[@]}")
70     rm -rf "$_tmpfile"