summaryrefslogtreecommitdiffstats
path: root/abs/extra/openpht/PKGBUILD
blob: 6ccd7e98d0691815d6cf7d1366ec298361509d9b (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
# Maintainer: Jeff Keyte <jeff@keyte.me>
# Contributor: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Daniel Wallace <daniel.wallace@gatech.edu>

pkgname=openpht
pkgver=1.6.2.123
_pkghash=e23a7eef
pkgrel=5
pkgdesc='OpenPHT is a community driven fork of Plex Home Theater'
arch=('i686' 'x86_64')
url='https://github.com/RasPlex/OpenPHT/'
license=('GPL2')
install="${pkgname}.install"
provides=('plex-home-theater')
#conflicts=('plex-home-theater')
replaces=('plex-home-theater')
depends=('alsa-lib' 'avahi' 'boost-libs' 'curl' 'expat' 'ffmpeg2.8' 'freetype2' 'fribidi'
         'gcc-libs' 'glew' 'glibc' 'glu' 'libcdio' 'libgl' 'libjpeg' 'libmad'
         'libmicrohttpd' 'libmpeg2' 'libpng' 'libsamplerate' 'llvm-libs'
         'libssh' 'libtiff' 'libusb-compat' 'libva' 'libvdpau' 'libx11'
         'libxext' 'libxrandr' 'lzo' 'pcre' 'python2' 'sdl' 'sdl_image'
         'sdl_mixer' 'sqlite' 'smbclient' 'taglib' 'tinyxml' 'yajl' 'zlib' 'rtmpdump')
makedepends=('boost' 'cmake' 'doxygen' 'git' 'java-environment' 'shairplay'
             'libcec' 'libplist' 'nasm' 'swig' 'unzip' 'zip')
optdepends=('libplist: AirPlay support'
            'libcec: Pulse-Eight USB-CEC adapter support'
            'shairplay: Shairplay Support')
source=("https://github.com/RasPlex/OpenPHT/archive/v${pkgver}-${_pkghash}.tar.gz"
        'plexhometheater.sh'
        'plex_lib.conf'
        'fribidi.patch'
        'plexhometheater.desktop')
prepare() {
  cd OpenPHT-${pkgver}-${_pkghash}
  patch -Np1 <../fribidi.patch
}

build() {
  cd OpenPHT-${pkgver}-${_pkghash}

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

  CMAKE_PREFIX_PATH=/usr/lib/ffmpeg2.8:/usr/include/ffmpeg2.8 \
  cmake .. \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DENABLE_AUTOUPDATE='FALSE' \
    -DENABLE_PYTHON='TRUE' \
    -DPYTHON_EXEC='/usr/bin/python2' \
    -DUSE_INTERNAL_FFMPEG='FALSE'
  make
}

package() {
  cd OpenPHT-${pkgver}-${_pkghash}/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 "${srcdir}"/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=('075d697793b32d34c9ac57b94ae14821'
         'ad57396d98692dbe8c8d6f2fab707a94'
         'c1eedd9f89ee727230833db9ef1e5d29'
         'a5980579c1b6341a6d06e80d9da2a924'
         'e530e2b4d8333863ba1c87862c291ba1')