/debian/xbmc

To get this branch, use:
bzr branch /bzr/debian/xbmc

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Michael Gorven
  • Date: 2012-08-01 08:34:28
  • Revision ID: mgorven@nimbula.com-20120801063428-ac4zwntl5c25e8pj
Import xbmc_11.0~git20120510.82388d5-1.debian.tar.gz.
cb1cd27e67b4fc8119dfe3f970aa61c00b436198c5ebacbde0a797371fff4db7  

Show diffs side-by-side

added added

removed removed

 
1
#!/usr/bin/make -f
 
2
 
 
3
# These are used for cross-compiling and for saving the configure script
 
4
# from having to guess our platform (since we know it already)
 
5
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
6
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
7
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
8
 
 
9
# Set this variable to yes for release builds to disable debugging and enable
 
10
# optimizations.
 
11
# NOTE: DEB_BUILD_OPTIONS must have 'nostrip' otherwise debugging symbols will
 
12
# be stripped from binaries.
 
13
XBMC_RELEASE ?= yes
 
14
ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
15
XBMC_RELEASE ?= no
 
16
endif
 
17
 
 
18
# Whether we're building for release or not
 
19
ifeq (yes,$(XBMC_RELEASE))
 
20
  DEBUG_OPTIONS = --disable-debug --enable-optimizations
 
21
else
 
22
  DEBUG_OPTIONS = --enable-debug --disable-optimizations
 
23
endif
 
24
 
 
25
ifeq (,$(filter i386 amd64,$(DEB_HOST_ARCH)))
 
26
  ARCH_SPECIFIC_OPTIONS = --disable-crystalhd
 
27
else
 
28
  ARCH_SPECIFIC_OPTIONS = --enable-crystalhd
 
29
  ARCH_SPECIFIC_LIB_RECOMMENDS = -lcrystalhd
 
30
endif
 
31
 
 
32
# Enable gles for armel
 
33
ifeq (,$(filter armel,$(DEB_HOST_ARCH)))
 
34
GL_CONFIG_OPTIONS = --enable-gl --disable-gles
 
35
else
 
36
GL_CONFIG_OPTIONS = --disable-gl --enable-gles
 
37
endif
 
38
 
 
39
# Various environment variables to set
 
40
ENV_OPTIONS = CFLAGS="$(DEB_CFLAGS)" CXXFLAGS="$(DEB_CXXFLAGS)"
 
41
 
 
42
# List of options to pass to configure. Can be overridden.
 
43
# Extra options can simply be passed using XBMC_CONFIG_EXTRA_OPTIONS env
 
44
# variable.
 
45
XBMC_CONFIG_OPTIONS ?= --host=$(DEB_HOST_GNU_TYPE) \
 
46
  --build=$(DEB_BUILD_GNU_TYPE) \
 
47
  --prefix=/usr --docdir=/usr/share/doc/xbmc \
 
48
  $(DEBUG_OPTIONS) \
 
49
  $(GL_CONFIG_OPTIONS) \
 
50
  --enable-vdpau \
 
51
  --disable-vdadecoder \
 
52
  --disable-vtbdecoder \
 
53
  --disable-openmax \
 
54
  --disable-tegra \
 
55
  --disable-profiling \
 
56
  --enable-joystick \
 
57
  --enable-xrandr \
 
58
  --disable-ccache \
 
59
  --enable-pulse \
 
60
  --enable-rtmp \
 
61
  --enable-ffmpeg-libvorbis \
 
62
  --disable-mid \
 
63
  --enable-hal \
 
64
  --enable-avahi \
 
65
  --disable-asap-codec \
 
66
  --enable-webserver \
 
67
  --enable-optical-drive \
 
68
  --enable-texturepacker \
 
69
  --enable-nfs \
 
70
  --enable-libcec \
 
71
  --disable-afpclient \
 
72
  --enable-airtunes \
 
73
  --enable-external-libraries \
 
74
  --disable-dvdcss \
 
75
  --disable-non-free \
 
76
  $(ARCH_SPECIFIC_OPTIONS) \
 
77
  $(XBMC_CONFIG_EXTRA_OPTIONS) \
 
78
  $(ENV_OPTIONS)
 
79
 
 
80
# Use --parallel option only if debhelper supports it
 
81
DH_PARALLEL_OPT=$(shell dh_testdir --parallel 2>/dev/null && echo "--parallel")
 
82
 
 
83
# Used to show what config options are enabled
 
84
show-xbmc-config-options:
 
85
        $(info $(XBMC_CONFIG_OPTIONS))
 
86
 
 
87
%:
 
88
        dh $@ $(DH_PARALLEL_OPT)
 
89
 
 
90
override_dh_clean:
 
91
        dh_clean libtool xbmc/config.h xbmc/stamp-h1
 
92
        find . -name config.status -o -name config.cache -o -name config.log \
 
93
                -exec rm -f "{}" \;
 
94
 
 
95
override_dh_auto_configure: configure
 
96
        ./configure $(XBMC_CONFIG_OPTIONS)
 
97
 
 
98
override_dh_auto_install:
 
99
        $(MAKE) -C lib/addons/script.module.pil
 
100
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
 
101
        $(MAKE) eventclients DESTDIR=$(CURDIR)/debian/tmp \
 
102
                WII_EXTRA_OPTS=-DCWIID_OLD
 
103
 
 
104
override_dh_install:
 
105
        dh_install --sourcedir=$(CURDIR)/debian/tmp -XLICENCE \
 
106
                -XLicence.txt -XLicense.txt -XLiberationSans-Regular.ttf \
 
107
                -XDejaVuSans.ttf -XDejaVuSans-Bold.ttf -XLICENSE.txt
 
108
 
 
109
override_dh_makeshlibs:
 
110
        # We don't install shared libraries in standard locations so don't run
 
111
        # dh_makeshlibs
 
112
 
 
113
override_dh_shlibdeps: debian/tmp/xbmc-bin-depends-dummy.so debian/tmp/xbmc-bin-recommends-dummy.so
 
114
        dh_shlibdeps -a -O--parallel \
 
115
                -l$(CURDIR)/debian/xbmc-bin/usr/lib/xbmc/system/players/dvdplayer
 
116
        # Need to manually add dependencies for dlopened libs.
 
117
        dpkg-shlibdeps -pdlopenlibs -edebian/tmp/xbmc-bin-depends-dummy.so -xlibc6 -O >>debian/xbmc-bin.substvars
 
118
        dpkg-shlibdeps -dRecommends -edebian/tmp/xbmc-bin-recommends-dummy.so -xlibc6 -O >>debian/xbmc-bin.substvars
 
119
 
 
120
debian/tmp/xbmc-bin-depends-dummy.so:
 
121
        mkdir -p debian/tmp
 
122
        cc -xc -shared -Wl,--no-as-needed -o $@ /dev/null \
 
123
                -lcurl-gnutls
 
124
 
 
125
debian/tmp/xbmc-bin-recommends-dummy.so:
 
126
        mkdir -p debian/tmp
 
127
        cc -xc -shared -Wl,--no-as-needed -o $@ /dev/null \
 
128
                -lass \
 
129
                -lbluray \
 
130
                -lcec \
 
131
                -lFLAC \
 
132
                -lmad \
 
133
                -lmodplug \
 
134
                -lmp3lame \
 
135
                -lmpeg2 \
 
136
                -lnfs \
 
137
                -logg \
 
138
                -lplist \
 
139
                -lrtmp \
 
140
                -lshairport \
 
141
                -lvdpau \
 
142
                -lvorbis \
 
143
                -lvorbisenc \
 
144
                -lvorbisfile \
 
145
                $(ARCH_SPECIFIC_LIB_RECOMMENDS)