updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / mpd-devel / PKGBUILD
bloba7060b52a68ef922e37225791a7a8f6138f5d229
1 # Contributor: Juan Diego Tascon
3 pkgname=mpd-devel
4 pkgver=0.15
5 pkgrel=1
6 pkgdesc="music daemon that plays mp3, flac, aac, mod, wav, mpc and ogg files"
7 url="http://musicpd.org"
8 depends=(
9         'alsa-lib' 'audiofile' 'curl' 'faad2>=2.6.1' 'ffmpeg' 'flac>=1.1.3' 'glib2'
10         'libao' 'libcdio' 'libid3tag' 'libmad' 'libmikmod' 'libmodplug' 
11         'libmpcdec>=1.2.5' 'libsamplerate' 'libshout' 'wavpack' 'zziplib'
13 makedepends=('autoconf' 'automake' 'git' 'libtool' 'pkgconfig')
14 optdepends=(
15         'avahi: Support for Avahi Zeroconf Backend'
16         'jack-audio-connection-kit: Support for JACK Audio'
17         'libao-pulse: Support for the PulseAudio Sound Server'
18         'libcue: Support for embedded cuesheets'
19         'libmms: Support for MMS Protocol'
20         'sqlite3: Support for SQLite Database'
22 license=('GPL')
23 arch=('i686' 'x86_64')
24 conflicts=('mpd')
25 provides=('mpd')
26 install=mpd.install
27 source=("http://downloads.sourceforge.net/sourceforge/musicpd/mpd-$pkgver.tar.bz2" "mpd.init")
28 md5sums=('2ed93a60bd703ba46d6794e12cfb5f1d' 'b1fd15de359db08e4b9ae4b199640f0e')
30 build() {
31         cd $srcdir/mpd-$pkgver
32         
33         # Configure Source
34     ./configure \
35                 --prefix=/usr \
36                 --sysconfdir=/etc \
37                 #--enable-ao \
38                 #--enable-bzip2 \
39                 #--enable-iso9660 \
40                 #--enable-lastfm \
41                 #--enable-modplug \
42                 #--enable-zip \
43                 #--disable-jack \
44                 #--disable-pulse \
45                 --with-zeroconf=no 
46                 #--enable-cue \
47                 #--enable-sqlite \
48                 #--enable-mms \
49                 #--enable-mvp
50     
51         # Build Source
52         make || return 1
53         
54         # Install Source
55         make prefix=$pkgdir/usr install
57         # Create Directories
58         install -d $pkgdir/var/{log/mpd,run/mpd,lib/mpd/playlists}
59         
60         # Install init Script
61         install -D -m755 $srcdir/mpd.init $pkgdir/etc/rc.d/mpd
63         # Install Sample Config
64         install -D -m644 $srcdir/mpd-$pkgver/doc/mpdconf.example $pkgdir/etc/mpd.conf.example
66     # Modify Sample Config with Proper Directories and User Settings
67         /bin/sed -i 's|music_directory.*$|#music_directory "path_to_your_music_collection"|1' $pkgdir/etc/mpd.conf.example
68         /bin/sed -i 's|playlist_directory.*$|playlist_directory "/var/lib/mpd/playlists"|1' $pkgdir/etc/mpd.conf.example
69         /bin/sed -i 's|db_file.*$|db_file "/var/lib/mpd/mpd.db"|1' $pkgdir/etc/mpd.conf.example
70         /bin/sed -i 's|log_file.*$|log_file "/var/log/mpd/mpd.log"|1' $pkgdir/etc/mpd.conf.example
71         /bin/sed -i 's|error_file.*$|error_file "/var/log/mpd/mpd.error"|1' $pkgdir/etc/mpd.conf.example
72         /bin/sed -i 's|#pid_file.*$|pid_file "/var/run/mpd/mpd.pid"|1' $pkgdir/etc/mpd.conf.example
73         /bin/sed -i 's|#state_file.*$|state_file "/var/lib/mpd/mpdstate"|1' $pkgdir/etc/mpd.conf.example
74         /bin/sed -i 's|#user.*$|user "mpd"|1' $pkgdir/etc/mpd.conf.example