~team-xbmc/xbmc/debian-karmic

1 by Oumar Aziz OUATTARA
initial for gutsy
1
#!/usr/bin/make -f
2
# -*- makefile -*-
3
# Sample debian/rules that uses debhelper.
4
#
5
# This file was originally written by Joey Hess and Craig Small.
6
# As a special exception, when this file is copied by dh-make into a
7
# dh-make output file, you may use that output file without restriction.
8
# This special exception was added by Craig Small in version 0.37 of dh-make.
9
#
10
# Modified to make a template file for a multi-binary package with separated
11
# build-arch and build-indep targets  by Bill Allombert 2001
12
13
# Uncomment this to turn on verbose mode.
14
#export DH_VERBOSE=1
15
16
# This has to be exported to make some magic below work.
17
export DH_OPTIONS
18
19
# These are used for cross-compiling and for saving the configure script
20
# from having to guess our platform (since we know it already)
21
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
22
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
41 by Oumar Aziz OUATTARA
Add the svn version into XBMC
23
#get the svnversion if the file exists
24
ifneq "$(shell cat debian/svnrevision)" ""
25
SVNVERSION ?= $(shell cat debian/svnrevision)
26
endif
1 by Oumar Aziz OUATTARA
initial for gutsy
27
72.1.25 by Oumar Aziz OUATTARA (alias wattazoum)
add configuration to rules
28
configure: patch bootstrap
29
	./bootstrap
30
31
config.status: configure
1 by Oumar Aziz OUATTARA
initial for gutsy
32
	dh_testdir
33
	# Add here commands to configure the package.
34
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
35
	cp -f /usr/share/misc/config.sub config.sub
36
endif
37
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
38
	cp -f /usr/share/misc/config.guess config.guess
39
endif
48.1.38 by Oumar Aziz OUATTARA
fix xbmc-live
40
	cp tools/XBMCLive/xbmc debian/xbmc-live.init
85 by Oumar Aziz OUATTARA
merge xbmc-standalone and xbmc-live
41
	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --enable-vdpau --enable-avahi SVN_REV="$(SVNVERSION)"
1 by Oumar Aziz OUATTARA
initial for gutsy
42
43
#Architecture 
44
build: build-arch
45
46
build-arch: build-arch-stamp
47
build-arch-stamp:  config.status
48
49
	# Add here commands to compile the arch part of the package.
13.1.53 by Oumar Aziz Ouattara (alias wattazoum)
remove the make multiple jobs
50
	$(MAKE)
1 by Oumar Aziz OUATTARA
initial for gutsy
51
	touch $@
52
33 by Oumar Aziz OUATTARA
Add x86_64 support
53
build-indep: build-indep-stamp
54
build-indep-stamp:  config.status
55
56
	# Add here commands to compile the indep part of the package.
57
	#$(MAKE) doc
58
	touch $@
59
13.1.52 by Oumar Aziz Ouattara (alias wattazoum)
Add a patch for string fixes
60
clean: clean-patched unpatch
48.1.38 by Oumar Aziz OUATTARA
fix xbmc-live
61
	rm -f debian/xbmc-live.init
62
13.1.52 by Oumar Aziz Ouattara (alias wattazoum)
Add a patch for string fixes
63
clean-patched:
1 by Oumar Aziz OUATTARA
initial for gutsy
64
	dh_testdir
65
	dh_testroot
33 by Oumar Aziz OUATTARA
Add x86_64 support
66
	rm -f build-arch-stamp build-indep-stamp 
1 by Oumar Aziz OUATTARA
initial for gutsy
67
68
	# Add here commands to clean up after the build process.
13.1.35 by Oumar Aziz OUATTARA
added others packages : xbmc-web-*
69
	#$(MAKE) distclean
1 by Oumar Aziz OUATTARA
initial for gutsy
70
	rm -f config.sub config.guess
71
72
	dh_clean 
73
13.1.52 by Oumar Aziz Ouattara (alias wattazoum)
Add a patch for string fixes
74
patch: patch-stamp
75
patch-stamp:
76
	dpatch apply-all
77
	dpatch cat-all >patch-stamp
78
79
unpatch:
80
	dpatch deapply-all
81
	rm -rf patch-stamp debian/patched
82
83
33 by Oumar Aziz OUATTARA
Add x86_64 support
84
install: install-indep install-arch
85
install-indep:
13.1.36 by Oumar Aziz OUATTARA
no need for install-indep
86
87
install-arch:
13.1.12 by Oumar Aziz OUATTARA
libbz2 added
88
	dh_testdir
89
	dh_testroot
13.1.36 by Oumar Aziz OUATTARA
no need for install-indep
90
	dh_clean -k -s 
91
	dh_installdirs -s
13.1.12 by Oumar Aziz OUATTARA
libbz2 added
92
93
	# Add here commands to install the arch part of the package into 
94
	# debian/tmp/usr/share/xbmc
72.1.19 by Oumar Aziz OUATTARA (alias wattazoum)
add install-web to rules
95
	make install install-web install-livedatas prefix=$(CURDIR)/debian/tmp/usr/
104 by Oumar Aziz OUATTARA (alias wattazoum)
update xbmc-live files
96
	mkdir -p $(CURDIR)/debian/tmp/etc/init/
97
	cp $(CURDIR)/tools/XBMCLive/xbmc-live.conf $(CURDIR)/debian/tmp/etc/init/
98
	cp $(CURDIR)/tools/XBMCLive/xbmc-live-install.conf $(CURDIR)/debian/tmp/etc/init/
99
	
13.1.49 by Oumar Aziz Ouattara (alias wattazoum)
Fix wii eventclient build
100
	make eventclients prefix=$(CURDIR)/debian/tmp/usr/ installdir=/usr WII_EXTRA_OPTS=-DCWIID_OLD
13.1.12 by Oumar Aziz OUATTARA
libbz2 added
101
	mkdir -p $(CURDIR)/debian/tmp/usr/share/applications $(CURDIR)/debian/tmp/usr/share/pixmaps
31 by Oumar Aziz OUATTARA
2.1 alpha 2
102
	cp -a $(CURDIR)/tools/Linux/xbmc.png $(CURDIR)/debian/tmp/usr/share/pixmaps/
103
	cp -a $(CURDIR)/tools/Linux/xbmc.desktop $(CURDIR)/debian/tmp/usr/share/applications/
13.1.12 by Oumar Aziz OUATTARA
libbz2 added
104
13.1.36 by Oumar Aziz OUATTARA
no need for install-indep
105
	dh_install -s --sourcedir=$(CURDIR)/debian/tmp
106
	
13.1.35 by Oumar Aziz OUATTARA
added others packages : xbmc-web-*
107
	# XBMC WEB PM
108
	mkdir -p $(CURDIR)/debian/xbmc-web-pm/usr/share/xbmc/web
48.1.44 by Oumar Aziz Ouattara (alias wattazoum)
modify install web
109
	cp -a  $(CURDIR)/web/Project_Mayhem -d $(CURDIR)/debian/xbmc-web-pm/usr/share/xbmc/web
110
	# XBMC WEB PM 3
111
	mkdir -p $(CURDIR)/debian/xbmc-web-pm3/usr/share/xbmc/web
112
	cp -a  $(CURDIR)/web/Project_Mayhem_III -d $(CURDIR)/debian/xbmc-web-pm/usr/share/xbmc/web
13.1.35 by Oumar Aziz OUATTARA
added others packages : xbmc-web-*
113
	# XBMC WEB Iphone
72.1.20 by Oumar Aziz OUATTARA (alias wattazoum)
fix copy iphone-web
114
	mkdir -p $(CURDIR)/debian/xbmc-web-iphone-tlrobinson/usr/share/xbmc
48.1.44 by Oumar Aziz Ouattara (alias wattazoum)
modify install web
115
	cp -a $(CURDIR)/web/xbmciphone -d $(CURDIR)/debian/xbmc-web-iphone-tlrobinson/usr/share/xbmc/web
13.1.41 by Oumar Aziz OUATTARA
build error : mkdir missing
116
	mkdir -p $(CURDIR)/debian/xbmc-web-iphone-tlrobinson/usr/share/doc/xbmc-web-iphone-tlrobinson/ 
13.1.35 by Oumar Aziz OUATTARA
added others packages : xbmc-web-*
117
	mv $(CURDIR)/debian/xbmc-web-iphone-tlrobinson/usr/share/xbmc/web/README $(CURDIR)/debian/xbmc-web-iphone-tlrobinson/usr/share/doc/xbmc-web-iphone-tlrobinson/
118
	
1 by Oumar Aziz OUATTARA
initial for gutsy
119
# Must not depend on anything. This is to be called by
120
# binary-arch/binary-indep
121
# in another 'make' thread.
122
binary-common:
123
	dh_testdir
124
	dh_testroot
125
	dh_installchangelogs 
126
	dh_installdocs
25 by Oumar Aziz OUATTARA
added dh_installexamples
127
	dh_installexamples
48.1.37 by Oumar Aziz OUATTARA
xbmc live package
128
	dh_installinit
13.1.6 by Oumar Aziz OUATTARA
event client added
129
	dh_pysupport
1 by Oumar Aziz OUATTARA
initial for gutsy
130
	dh_link
13.1.44 by Oumar Aziz OUATTARA
keep debug symbols embedded
131
#	dh_strip -X.so -X.a --dbg-package=xbmc-common-dbg
84 by Oumar Aziz OUATTARA (alias wattazoum)
reinsert debug symbols
132
	dh_strip --dbg-package=xbmc-common-dbg
1 by Oumar Aziz OUATTARA
initial for gutsy
133
	dh_fixperms
134
	dh_installdeb
135
	dh_gencontrol
136
	dh_md5sums
137
	dh_builddeb
33 by Oumar Aziz OUATTARA
Add x86_64 support
138
# Build architecture independant packages using the common target.
139
binary-indep: build-indep install-indep
140
	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
141
	
1 by Oumar Aziz OUATTARA
initial for gutsy
142
# Build architecture dependant packages using the common target.
143
binary-arch: build-arch install-arch
144
	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
145
33 by Oumar Aziz OUATTARA
Add x86_64 support
146
binary: binary-arch binary-indep
147
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch