summaryrefslogtreecommitdiff
path: root/libre/xmms2/PKGBUILD
blob: da856ab2754f86cb5e0ba226ef4928a67a3e1809 (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# Maintainer (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: (Arch) Storm Dragon <stormdragon2976@gmail.com>
# Contributor (Arch): Aaron 'venisonslurpee' Laursen <venisonslurpee@gmail.com>
# Contributor (Arch): Christopher Rosell <chrippa@tanuki.se>
# Contributor (Arch): lh <jarryson@gmail.com>
# Contributor (Arch): Sebastian Schwarz <seschwar@gmail.com>
# Contributor (Arch): Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor (Arch): Xilon <xilon@gmail.com>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgname=xmms2
pkgver=0.8DrO_o.949.gca15e830
_commit=ca15e830bd1b18e26772657b0a057cfedb91d2eb
pkgrel=6.parabola1
pkgdesc="X-platform Music Multiplexing System 2, without nonfree mac recommendation"
arch=(i686 x86_64 armv7h)
url="https://xmms2.org/"
license=(GPL LGPL)
_depends=('alsa-lib: ALSA output'
          'avahi: announce xmms2d via bonjour/mDNS/zeroconf'
          'boost: C++ bindings'
          'curl: play HTTP streams'
          'cython: Python bindings'
          'faad2: AAC support'
          'ffmpeg: WMA, avcodec & avformat support'
          'fftw: visualization'
          'flac: FLAC support'
          'fluidsynth: MIDI support'
          'jack: JACK output'
          'libao: libao output'
          'libcdio-paranoia: CDDA support'
          'libdiscid: CDDA support'
          'libgme: support for various video game music formats'
          'libmad: MP3 support'
          'libmms: play MMS streams'
          'libmodplug: MOD support'
          'libmpcdec: Musepack support'
          'libofa: MusicDNS fingerprinting'
          'libsamplerate: vocoder support'
          'libshout: Icecast output'
          'libvorbis: Ogg Vorbis support'
          'libxml2: XSPF and podcast support'
          'mpg123: alternative MP3 support'
          'opusfile: Opus support'
          'perl: Perl bindings'
          'ruby: Ruby bindings'
#          'sidplay2-libs: support for C64 music files'
# we do not have sidplay 2 series in repos; also it's
# somehow connected with resid i guess(not in repos also)
          'smbclient: direct CIFS/SMB access'
          'speex: Speex support'
          'wavpack: WavPack support')
depends=(glib2 readline)
makedepends=("${_depends[@]%%:*}" libpulse python2 git)
optdepends=("${_depends[@]}" 'oss: OSS output' 'pulseaudio: PulseAudio output')
provides=(xmms2)
conflicts=(xmms2 xmms2-devel)
install=install.sh
source=(git://git.xmms2.org/xmms2/xmms2-devel.git#commit=${_commit}
        tmpfiles.conf
        system.service
        user.service)
md5sums=('SKIP'
         'd3ab09ed8d1cf982468d1ceb141d4a9d'
         '4b026ab80e853f24b5cf13b310afb83c'
         'f773f674882946065c02e36e9548eb00')

pkgver() {
    cd "$srcdir/xmms2-devel"
    git describe --always | sed 's/-/./g'
}

prepare() {
    cd "$srcdir/xmms2-devel"
    git submodule update --init
    sed -i '$a#define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000 /* 1 second of 48kHz 32bit audio */' src/plugins/avcodec/avcodec_compat.h
    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|Werror|Wno-error|g' waftools/*.py
}

build() {
    cd "$srcdir/xmms2-devel"
    CXXFLAGS="-Wall" CFLAGS="-Wall" ./waf configure --prefix=/usr --sbindir=/usr/bin --without-ldconfig \
            --with-ruby-archdir=`ruby -e 'puts RbConfig::CONFIG["vendorarchdir"]'` \
            --with-ruby-libdir=`ruby -e 'puts RbConfig::CONFIG["vendorlibdir"]'` \
            --with-perl-archdir=`perl -V:installvendorarch | cut -f2 -d\'` \
            --with-optionals=launcher,xmmsclient++,xmmsclient++-glib,perl,ruby,nycli,pixmaps,et,mdns,medialib-updater,sqlite2s4 \
            --without-optionals=python
    ./waf build
}

package() {
    cd "$srcdir/xmms2-devel"
    ./waf --destdir="$pkgdir" install
    install -dm0755 "$pkgdir/var/lib/xmms2"
    install -Dm0644 "$srcdir/tmpfiles.conf" \
            "$pkgdir/usr/lib/tmpfiles.d/xmms2.conf"
    install -Dm0644 "$srcdir/system.service" \
            "$pkgdir/usr/lib/systemd/system/xmms2d.service"
    install -Dm0644 "$srcdir/user.service" \
            "$pkgdir/usr/lib/systemd/user/xmms2d.service"

    [ -d "$pkgdir"/usr/lib64 ] && \
        { mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/; rmdir "$pkgdir"/usr/lib64; } || \
        true

    # also install python2 bindings
    #./waf distclean
    #PYTHON=/usr/bin/python2 ./waf configure --prefix=/usr --with-optionals=python --without-xmms2d
    #./waf build
    #./waf --destdir="$pkgdir" install
# template start; name=perl-binary-module-dependency; version=1;
if [[ $(find "$pkgdir/usr/lib/perl5/" -name "*.so") ]]; then
_perlver_min=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]);')
_perlver_max=$(perl -e '$v = $^V->{version}; print $v->[0].".".($v->[1]+1);')
depends+=("perl>=$_perlver_min" "perl<$_perlver_max")
fi
# template end;
}