archrelease: copy trunk to community-any
[ArchLinux/community.git] / xbmc / trunk / PKGBUILD
blob99837ef786637cbdc984eff00c4baa7755304bac
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>
10 _prefix=/usr
12 pkgname=xbmc
13 pkgver=13.2
14 _codename=Gotham
15 pkgrel=6
16 pkgdesc="A software media player and entertainment hub for digital media"
17 arch=('x86_64')
18 url="http://xbmc.org"
19 license=('GPL2')
20 depends=(
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'
27 makedepends=(
28 'afpfs-ng' 'libnfs' 'libplist' 'shairplay' 'libcec' 'boost' 'cmake' 'doxygen'
29 'gperf' 'jasper' 'java-runtime-headless' 'nasm' 'swig' 'taglib' 'udisks'
30 'zip'
32 optdepends=(
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"
46 source=(
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'
55 sha256sums=(
56   'acbf5dffa3034a3406240ee3cf81e721386cd383d23d056ddde1f769e050e585'
57   'f4b436a64e32af6728fc9a584292b56de356d9090f0db0af30798a43aaa077f3'
58   '9d9ccbd140a71b90d43a22b7722804b9cb509b4e1e1fec02c0e2bceaed3b3958'
59   '0f0401189cc8481f05d7b68c50d66e18144c7d261be783e32c5b269f4b356ad7'
60   '33d6bd2b0da3d8563bfdf6059ad59ca10d9fe617e51990220ceb40d6fb3129d3'
61   'd98f86ceefb039b43a66332658aeee4aff25370248955ece10d04ae21f33d2a9'
62   'd829a5267f0b8042308b291366915253b3104d85a780a03cdaff6bec82493b95'
65 prepare() {
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
80 build() {
81   cd "$srcdir/xbmc-$pkgver-$_codename"
83   # Bootstrapping XBMC
84   ./bootstrap
86   # Configuring XBMC
87   export PYTHON_VERSION=2  # external python v2
88   ./configure --prefix=$_prefix --exec-prefix=$_prefix \
89     --disable-debug \
90     --enable-optimizations \
91     --enable-gl \
92     --enable-sdl \
93     --enable-vaapi \
94     --enable-vdpau \
95     --enable-xvba \
96     --enable-joystick \
97     --enable-xrandr \
98     --enable-rsxs \
99     --enable-projectm \
100     --enable-x11 \
101     --enable-pulse \
102     --enable-rtmp \
103     --enable-samba \
104     --enable-nfs \
105     --enable-afpclient \
106     --enable-airplay \
107     --enable-airtunes \
108     --enable-ffmpeg-libvorbis \
109     --enable-dvdcss \
110     --disable-hal \
111     --enable-avahi \
112     --enable-webserver \
113     --enable-optical-drive \
114     --enable-libbluray \
115     --enable-texturepacker \
116     --enable-udev \
117     --enable-libusb \
118     --enable-libcec \
119     --with-lirc-device=/run/lirc/lircd
121   # Now (finally) build
122   make
125 package() {
126   cd "$srcdir/xbmc-$pkgver-$_codename"
127   # Running make install
128   make DESTDIR="$pkgdir" install
130   # Tools
131   install -D -m 0755 "$srcdir/xbmc-$pkgver-$_codename/tools/TexturePacker/TexturePacker" \
132     "${pkgdir}$_prefix/lib/xbmc/"
134   # Licenses
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"
139   done