summaryrefslogtreecommitdiff
path: root/community/xmms2/PKGBUILD
blob: 4ade6619f8d6081f26ee77d9ad5b50641bf97081 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# $Id: PKGBUILD 111492 2014-05-19 10:09:32Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=xmms2
pkgver=0.8DrO_o
pkgrel=26
pkgdesc="complete rewrite of the popular music player"
arch=('i686' 'x86_64')
url="http://xmms2.org/"
license=('LGPL')
backup=('etc/conf.d/xmms2d.conf')
depends=('sqlite' 'libmad')
makedepends=('alsa-lib' 'boost' 'curl' 'faad2' 'ffmpeg' 'fftw' 'flac'
	'jack' 'libao' 'libmms' 'libmpcdec' 'libofa' 'libsamplerate' 'libshout'
	'libdiscid' 'libcdio-paranoia'
	'libvorbis' 'libxml2' 'mpg123' 'perl' 'pulseaudio' 'pyrex'
	'ruby' 'smbclient' 'speex' 'wavpack' 'libmodplug' 'python' 'python2' 'libgme' 'avahi')
optdepends=('alsa-lib: ALSA audio output'
	    'avahi: announce xmms2d via bonjour/mDNS/zeroconf'
	    'boost: C++ language bindings'
	    'curl: play HTTP streams'
	    'faad2: AAC support'
	    'ffmpeg: WMA, avcodec & avformat support'
	    'fftw: calculations for visualization'
	    'flac: FLAC support'
	    'jack: JACK audio output'
	    'libao: liboa audio output'
	    'libgme: game-music-emu support'
	    'libdiscid: cdda support'
	    'libcdio-paranoia: cdda support'
	    'libofa: MusicDNS fingerprinting'
	    'libmms: play MMS streams'
	    'libmodplug: to play MOD files'
	    'libmpcdec: Musepack support'
	    'libsamplerate: vocoder support'
	    'libshout: Icecast audio output'
	    'libvorbis: Ogg Vorbis support'
	    'libxml2: XSPF and podcast support'
	    'mpg123: alternative MP3 plugin'
	    'perl: Perl language bindings'
	    'pulseaudio: PulseAudio audio output'
	    'pyrex: Python language bindings'
	    'ruby: Ruby language bindings'
	    'smbclient: direct CIFS/SMB access'
	    'speex: Speex support'
	    'wavpack: WavPack support')
#	    'sidplay: to play a Commodore 64 music files AKA zaks'
# we do not have sidplay 2 series in repos; also it's
# somehow connected with resid i guess(not in repos also)
conflicts=('xmms2-devel')
install=xmms2.install
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
	"xmms2d.conf"
	"xmms2d.service"
	"ffmpeg2.0.patch")
md5sums=('84d5c05a70bfd31ed392a4e3f701eaa3'
         'af13c937bf3c86b77ae6820107aab9b8'
         '47e68461589578e8a99857746c5b6f29'
         'da84ec58c5711f3c4ecd932c3e6642d6')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  patch -Np1 -i ../ffmpeg2.0.patch

  # python2 fix
  # sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' waf
  sed -i 's|#include <cdio/cdda.h>|#include <cdio/paranoia/cdda.h>|' src/plugins/cdda/cdda.c
  sed -i 's|libsmbclient.h|samba-4.0/libsmbclient.h|' src/plugins/samba/{samba.c,wscript}
  sed -i 's|modplug.h|libmodplug/modplug.h|' src/plugins/modplug/modplug.c
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  ./waf configure --prefix=/usr \
	--with-optionals=python,launcher,xmmsclient++,perl,ruby,nycli,pixmaps,et,mdns,medialib-updater \
	--with-ruby-archdir=`ruby -e 'puts RbConfig::CONFIG["vendorarchdir"]'` \
	--with-ruby-libdir=`ruby -e 'puts RbConfig::CONFIG["vendorlibdir"]'`
  ./waf build
}

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

  ./waf --destdir=${pkgdir} install

  PYTHON=/usr/bin/python2 ./waf configure --prefix=/usr --with-optionals=python --without-xmms2d
  ./waf build
  ./waf --destdir=${pkgdir} install

  install -Dm0644 $srcdir/xmms2d.conf ${pkgdir}/etc/conf.d/xmms2d.conf
  install -Dm0644 $srcdir/xmms2d.service $pkgdir/usr/lib/systemd/system/xmms2d.service
}