Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 152 lines (133 sloc) 4.608 kB
#!/usr/bin/make -f
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
# Set this variable to yes for release builds to disable debugging and enable
# optimizations.
# NOTE: DEB_BUILD_OPTIONS must have 'nostrip' otherwise debugging symbols will
# be stripped from binaries.
XBMC_RELEASE ?= yes
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
XBMC_RELEASE ?= no
endif
# Whether we're building for release or not
ifeq (yes,$(XBMC_RELEASE))
DEBUG_OPTIONS = --disable-debug --enable-optimizations
else
DEBUG_OPTIONS = --enable-debug --disable-optimizations
endif
ifeq (,$(filter i386 amd64,$(DEB_HOST_ARCH)))
ARCH_SPECIFIC_OPTIONS = --disable-crystalhd
else
ARCH_SPECIFIC_OPTIONS = --enable-crystalhd
ARCH_SPECIFIC_LIB_RECOMMENDS = -lcrystalhd
endif
# Enable gles for armel
ifeq (,$(filter armel,$(DEB_HOST_ARCH)))
GL_CONFIG_OPTIONS = --enable-gl --disable-gles
else
GL_CONFIG_OPTIONS = --disable-gl --enable-gles
endif
# Various environment variables to set
DEB_CFLAGS ?= $(shell dpkg-buildflags --get CPPFLAGS) \
$(filter-out -g -O2, $(shell dpkg-buildflags --get CFLAGS))
DEB_CXXFLAGS ?= $(shell dpkg-buildflags --get CPPFLAGS) \
$(filter-out -g -O2, $(shell dpkg-buildflags --get CXXFLAGS))
DEB_LDFLAGS ?= $(shell dpkg-buildflags --get LDFLAGS)
ENV_OPTIONS = CFLAGS="$(DEB_CFLAGS)" CXXFLAGS="$(DEB_CXXFLAGS)" \
LDFLAGS="$(DEB_LDFLAGS)"
# List of options to pass to configure. Can be overridden.
# Extra options can simply be passed using XBMC_CONFIG_EXTRA_OPTIONS env
# variable.
XBMC_CONFIG_OPTIONS ?= --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr --docdir=/usr/share/doc/xbmc \
$(DEBUG_OPTIONS) \
$(GL_CONFIG_OPTIONS) \
--enable-vdpau \
--disable-vdadecoder \
--disable-vtbdecoder \
--disable-openmax \
--disable-tegra \
--disable-profiling \
--enable-joystick \
--enable-xrandr \
--disable-ccache \
--enable-pulse \
--enable-rtmp \
--enable-ffmpeg-libvorbis \
--disable-mid \
--enable-hal \
--enable-avahi \
--disable-asap-codec \
--enable-webserver \
--enable-optical-drive \
--enable-texturepacker \
--enable-nfs \
--enable-libcec \
--disable-afpclient \
--enable-airtunes \
--disable-external-libraries \
--disable-dvdcss \
--disable-non-free \
$(ARCH_SPECIFIC_OPTIONS) \
$(XBMC_CONFIG_EXTRA_OPTIONS) \
$(ENV_OPTIONS)
# Use --parallel option only if debhelper supports it
DH_PARALLEL_OPT=$(shell dh_testdir --parallel 2>/dev/null && echo "--parallel")
# Used to show what config options are enabled
show-xbmc-config-options:
$(info $(XBMC_CONFIG_OPTIONS))
%:
dh $@ $(DH_PARALLEL_OPT)
override_dh_clean:
dh_clean libtool xbmc/config.h xbmc/stamp-h1
find . -name config.status -o -name config.cache -o -name config.log \
-exec rm -f "{}" \;
override_dh_auto_configure: configure
./configure $(XBMC_CONFIG_OPTIONS)
override_dh_auto_install:
$(MAKE) -C lib/addons/script.module.pil
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
$(MAKE) eventclients DESTDIR=$(CURDIR)/debian/tmp \
WII_EXTRA_OPTS=-DCWIID_OLD
override_dh_install:
dh_install --sourcedir=$(CURDIR)/debian/tmp -XLICENCE \
-XLicence.txt -XLicense.txt -XLiberationSans-Regular.ttf \
-XDejaVuSans.ttf -XDejaVuSans-Bold.ttf -XLICENSE.txt
override_dh_makeshlibs:
# We don't install shared libraries in standard locations so don't run
# dh_makeshlibs
override_dh_shlibdeps: debian/tmp/xbmc-bin-depends-dummy.so debian/tmp/xbmc-bin-recommends-dummy.so
dh_shlibdeps -a -O--parallel \
-l$(CURDIR)/debian/xbmc-bin/usr/lib/xbmc/system/players/dvdplayer
# Need to manually add dependencies for dlopened libs.
dpkg-shlibdeps -pdlopenlibs -edebian/tmp/xbmc-bin-depends-dummy.so -xlibc6 -O >>debian/xbmc-bin.substvars
dpkg-shlibdeps -dRecommends -edebian/tmp/xbmc-bin-recommends-dummy.so -xlibc6 -O >>debian/xbmc-bin.substvars
debian/tmp/xbmc-bin-depends-dummy.so:
mkdir -p debian/tmp
cc -xc -shared -Wl,--no-as-needed -o $@ /dev/null \
-lcurl-gnutls
debian/tmp/xbmc-bin-recommends-dummy.so:
mkdir -p debian/tmp
cc -xc -shared -Wl,--no-as-needed -o $@ /dev/null \
-lass \
-lbluray \
-lcec \
-lFLAC \
-lmad \
-lmodplug \
-lmp3lame \
-lmpeg2 \
-lnfs \
-logg \
-lplist \
-lrtmp \
-lshairport \
-lvdpau \
-lvorbis \
-lvorbisenc \
-lvorbisfile \
$(ARCH_SPECIFIC_LIB_RECOMMENDS)
Jump to Line
Something went wrong with that request. Please try again.