summaryrefslogtreecommitdiff
path: root/extra/mpd/PKGBUILD
blob: 68a57c53e1582188e426af82c93e04ce3cb2cbce (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
# $Id: PKGBUILD 141091 2011-10-23 16:35:52Z dreisner $
# Maintainer: Angel Velasquez <angvp@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
# Contributor: Ben <ben@benmazer.net>

pkgname=mpd
pkgver=0.16.5
pkgrel=1
pkgdesc="Music daemon that plays MP3, FLAC, and Ogg Vorbis files"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
url="http://mpd.wikia.com/wiki/Server"
depends=('libao' 'ffmpeg' 'libmodplug' 'audiofile' 'libshout' 'libmad' 'curl' 'faad2'
         'sqlite3' 'jack' 'libmms' 'wavpack' 'libmpcdec' 'avahi' 'libid3tag'
         'libpulse')
makedepends=('pkgconfig' 'doxygen')
install=${pkgname}.install
changelog=ChangeLog
source=("http://downloads.sourceforge.net/musicpd/$pkgname-$pkgver.tar.bz2"
'mpd') 
md5sums=('f7564cff12035f6a1112cce770655df7'
         'e5669c2bff4031928531e52475addeb1')

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

  ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --enable-lastfm \
    --enable-jack \
    --enable-pulse \
    --enable-documentation \
    --disable-libwrap \
    --disable-cue \
    --disable-sidplay \
    --with-systemdsystemunitdir=/lib/systemd/system

  make
}

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

  make DESTDIR="$pkgdir" install

  # set our dirs in mpd.conf file
  sed -i 's|^music_directory.*$|#music_directory "path_to_your_music_collection"|1' doc/mpdconf.example
  sed -i 's|playlist_directory.*$|playlist_directory "/var/lib/mpd/playlists"|1' doc/mpdconf.example
  sed -i 's|db_file.*$|db_file "/var/lib/mpd/mpd.db"|1' doc/mpdconf.example
  sed -i 's|log_file.*$|log_file "/var/log/mpd/mpd.log"|1' doc/mpdconf.example
  sed -i 's|error_file.*$|error_file "/var/log/mpd/mpd.error"|1' doc/mpdconf.example
  sed -i 's|#pid_file.*$|pid_file "/var/run/mpd/mpd.pid"|1' doc/mpdconf.example
  sed -i 's|#state_file.*$|state_file "/var/lib/mpd/mpdstate"|1' doc/mpdconf.example
  sed -i 's|#user.*$|user "mpd"|1' doc/mpdconf.example

  install -Dm644 "doc/mpdconf.example" "$pkgdir/usr/share/mpd/mpd.conf.example"

  install -Dm755 "$srcdir/mpd" "$pkgdir/etc/rc.d/mpd"
  install -d "$pkgdir"/var/{lib/mpd/playlists,log/mpd}
}