1 # vim:set ts=2 sw=2 et:
2 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
3 # Contributor: Brad Fanella <bradfanella@archlinux.us>
4 # Contributor: [vEX] <niechift.dot.vex.at.gmail.dot.com>
5 # Contributor: Zeqadious <zeqadious.at.gmail.dot.com>
6 # Contributor: BlackIkeEagle < ike DOT devolder AT gmail DOT com >
7 # Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
8 # Contributor: Maxime Gauduin <alucryd@gmail.com>
16 pkgdesc="A software media player and entertainment hub for digital media"
21 'avahi' 'hicolor-icon-theme' 'lame' 'libass' 'libbluray' 'libcdio' 'libmad'
22 'libmicrohttpd' 'libmodplug' 'libmpeg2' 'libmysqlclient' 'libpulse'
23 'libsamplerate' 'libssh' 'libva' 'libvdpau' 'libvorbis' 'libxrandr' 'libxslt'
24 'lzo' 'mesa' 'mesa-demos' 'python2' 'python2-pillow' 'rtmpdump' 'sdl_image'
25 'smbclient' 'taglib' 'tinyxml' 'unzip' 'xorg-xdpyinfo' 'yajl'
28 'afpfs-ng' 'libnfs' 'libplist' 'shairplay' 'libcec' 'boost' 'cmake' 'doxygen'
29 'gperf' 'jasper' 'java-runtime-headless' 'nasm' 'swig' 'taglib' 'udisks'
33 'afpfs-ng: Apple File Protocol suport'
34 'libnfs: NFS Share support'
35 'libplist: AirPlay support'
36 'shairplay: AirPlay support'
37 'libcec: Pulse-Eight USB-CEC adapter support'
38 'polkit: power management'
39 'pulseaudio: for pulseaudio support'
40 'lirc: remote controller support'
41 'unrar: access compressed files without unpacking them'
42 'udisks: automount external drives'
43 'upower: display battery level'
45 install="${pkgname}.install"
47 "xbmc-$pkgver-$_codename.tar.gz::https://github.com/xbmc/xbmc/archive/$pkgver-$_codename.tar.gz"
48 '0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch'
49 '0002-CEC-bump-libCEC-to-2.2.0.patch'
50 '0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch'
51 '0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch'
52 '0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch'
53 '0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch'
56 'acbf5dffa3034a3406240ee3cf81e721386cd383d23d056ddde1f769e050e585'
57 'f4b436a64e32af6728fc9a584292b56de356d9090f0db0af30798a43aaa077f3'
58 '9d9ccbd140a71b90d43a22b7722804b9cb509b4e1e1fec02c0e2bceaed3b3958'
59 '0f0401189cc8481f05d7b68c50d66e18144c7d261be783e32c5b269f4b356ad7'
60 '33d6bd2b0da3d8563bfdf6059ad59ca10d9fe617e51990220ceb40d6fb3129d3'
61 'd98f86ceefb039b43a66332658aeee4aff25370248955ece10d04ae21f33d2a9'
62 'd829a5267f0b8042308b291366915253b3104d85a780a03cdaff6bec82493b95'
66 cd "$srcdir/xbmc-$pkgver-$_codename"
68 patch -Np1 -i "$srcdir/0001-CEC-fixed-don-t-try-to-stick-a-value-255-in-a-byte.patch"
69 patch -Np1 -i "$srcdir/0002-CEC-bump-libCEC-to-2.2.0.patch"
70 patch -Np1 -i "$srcdir/0003-CEC-prevent-bus-rescan-on-a-Pi-since-the-adapter-can.patch"
71 patch -Np1 -i "$srcdir/0004-CEC-fixed-don-t-return-garbage-from-CEC-related-app-.patch"
72 patch -Np1 -i "$srcdir/0005-CEC-renamed-the-iDoubleTapTimeoutMs-in-the-new-libCE.patch"
73 patch -Np1 -i "$srcdir/0006-CEC-fixed-don-t-use-CEC_CLIENT_VERSION_CURRENT-for-t.patch"
75 find -type f -name *.py -exec sed 's|^#!.*python$|#!/usr/bin/python2|' -i "{}" +
76 sed 's|^#!.*python$|#!/usr/bin/python2|' -i tools/depends/native/rpl-native/rpl
77 sed 's/python/python2/' -i tools/Linux/xbmc.sh.in
81 cd "$srcdir/xbmc-$pkgver-$_codename"
87 export PYTHON_VERSION=2 # external python v2
88 ./configure --prefix=$_prefix --exec-prefix=$_prefix \
90 --enable-optimizations \
108 --enable-ffmpeg-libvorbis \
113 --enable-optical-drive \
115 --enable-texturepacker \
119 --with-lirc-device=/run/lirc/lircd
121 # Now (finally) build
126 cd "$srcdir/xbmc-$pkgver-$_codename"
127 # Running make install
128 make DESTDIR="$pkgdir" install
131 install -D -m 0755 "$srcdir/xbmc-$pkgver-$_codename/tools/TexturePacker/TexturePacker" \
132 "${pkgdir}$_prefix/lib/xbmc/"
135 install -dm755 "${pkgdir}$_prefix/share/licenses/$pkgname"
136 for licensef in LICENSE.GPL copying.txt; do
137 mv "${pkgdir}$_prefix/share/doc/xbmc/$licensef" \
138 "${pkgdir}$_prefix/share/licenses/$pkgname"