1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: Daniel Wallace <daniel.wallace@gatech.edu>
4 pkgname=plex-home-theater
8 pkgdesc='Plex Home Theater'
10 url='http://www.plexapp.com/'
12 depends=('alsa-lib' 'avahi' 'boost-libs' 'curl' 'expat' 'freetype2' 'fribidi'
13 'gcc-libs' 'glew' 'glibc' 'glu' 'libcdio' 'libgl' 'libjpeg' 'libmad'
14 'libmicrohttpd' 'libmpeg2' 'libpng' 'libpulse' 'libsamplerate'
15 'libssh' 'libtiff' 'libusb-compat' 'libva' 'libvdpau' 'libx11'
16 'libxext' 'libxrandr' 'lzo' 'pcre' 'python2' 'sdl' 'sdl_image'
17 'sdl_mixer' 'sqlite' 'smbclient' 'taglib' 'tinyxml' 'yajl' 'zlib'
18 'libavcodec.so' 'libavfilter.so' 'libavformat.so' 'libavutil.so'
19 'libpostproc.so' 'libswresample.so' 'libswscale.so')
20 makedepends=('boost' 'cmake' 'doxygen' 'ffmpeg-compat' 'git' 'java-environment'
21 'libcec' 'libplist' 'libshairport' 'nasm' 'swig' 'unzip' 'zip')
22 optdepends=('libplist: AirPlay support'
23 'libshairport: AirPlay support'
24 'libcec: Pulse-Eight USB-CEC adapter support'
25 'pulseaudio: PulseAudio support')
26 source=("https://github.com/plexinc/plex-home-theater-public/archive/v${pkgver}-${_pkghash}.tar.gz"
27 'plex-ffmpeg-compat.patch'
30 sha256sums=('82a0b3314de18e0f1bdb123c6fe4d411e147b052a09219a9d2057459dc0f36b3'
31 '5b370e4dec6998130df46ad6bd5ca6258e3a040dd6c6cc4085c335dc3d6050bd'
32 '7e5f6c1e07184a0b0affe4ef7c0bd06d1094f7a28cf5baa35d31a69cf488a9db'
33 'dc6bd394c07a2ececbb2f8c53cb54afd5d78f7c00a0b34acab3e71217da085fb')
36 cd plex-home-theater-public-${pkgver}-${_pkghash}
38 patch -Np1 -i ../plex-libcec.patch
39 patch -Np1 -i ../plex-ffmpeg-compat.patch
43 cd plex-home-theater-public-${pkgver}-${_pkghash}
45 if [[ -d build ]]; then
48 mkdir build && cd build
51 -DCMAKE_INSTALL_PREFIX='/usr' \
52 -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" \
53 -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" \
54 -DCREATE_BUNDLE='FALSE' \
55 -DDUMP_SYMBOLS='FALSE' \
56 -DENABLE_AUTOUPDATE='FALSE' \
57 -DENABLE_PYTHON='TRUE' \
58 -DPYTHON_EXEC='/usr/bin/python2' \
59 -DUSE_INTERNAL_FFMPEG='FALSE'
64 cd plex-home-theater-public-${pkgver}-${_pkghash}/build
66 make DESTDIR="${pkgdir}" install
67 install -dm 755 "${pkgdir}"/usr/{lib/plexhometheater,share/{applications,pixmaps}}
68 mv "${pkgdir}"/usr/bin/{system,xbmc-xrandr} "${pkgdir}"/usr/lib/plexhometheater/
69 mv "${pkgdir}"/usr/share/XBMC "${pkgdir}"/usr/share/plexhometheater
70 rm -rf "${pkgdir}"/usr/bin/*.so
71 install -m 755 "${srcdir}"/plexhometheater.sh "${pkgdir}"/usr/bin/
72 install -m 644 ../plex/Resources/plexhometheater.desktop "${pkgdir}"/usr/share/applications/
73 install -m 644 ../plex/Resources/plex-icon-256.png "${pkgdir}"/usr/share/pixmaps/plexhometheater.png