summaryrefslogtreecommitdiffstats
path: root/extra/xbmc/Pkgfile
blob: a8057fe1731ef6cb12502e110ae00c9e8ec29f92 (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
# Description: Media Center
# URL: http://xbmc.org
# Maintainer: NutyX core team
# Packager: lesibel at free dot fr
# Depends on: xscreensaver, cmake, boost,  gperf, nasm, libvdpau, unzip, zip, unrar, devicekit-power, bzip2, curl, enca, faac, faad2, liba52, alsa-lib, flac, freetype, fontconfig, fribidi, glew, dbus, hal, jasper, libcdio, libmad, libmms, libjpeg, libogg, libmpeg2, libvorbis, mysqlclient, libsamplerate, xorg-libxinerama, xorg-libxrandr, xorg-libxtst, xorg-xdpyinfo, mesa3d, lzo, sdl_image, sdl_mixer, sdl-sound, tiff, ffmpeg, samba3, wavpack


name=xbmc
version=9.11
release=1

source=(http://freefr.dl.sourceforge.net/project/xbmc/XBMC%20Source%20Code/Camelot%20-%209.11/xbmc-9.11.tar.gz
        use_cdio_system_headers_on_non_win32.patch
        FEH.sh
        libpng14.patch
        xbmc-9.11-wavpack.patch
	xbmc-9.11-TexturePacker-parallel-build.patch)

build() {
  cd $SRC/$name-$version

  patch -Np1 -i $SRC/use_cdio_system_headers_on_non_win32.patch
  patch -Np1 -i $SRC/libpng14.patch
  patch -Np1 -i $SRC/xbmc-9.11-TexturePacker-parallel-build.patch
  patch -Np1 -i $SRC/xbmc-9.11-wavpack.patch

  sed -i -e 's:/usr/bin/lsb_release -d:cat /etc/nutyx-version:' xbmc/utils/SystemInfo.cpp
  sed -i 's: ftell64: dll_ftell64:' xbmc/cores/DllLoader/exports/wrapper.c
  sed -i 's|cinfo.scale_denom = GetJpegScale();|cinfo.scale_denom = GetJpegScale(); cinfo.scale_num = 1;|' xbmc/lib/cximage-6.0/CxImage/ximajpg.cpp

	export SVN_REV="-ARCH"

    ./bootstrap
 
       ./configure --prefix=/usr \
    	--enable-vdpau \
    	--disable-pulse \
    	--disable-external-liba52 \
    	--disable-external-libdts \
    	--enable-external-libmpeg2 \
    	--enable-external-libogg \
    	--enable-external-libwavpack \
    	--disable-external-libass \
    	--disable-external-ffmpeg \
    	--disable-external-python \
    	--disable-debug 

  make
  make prefix=$PKG/usr install

  sed -i -e 's/\/usr\/share\/xbmc/\/opt\/xbmc/' $PKG/usr/bin/xbmc

  # License(s)
  install -dm755 $PKG/usr/share/licenses/$name

 for licensef in LICENSE.GPL README.linux copying.txt; do
    mv $PKG/usr/share/xbmc/${licensef} \
    $PKG/usr/share/licenses/$name
  done

  rm -r $PKG/usr/share/xsessions

  sed -i "s#Exec=xbmc#Exec=/usr/bin/xbmc#" $PKG/usr/share/applications/xbmc.desktop

  mkdir $PKG/opt/
  mv $PKG/usr/share/xbmc $PKG/opt

  rm -r $PKG/opt/xbmc/skin/PM3.HD

  find $PKG -type f -exec strip {} \; >/dev/null 2>/dev/null
}