New package: xbmc-rpi-12.3.
This commit is contained in:
parent
0b8ce4d0bd
commit
b3e5a70bd1
|
@ -0,0 +1,6 @@
|
|||
case "${ACTION}" in
|
||||
post)
|
||||
mkdir -p var/lib/xbmc
|
||||
chown xbmc:xbmc var/lib/xbmc
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,5 @@
|
|||
case "${ACTION}" in
|
||||
purge)
|
||||
rm -rf var/lib/xbmc
|
||||
;;
|
||||
esac
|
|
@ -0,0 +1,11 @@
|
|||
polkit.addRule(function(action, subject) {
|
||||
if (action.id.match("org.freedesktop.login1.") && subject.isInGroup("video")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id.indexOf("org.freedesktop.udisks") == 0 && subject.isInGroup("video")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description = XBMC Media Center for Raspberry Pi service
|
||||
After = remote-fs.target
|
||||
|
||||
[Service]
|
||||
User = xbmc
|
||||
Group = xbmc
|
||||
Type = simple
|
||||
ExecStart = /usr/bin/xbmc-standalone -l /run/lirc/lircd
|
||||
Restart = always
|
||||
|
||||
[Install]
|
||||
WantedBy = multi-user.target
|
|
@ -0,0 +1,169 @@
|
|||
diff -Naur xbmc-frodo-0ff0d2e/configure.in xbmc-frodo-0ff0d2e.patch/configure.in
|
||||
--- xbmc-frodo-0ff0d2e/configure.in 2012-10-11 15:45:44.000000000 +0200
|
||||
+++ xbmc-frodo-0ff0d2e.patch/configure.in 2012-10-11 16:49:08.872850880 +0200
|
||||
@@ -452,6 +452,12 @@
|
||||
[use_texturepacker=$enableval],
|
||||
[use_texturepacker=auto])
|
||||
|
||||
+AC_ARG_WITH([texturepacker-root],
|
||||
+ [AS_HELP_STRING([--with-texturepacker-root],
|
||||
+ [root dir to search for librarys and includes if building native TexturePacker (default is \$prefix)])],
|
||||
+ [use_texturepacker_root=$withval],
|
||||
+ [use_texturepacker_root=$prefix])
|
||||
+
|
||||
AC_ARG_WITH([lirc-device],
|
||||
[AS_HELP_STRING([--with-lirc-device=file],
|
||||
[specify the default LIRC device (default is /dev/lircd)])],
|
||||
@@ -2000,13 +2006,13 @@
|
||||
|
||||
USE_TEXTUREPACKER_NATIVE=0
|
||||
if test "x$use_texturepacker" != "xno"; then
|
||||
- final_message="$final_message\n TexturePacker:Yes"
|
||||
USE_TEXTUREPACKER=1
|
||||
- if test "x$use_texturepacker_native" = "xyes"; then
|
||||
+ if test "x$cross_compiling" = "xyes"; then
|
||||
USE_TEXTUREPACKER_NATIVE=1
|
||||
- if [[ ! -d "$USE_TEXTUREPACKER_NATIVE_ROOT" ]]; then
|
||||
- USE_TEXTUREPACKER_NATIVE_ROOT=
|
||||
- fi
|
||||
+ USE_TEXTUREPACKER_NATIVE_ROOT="$use_texturepacker_root"
|
||||
+ final_message="$final_message\n TexturePacker:Native ($USE_TEXTUREPACKER_NATIVE_ROOT)"
|
||||
+ else
|
||||
+ final_message="$final_message\n TexturePacker:Yes"
|
||||
fi
|
||||
else
|
||||
final_message="$final_message\n TexturePacker:No"
|
||||
diff -Naur xbmc-frodo-0ff0d2e/lib/libsquish/Makefile.in xbmc-frodo-0ff0d2e.patch/lib/libsquish/Makefile.in
|
||||
--- xbmc-frodo-0ff0d2e/lib/libsquish/Makefile.in 2012-10-11 15:47:26.000000000 +0200
|
||||
+++ xbmc-frodo-0ff0d2e.patch/lib/libsquish/Makefile.in 2012-10-11 16:49:08.873850900 +0200
|
||||
@@ -11,26 +11,25 @@
|
||||
singlecolourfit.cpp \
|
||||
squish.cpp
|
||||
|
||||
-CXXFLAGS+=-I.
|
||||
-
|
||||
-LIB=libsquish.a
|
||||
-
|
||||
-ifeq (@USE_TEXTUREPACKER_NATIVE@,1)
|
||||
-NATIVE_LIB=libsquish-native.so
|
||||
-CLEAN_FILES+=$(NATIVE_LIB)
|
||||
+LIB = libsquish.a
|
||||
+NATIVE_LIB = libsquish-native.so
|
||||
+CLEAN_FILES += $(NATIVE_LIB)
|
||||
+
|
||||
+HOST_CXX ?= g++
|
||||
+CXXFLAGS += -I.
|
||||
+HOST_CXXFLAGS += -I.
|
||||
|
||||
ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
|
||||
-NATIVE_ARCH=@DARWIN_NATIVE_ARCH@
|
||||
+ HOST_CXXFLAGS += @DARWIN_NATIVE_ARCH@
|
||||
endif
|
||||
|
||||
-all: $(LIB) $(NATIVE_LIB)
|
||||
+$(LIB): $(SRCS)
|
||||
# TexturePacker links to libsquish and needs to run on build system, so make a native flavor.
|
||||
$(NATIVE_LIB): $(SRCS)
|
||||
ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
|
||||
- g++ $(NATIVE_ARCH) -I. $(SRCS) -dynamiclib -install_name `pwd`/libsquish-native.so -o $@
|
||||
+ $(HOST_CXX) $(HOST_CXXFLAGS) $(SRCS) -dynamiclib -install_name `pwd`/libsquish-native.so -o $@
|
||||
else
|
||||
- g++ -I. $(SRCS) -shared -fPIC -Wl,-soname,`pwd`/libsquish-native.so -o $@
|
||||
-endif
|
||||
+ $(HOST_CXX) $(HOST_CXXFLAGS) $(SRCS) -shared -fPIC -Wl,-soname,`pwd`/libsquish-native.so -o $@
|
||||
endif
|
||||
|
||||
include ../../Makefile.include
|
||||
diff -Naur xbmc-frodo-0ff0d2e/tools/TexturePacker/Makefile.in xbmc-frodo-0ff0d2e.patch/tools/TexturePacker/Makefile.in
|
||||
--- xbmc-frodo-0ff0d2e/tools/TexturePacker/Makefile.in 2012-10-11 15:47:05.000000000 +0200
|
||||
+++ xbmc-frodo-0ff0d2e.patch/tools/TexturePacker/Makefile.in 2012-10-11 16:49:08.874850920 +0200
|
||||
@@ -1,56 +1,54 @@
|
||||
-DEFINES += -D_LINUX -DUSE_LZO_PACKING
|
||||
+DEFINES += -D_LINUX -DUSE_LZO_PACKING
|
||||
ifneq ($(or $(findstring powerpc,@ARCH@),$(findstring ppc, @ARCH@)),)
|
||||
-DEFINES += -DHOST_BIGENDIAN
|
||||
+DEFINES += -DHOST_BIGENDIAN
|
||||
endif
|
||||
|
||||
-CXXFLAGS+= \
|
||||
+SRCS = \
|
||||
+ md5.cpp \
|
||||
+ SDL_anigif.cpp \
|
||||
+ XBTFWriter.cpp \
|
||||
+ XBMCTex.cpp \
|
||||
+ @abs_top_srcdir@/xbmc/guilib/XBTF.cpp
|
||||
+
|
||||
+TARGET = TexturePacker
|
||||
+CLEAN_FILES = $(TARGET)
|
||||
+
|
||||
+all: $(TARGET)
|
||||
+
|
||||
+HOST_CXX ?= g++
|
||||
+HOST_ROOT_PATH = @USE_TEXTUREPACKER_NATIVE_ROOT@
|
||||
+
|
||||
+LIBS += -lSDL_image -lSDL -llzo2
|
||||
+LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish
|
||||
+HOST_LIBS += -L$(HOST_ROOT_PATH)/lib -lSDL_image -lSDL -llzo2
|
||||
+HOST_LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish-native
|
||||
+
|
||||
+CXXFLAGS += \
|
||||
-I. \
|
||||
-I@abs_top_srcdir@/lib \
|
||||
-I@abs_top_srcdir@/xbmc \
|
||||
-I@abs_top_srcdir@/xbmc/linux
|
||||
|
||||
-RPATH=-Wl,-rpath=$(NATIVE_ROOT_PATH)/lib
|
||||
+HOST_CXXFLAGS += \
|
||||
+ -I. \
|
||||
+ -I@abs_top_srcdir@/lib \
|
||||
+ -I@abs_top_srcdir@/xbmc \
|
||||
+ -I@abs_top_srcdir@/xbmc/linux \
|
||||
+ -I$(HOST_ROOT_PATH)/include
|
||||
+
|
||||
+RPATH=-Wl,-rpath=$(HOST_ROOT_PATH)/lib
|
||||
|
||||
-ifeq (@USE_TEXTUREPACKER_NATIVE@,1)
|
||||
-NATIVE_ROOT_PATH=@USE_TEXTUREPACKER_NATIVE_ROOT@
|
||||
-ifdef NATIVE_ROOT_PATH
|
||||
ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
|
||||
DEFINES += -DTARGET_DARWIN
|
||||
NATIVE_ARCH=@DARWIN_NATIVE_ARCH@
|
||||
RPATH=
|
||||
endif
|
||||
-NATIVE_CXXFLAGS+= -I. \
|
||||
- -I$(NATIVE_ROOT_PATH)/include \
|
||||
- -I@abs_top_srcdir@/lib \
|
||||
- -I@abs_top_srcdir@/xbmc \
|
||||
- -I@abs_top_srcdir@/xbmc/linux
|
||||
-NATIVE_LIBS += -L$(NATIVE_ROOT_PATH)/lib
|
||||
-endif
|
||||
-NATIVE_LIBS += -lSDL_image -lSDL -llzo2
|
||||
-NATIVE_LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish-native
|
||||
-else
|
||||
-LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish
|
||||
-endif
|
||||
-
|
||||
-LIBS += -lSDL_image -lSDL -llzo2
|
||||
-
|
||||
-SRCS = \
|
||||
- md5.cpp \
|
||||
- SDL_anigif.cpp \
|
||||
- XBTFWriter.cpp \
|
||||
- XBMCTex.cpp \
|
||||
- @abs_top_srcdir@/xbmc/guilib/XBTF.cpp
|
||||
-
|
||||
-
|
||||
-TARGET = TexturePacker
|
||||
-CLEAN_FILES=$(TARGET)
|
||||
-
|
||||
-all: $(TARGET)
|
||||
|
||||
ifeq (@USE_TEXTUREPACKER_NATIVE@,1)
|
||||
# TexturePacker run native on build system, build it with native tools
|
||||
$(TARGET): $(SRCS) @abs_top_srcdir@/xbmc/guilib/XBTF.h
|
||||
- g++ $(DEFINES) $(NATIVE_ARCH) $(NATIVE_CXXFLAGS) $(SRCS) $(NATIVE_LIBS) $(RPATH) -o $(TARGET)
|
||||
+ make -C @abs_top_srcdir@/lib/libsquish libsquish-native.so
|
||||
+ $(HOST_CXX) $(DEFINES) $(NATIVE_ARCH) $(HOST_CXXFLAGS) $(SRCS) $(HOST_LIBS) $(RPATH) -o $(TARGET)
|
||||
clean:
|
||||
rm -f $(TARGET)
|
||||
else
|
|
@ -0,0 +1,116 @@
|
|||
# Template file for 'xbmc-rpi'
|
||||
pkgname=xbmc-rpi
|
||||
version=12.3
|
||||
revision=1
|
||||
patch_args="-Np1"
|
||||
wrksrc="xbmc-${version}-Frodo"
|
||||
short_desc="XBMC Media Center for the Raspberry Pi"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
homepage="http://www.xbmc.org"
|
||||
license="GPL-2"
|
||||
distfiles="http://mirrors.xbmc.org/releases/source/xbmc-$version.tar.gz"
|
||||
checksum=3e15c960d034efdea5f92a7b74716cb48094842d077b076025fd8640754ede73
|
||||
|
||||
only_for_archs="armv6l"
|
||||
# Due to bootstrap requiring java, it's only possible currently to cross
|
||||
# compile it from x86.
|
||||
if [ "$XBPS_MACHINE" != "i686" -a "$XBPS_MACHINE" != "x86_64" ]; then
|
||||
msg_error "${pkgname}-${version}: can only be cross built on x86."
|
||||
fi
|
||||
|
||||
#broken_as_needed=yes
|
||||
|
||||
hostmakedepends="
|
||||
automake libtool pkg-config gperf cmake zip unzip nasm yasm
|
||||
swig jre which gettext-devel libltdl-devel python-devel libmysqlclient-devel
|
||||
SDL_image-devel lzo-devel"
|
||||
makedepends="
|
||||
libudev-devel>=183 pcre-devel>=8.30 expat-devel libpng-devel>=1.6 libjpeg-turbo-devel
|
||||
avahi-libs-devel alsa-lib-devel samba-devel tiff-devel libmysqlclient-devel>=5.5.27
|
||||
libmpeg2-devel wavpack-devel zlib-devel lzo-devel fribidi-devel sqlite-devel freetype-devel
|
||||
jasper-devel faac-devel faad2-devel libmodplug-devel openssl-devel libass-devel
|
||||
libmad-devel fontconfig-devel libsamplerate-devel libmms-devel libcurl-devel
|
||||
enca-devel boost-devel libbluetooth-devel yajl-devel libplist-devel librtmp-devel
|
||||
tinyxml-devel taglib-devel libcap-devel lame-devel libnfs-devel systemd-devel
|
||||
libcec-devel libbluray-devel libmicrohttpd-devel libcdio-devel python-devel
|
||||
libdvdread-devel libssh-devel rpi-firmware"
|
||||
makedepends+=" udisks2 upower hicolor-icon-theme desktop-file-utils"
|
||||
# The following dependencies are dlopen(3)ed.
|
||||
depends="libbluray libmad libogg libcurl libflac libmodplug libass libmpeg2 lame librtmp libnfs libplist"
|
||||
depends+=" udisks2 upower hicolor-icon-theme desktop-file-utils"
|
||||
|
||||
provides="xbmc-${version}_${revision}"
|
||||
# Create xbmc system user to launch xbmc-standalone.
|
||||
system_accounts="xbmc"
|
||||
xbmc_homedir="/var/lib/xbmc"
|
||||
xbmc_groups="audio,video"
|
||||
|
||||
pre_configure() {
|
||||
. /etc/profile.d/jre.sh
|
||||
./bootstrap
|
||||
|
||||
# fix lsb_release dependency
|
||||
sed -i -e 's:/usr/bin/lsb_release -d:/bin/true:' xbmc/utils/SystemInfo.cpp
|
||||
|
||||
# Use cross prefix for python include/libdir.
|
||||
sed -e "s,-L\$ac_python_libdir,-L${XBPS_CROSS_BASE}/usr/lib,g" -i configure
|
||||
sed -e "s,PYTHON_CPPFLAGS=\$python_path,PYTHON_CPPFLAGS=-I${XBPS_CROSS_BASE}/usr/include/python2.7,g" -i configure
|
||||
}
|
||||
|
||||
do_configure() {
|
||||
. /etc/profile.d/jre.sh
|
||||
CFLAGS="-O3 -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -mabi=aapcs-linux"
|
||||
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/ -I${XBPS_CROSS_BASE}/opt/vc/include/IL"
|
||||
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vcos/pthreads"
|
||||
CFLAGS+=" -I${XBPS_CROSS_BASE}/opt/vc/include/interface/vmcs_host/linux"
|
||||
CXXFLAGS="$CFLAGS"
|
||||
LDFLAGS+=" -L${XBPS_CROSS_BASE}/opt/vc/lib"
|
||||
|
||||
export CFLAGS CXXFLAGS LDFLAGS
|
||||
|
||||
./configure ${configure_args} \
|
||||
--disable-gl \
|
||||
--enable-gles \
|
||||
--disable-sdl \
|
||||
--disable-x11 \
|
||||
--disable-xrandr \
|
||||
--disable-openmax \
|
||||
--disable-joystick \
|
||||
--disable-debug \
|
||||
--disable-crystalhd \
|
||||
--disable-vtbdecoder \
|
||||
--disable-vaapi \
|
||||
--disable-vdpau \
|
||||
--disable-pulse \
|
||||
--disable-projectm \
|
||||
--with-platform=raspberry-pi \
|
||||
--enable-dvdcss \
|
||||
--enable-optical-drive \
|
||||
--enable-libbluray \
|
||||
--enable-optimizations \
|
||||
--enable-libcec \
|
||||
--enable-player=omxplayer
|
||||
|
||||
sed -e "s,\$(DVDREAD_CFLAGS),,g;s,AR=ar,AR=$AR,g;s,LD=ld,LD=$LD,g;s,RANLIB=ranlib,RANLIB=$RANLIB,g" -i lib/libdvd/libdvd{nav,read}/Makefile
|
||||
sed -e 's,-L/usr/lib,,g' -i lib/cmyth/Makefile
|
||||
}
|
||||
|
||||
do_build() {
|
||||
make ${makejobs}
|
||||
}
|
||||
|
||||
do_install() {
|
||||
make DESTDIR=${DESTDIR} install
|
||||
|
||||
# Remove checks that don't apply to the raspberry pi
|
||||
head -n 171 ${DESTDIR}/usr/share/xbmc/FEH.py > ${DESTDIR}/usr/share/xbmc/FEH.py.new
|
||||
mv ${DESTDIR}/usr/share/xbmc/FEH.py.new ${DESTDIR}/usr/share/xbmc/FEH.py
|
||||
|
||||
vinstall tools/Linux/xbmc.desktop 644 usr/share/applications
|
||||
vinstall tools/Linux/xbmc-48x48.png 644 usr/share/pixmaps xbmc.png
|
||||
|
||||
rm -f ${DESTDIR}/usr/share/icons/hicolor/icon-theme.cache
|
||||
|
||||
vinstall ${FILESDIR}/xbmc.service 0644 usr/lib/systemd/system
|
||||
vinstall ${FILESDIR}/polkit.rules 0644 etc/polkit-1/rules.d 10-xbmc.rules
|
||||
}
|
Loading…
Reference in New Issue