summaryrefslogtreecommitdiffstats
path: root/abs/extra/plex-home-theater/PKGBUILD
blob: d730273d4c978e3213b3f33e40bdbcc2483add13 (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
# $Id$
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Daniel Wallace <daniel.wallace@gatech.edu>

pkgname=plex-home-theater
_pkgver=1.4.0.459-b41b1814
pkgver=${_pkgver%-*}
pkgrel=1
pkgdesc='Plex Home Theater'
arch=('i686' 'x86_64')
url='http://www.plexapp.com/'
license=('GPL2')
depends=('boost-libs' 'curl' 'ffmpeg-compat' 'glew' 'libcdio' 'libmad'
         'libmicrohttpd' 'libmpeg2' 'libsamplerate' 'libssh' 'libusb-compat'
         'libvdpau' 'libxrandr' 'lzo' 'sdl_image' 'sdl_mixer' 'smbclient'
         'taglib' 'tinyxml' 'yajl')
makedepends=('boost' 'cmake' 'doxygen' 'java-environment' 'libcec'
             'libplist' 'libshairport' 'nasm' 'swig' 'unzip' 'zip')
optdepends=('libplist: AirPlay support'
            'libshairport: AirPlay support'
            'libcec: Pulse-Eight USB-CEC adapter support')
install="${pkgname}.install"
source=("https://github.com/plexinc/plex-home-theater-public/archive/v${_pkgver}.tar.gz"
        'plex-ffmpeg-compat.patch'
        'plex-libcec-2.2.0.patch'
        'plex-lirc-socket.patch'
        'plex_lib.conf'
        'plexhometheater.sh')

prepare() {
  cd plex-home-theater-public-${_pkgver}

  patch -Np1 -i ../plex-libcec-2.2.0.patch
  patch -Np1 -i ../plex-lirc-socket.patch
  patch -Np1 -i ../plex-ffmpeg-compat.patch
}

build() {
  cd plex-home-theater-public-${_pkgver}

  if [[ -d build ]]; then
    rm -rf build
  fi
  mkdir build && cd build

  cmake .. -DCMAKE_INSTALL_PREFIX='/usr' \
           -DCMAKE_C_FLAGS="$CMAKE_C_FLAGS -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" \
           -DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include" \
           -DENABLE_{AUTOUPDATE,DUMP_SYMBOLS}='FALSE' -DENABLE_PYTHON='TRUE' \
           -DPYTHON_EXEC='/usr/bin/python2' -DUSE_INTERNAL_FFMPEG='FALSE' \
           -DCREATE_BUNDLE='FALSE'
  make
}

package() {
  cd plex-home-theater-public-${_pkgver}/build

  make DESTDIR="${pkgdir}" install
  install -dm 755 "${pkgdir}"/usr/{lib/plexhometheater,share/{applications,pixmaps}}
  mv "${pkgdir}"/usr/bin/{system,xbmc-xrandr} "${pkgdir}"/usr/lib/plexhometheater/
  mv "${pkgdir}"/usr/share/XBMC "${pkgdir}"/usr/share/plexhometheater
  rm -rf "${pkgdir}"/usr/bin/*.so
  install -Dm 755 "${srcdir}"/plexhometheater.sh "${pkgdir}"/usr/LH/bin/plexhometheater.sh
  install -m 644 ../plex/Resources/plexhometheater.desktop "${pkgdir}"/usr/share/applications/
  install -m 644 ../plex/Resources/plex-icon-256.png "${pkgdir}"/usr/share/pixmaps/plexhometheater.png

  # LinHES stuff
  #add in plex_lib.conf
  install -D -m0744 ${srcdir}/plex_lib.conf ${pkgdir}/etc/gen_lib_xml.d/plex_lib.conf
}

md5sums=('23ac6ae1c7b3c093db67fcbc940d1ae0'
         '6704244166497db7fa6b3ddd43a0e53b'
         '066484ad4949f96ddddaa8b1d4d709e1'
         '09e67d694093eb6bd243fb9a4ddf5d70'
         'c1eedd9f89ee727230833db9ef1e5d29'
         '4ceae60ed2f9e4304eda4f80d407e799')