~mozillateam/songbird/songbird.head

1 by Fabien Tassin
* Initial revision
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_BUILD_ARCH     ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
8
9
DEB_APPNAME    := songbird
10
SRC_DIR        := $(CURDIR)/build-tree/$(DEB_APPNAME)
56 by Fabien Tassin
* Drop the code pulling xulrunner from upstream cvs and pull the patched
11
XUL_SRC_DIR    := $(SRC_DIR)/dependencies/vendor/xulrunner/mozilla
1 by Fabien Tassin
* Initial revision
12
DEB_TAR_SRCDIR := $(DEB_APPNAME)
13
DEB_SB_DIR     := /usr/lib/$(DEB_APPNAME)
14
15
WANT_DEBUG_BUILD = 0
20 by Fabien Tassin
* Add a know to move to system xul, disabled for now
16
WANT_SYSTEM_XUL  = 0
1 by Fabien Tassin
* Initial revision
17
18
DEBIAN_VERSION          := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\(.*\)$$/\1/ p')
19
DEBIAN_UPSTREAM_VERSION := $(shell echo $(DEBIAN_VERSION) | sed 's/^\(.*\)-[^-]*$$/\1/')
20
DEBIAN_REVISION         := $(shell echo $(DEBIAN_VERSION) | sed 's/^.*r\([^-]*\).*/\1/')
21
DEBIAN_DATE             ?= $(shell echo $(DEBIAN_VERSION) | sed 's/^.*svn\([0-9]*\).*$$/\1/')
22
MACHINE                 := $(shell uname -m)
23
53 by Fabien Tassin
* Remove debug code, we have a winner!
24
include /usr/share/cdbs/1/rules/tarball.mk
1 by Fabien Tassin
* Initial revision
25
include /usr/share/cdbs/1/rules/debhelper.mk
26
27
GARBAGE      = $(NULL)
28
20 by Fabien Tassin
* Add a know to move to system xul, disabled for now
29
ifeq (1,$(WANT_SYSTEM_XUL))
30
pre-build:: patch
31
build: taglib-build $(DEB_APPNAME)-build
32
else
56 by Fabien Tassin
* Drop the code pulling xulrunner from upstream cvs and pull the patched
33
pre-build:: patch
1 by Fabien Tassin
* Initial revision
34
build: xul-build xul-repack taglib-build $(DEB_APPNAME)-build
20 by Fabien Tassin
* Add a know to move to system xul, disabled for now
35
endif
1 by Fabien Tassin
* Initial revision
36
37
XUL_CONFIGURE_FLAGS := \
38
	--enable-application=xulrunner \
29 by Fabien Tassin
* Update xul stub name to songbird-bin, this is now required since
39
	--with-xulrunner-stub-name=$(DEB_APPNAME)-bin \
1 by Fabien Tassin
* Initial revision
40
	--with-default-mozilla-five-home=$(DEB_SB_DIR)/xulrunner \
41
	--disable-tests \
42
	--disable-javaxpcom \
43
	--disable-installer \
84 by Fabien Tassin
* Don't build inspector and venkman
44
	--enable-extensions=default \
1 by Fabien Tassin
* Initial revision
45
	--disable-dbus \
46
	--enable-jemalloc \
47
	--disable-crashreporter \
48
	--enable-system-cairo \
49
	--with-system-nspr \
50
	--with-system-nss \
51
	--with-system-zlib=/usr \
52
	--with-system-bz2=/usr \
53
	$(NULL)
54
82 by Fabien Tassin
* Bump the requirement for system libsqlite to >= 3.6.7
55
USE_SYSTEM_SQLITE :=  $(shell pkg-config --exists 'sqlite3 >= 3.6.7'; a=$$?; if test $$a != 1; then echo 1; fi)
1 by Fabien Tassin
* Initial revision
56
ifeq (1,$(USE_SYSTEM_SQLITE))
57
   XUL_CONFIGURE_FLAGS += --enable-system-sqlite
58
else
59
   XUL_CONFIGURE_FLAGS += --disable-system-sqlite
60
endif
61
57 by Fabien Tassin
* Use system hunspell or not (while building xulrunner) based on its version
62
USE_SYSTEM_HUNSPELL := $(shell pkg-config --exists 'hunspell >= 1.2'; a=$$?; if test $$a != 1; then echo 1; fi)
63
ifeq (1,$(USE_SYSTEM_HUNSPELL))
64
   XUL_CONFIGURE_FLAGS += --enable-system-hunspell
65
else
66
   XUL_CONFIGURE_FLAGS += --disable-system-hunspell
67
endif
68
1 by Fabien Tassin
* Initial revision
69
XUL_CONFIGURE_ENV := \
70
	MOZ_DEBUG_SYMBOLS=1 \
71
	MOZILLA_OFFICIAL=1 \
72
	BUILD_OFFICIAL=1 \
73
	CONFIGURE_ARGS="$(XUL_CONFIGURE_FLAGS)" \
74
	$(NULL)
75
76
ifeq (1,$(WANT_DEBUG_BUILD))
77
  XUL_RELEASE         := debug
78
  XUL_CONFIGURE_FLAGS += --enable-debug --disable-optimize --disable-strip --disable-strip-libs --disable-install-strip
79
else
80
  XUL_RELEASE         := release
81
  XUL_CONFIGURE_FLAGS += --disable-debug --enable-optimize --disable-strip --disable-strip-libs --disable-install-strip
82
  XUL_CONFIGURE_ENV   += CFLAGS="-gstabs+" CXXFLAGS="-gstabs+"
83
endif
84
85
XUL_BUILD_VARS := \
86
	MOZ_OBJDIR=$(XUL_SRC_DIR)/compiled/xulrunner-$(XUL_RELEASE) \
87
	$(NULL)
88
89
SB_CONFIGURE_ENV := \
90
	SONGBIRD_OFFICIAL=1 \
91
	$(NULL)
92
93
SB_CONFIGURE_FLAGS := \
94
	--disable-tests \
95
	--disable-breakpad \
85 by Fabien Tassin
* Build songbird with --with-extensions=systray
96
	--with-extensions=systray \
1 by Fabien Tassin
* Initial revision
97
	$(NULL)
98
97 by Fabien Tassin
* We now need gstreamer-0.10 >= 0.10.20 which hardy doesn't have.
99
USE_SYSTEM_GST := $(shell pkg-config --exists 'gstreamer-0.10 >= 0.10.20'; a=$$?; if test $$a != 1; then echo 1; fi)
100
ifeq (1,$(USE_SYSTEM_GST))
101
  SB_CONFIGURE_FLAGS += --with-media-core=gstreamer-system
102
endif
103
1 by Fabien Tassin
* Initial revision
104
ifeq (1,$(WANT_DEBUG_BUILD))
105
  SB_RELEASE       := debug
106
  SB_CONFIGURE_ENV += DEBUG=1
107
endif
108
109
SB_BUILD_VARS := \
110
	SONGBIRDCONFIG_CONFIGURE_OPTIONS="$(SB_CONFIGURE_FLAGS)" \
72 by Fabien Tassin
* Replace MOZBROWSER_CHECKOUT and MOZBROWSER_UPDATE by SB_DISABLE_PKG_AUTODEPS=0
111
	SB_DISABLE_PKG_AUTODEPS=0 \
1 by Fabien Tassin
* Initial revision
112
	$(NULL)
113
114
NOT_EXECUTABLE = \
115
	-name *.xml -o \
116
	-name *.js -o \
117
	-name *.png -o \
118
	-name *.xpm -o \
119
	-name *.txt -o \
120
	-name LICENSE
121
122
######################################################################
123
124
# we don't use patchsys-quilt.mk from cdbs because it will only work in
125
# one tarball, the one specified in $(DEB_TAR_SRCDIR)
126
.PHONY: patch unpatch
127
patch: debian/stamp-patched
128
debian/stamp-patched:
129
	if [ ! -L patches ] ; then ln -s debian/patches ; fi
130
	quilt push -a || test $$? = 2
131
	touch debian/stamp-patched
132
133
unpatch:
134
	quilt pop -a -R || test $$? = 2
135
	if [ -L patches ] ; then rm patches ; fi
136
	rm -rf .pc
137
	rm -f debian/stamp-patched
138
139
.PHONY: xul-build
140
GARBAGE += xul-build.stamp
141
xul-build: xul-build.stamp
56 by Fabien Tassin
* Drop the code pulling xulrunner from upstream cvs and pull the patched
142
xul-build.stamp:
4 by Fabien Tassin
* Run the scripts with 'sh ./foo' instead of './foo'
143
	@echo "## Building patched xulrunner"
1 by Fabien Tassin
* Initial revision
144
	mkdir -p $(XUL_SRC_DIR)/compiled
145
	cd $(XUL_SRC_DIR) ; $(XUL_CONFIGURE_ENV) $(MAKE) -f client.mk $(XUL_BUILD_VARS) build
146
	touch $@
147
148
.PHONY: xul-repack
149
GARBAGE += xul-repack.stamp
150
xul-repack: xul-repack.stamp
151
xul-repack.stamp: xul-build.stamp
152
	@echo "## Packaging xulrunner for $(DEB_APPNAME)"
153
	rm -rf $(SRC_DIR)/dependencies/linux-$(MACHINE)/mozilla/$(XUL_RELEASE)/
106 by Fabien Tassin
* make-xulrunner-tarball.sh now produces a tar.bz2 file, name it accordingly
154
	rm -f $(SRC_DIR)/dependencies/linux-$(MACHINE)/xulrunner/$(XUL_RELEASE)/xulrunner.tar.bz2
1 by Fabien Tassin
* Initial revision
155
	# Fix permissions
156
	cd $(XUL_SRC_DIR)/compiled/xulrunner-$(XUL_RELEASE) ; \
157
	find . -type f \( $(NOT_EXECUTABLE) \) -perm -u=x -exec chmod -v 644 {} \;
108 by Fabien Tassin
* Follow-up for the previous commit, make-mozilla-sdk.sh has been
158
	cd $(SRC_DIR)/dependencies/vendor/xulrunner ; \
4 by Fabien Tassin
* Run the scripts with 'sh ./foo' instead of './foo'
159
	sh ./make-mozilla-sdk.sh $(XUL_SRC_DIR) $(XUL_SRC_DIR)/compiled/xulrunner-$(XUL_RELEASE) $(SRC_DIR)/dependencies/linux-$(MACHINE)/mozilla/$(XUL_RELEASE)
1 by Fabien Tassin
* Initial revision
160
	mkdir -p $(SRC_DIR)/dependencies/linux-$(MACHINE)/xulrunner/$(XUL_RELEASE)
107 by Fabien Tassin
* There are two copies of make-xulrunner-tarball.sh, call the right one,
161
	cd $(SRC_DIR)/dependencies/vendor/xulrunner ; \
106 by Fabien Tassin
* make-xulrunner-tarball.sh now produces a tar.bz2 file, name it accordingly
162
	sh ./make-xulrunner-tarball.sh $(XUL_SRC_DIR)/compiled/xulrunner-$(XUL_RELEASE)/dist/bin $(SRC_DIR)/dependencies/linux-$(MACHINE)/xulrunner/$(XUL_RELEASE) xulrunner.tar.bz2
1 by Fabien Tassin
* Initial revision
163
	touch $@
3 by Fabien Tassin
* Fix a FTBFS on amd64. We need a libz.a compiled with -fPIC, which debian/ubuntu doesn't do
164
1 by Fabien Tassin
* Initial revision
165
.PHONY: taglib-build
166
GARBAGE += taglib-build.stamp
167
taglib-build: taglib-build.stamp
168
taglib-build.stamp:
169
	@echo "## Building taglib from $(DEB_APPNAME)'s dependencies"
58 by Fabien Tassin
* Update taglib build rules now that songbird changed its way to build it
170
	mkdir -p $(foreach dir,checkout build linux-$(MACHINE),$(SRC_DIR)/deps/$(dir))
66 by Fabien Tassin
* Revert previous commit as songbird doesn't like the 'release' target.
171
	cd $(SRC_DIR)/dependencies/vendor/taglib ; make -f Makefile.songbird $(XUL_RELEASE) SB_VENDOR_BUILD_ROOT=$(SRC_DIR)/deps SB_VENDOR_GENERATE_SYMBOLS=0
58 by Fabien Tassin
* Update taglib build rules now that songbird changed its way to build it
172
	( cd  $(SRC_DIR)/deps ; tar cf - linux-$(MACHINE) ) | ( cd $(SRC_DIR)/dependencies ; tar xf - )
1 by Fabien Tassin
* Initial revision
173
	touch $@
174
175
.PHONY: $(DEB_APPNAME)-build
176
GARBAGE += $(DEB_APPNAME)-build.stamp
177
$(DEB_APPNAME)-build: $(DEB_APPNAME)-build.stamp
178
$(DEB_APPNAME)-build.stamp: xul-repack.stamp taglib-build.stamp
179
	@echo "## Building $(DEB_APPNAME)"
2 by Fabien Tassin
* Disable no_jsm_in_components.patch as it's causing a regression
180
	cd $(SRC_DIR) ; $(SB_CONFIGURE_ENV) $(MAKE) -f songbird.mk $(SB_BUILD_VARS) $(SB_RELEASE)
1 by Fabien Tassin
* Initial revision
181
	# Fix permissions
182
	cd $(SRC_DIR)/compiled/dist ; find . -type f \( $(NOT_EXECUTABLE) \) -perm -u=x -exec chmod -v 644 {} \;
183
	# Fix chrome.manifest
7 by Fabien Tassin
* Fix the chrome.manifest fix, again
184
	for dir in $(SRC_DIR)/compiled/dist/extensions/* ; do if [ ! -f $$dir/chrome.manifest ] ; then \
1 by Fabien Tassin
* Initial revision
185
	echo touch $$dir/chrome.manifest ; touch $$dir/chrome.manifest ; fi ; done
186
	touch $@
187
188
binary-install/$(DEB_APPNAME):: $(DEB_APPNAME)-build.stamp
189
	# There's no install system, so do it manually
87 by Fabien Tassin
* At install time, drop previously created destdir and refer to $(CURDIR)
190
	rm -rf $(CURDIR)/debian/$(DEB_APPNAME)$(DEB_SB_DIR)
191
	install -d -m 755 $(CURDIR)/debian/$(DEB_APPNAME)$(DEB_SB_DIR)
192
	( cd $(SRC_DIR)/compiled/dist ; tar cf - . ) | ( cd $(CURDIR)/debian/$(DEB_APPNAME)$(DEB_SB_DIR) ; tar xf - )
193
	install -d -m 755 $(CURDIR)/debian/$(DEB_APPNAME)/usr/share/pixmaps
194
	install -m 644 $(SRC_DIR)/app/branding/songbird-64.png $(CURDIR)/debian/$(DEB_APPNAME)/usr/share/pixmaps/$(DEB_APPNAME).png
83 by Fabien Tassin
* Install hicolor icons (32, 64, 128, 256, 512) to /usr/share/icons/hicolor
195
	for size in 32 64 128 256 512 ; do \
87 by Fabien Tassin
* At install time, drop previously created destdir and refer to $(CURDIR)
196
	  install -d -m 755 $(CURDIR)/debian/$(DEB_APPNAME)/usr/share/icons/hicolor/$${size}x$${size}/apps ; \
197
	  cp -a $(SRC_DIR)/app/branding/songbird-$$size.png $(CURDIR)/debian/$(DEB_APPNAME)/usr/share/icons/hicolor/$${size}x$${size}/apps/$(DEB_APPNAME).png ; \
83 by Fabien Tassin
* Install hicolor icons (32, 64, 128, 256, 512) to /usr/share/icons/hicolor
198
	done
1 by Fabien Tassin
* Initial revision
199
	dh_link $(DEB_SB_DIR)/$(DEB_APPNAME) usr/bin/$(DEB_APPNAME)
200
	touch debian/$(DEB_APPNAME)$(DEB_SB_DIR)/.autoreg
201
202
clean::
203
	rm -f $(GARBAGE)
204
	rm -rf .pc debian/stamp-patched
205
56 by Fabien Tassin
* Drop the code pulling xulrunner from upstream cvs and pull the patched
206
# Build the tarball by fetching SongBird trunk and some of its deps from SVN.
207
# We only take XULRunner and taglib from the vendors repository
1 by Fabien Tassin
* Initial revision
208
# Of course, we don't want to pull XULRunner in the long run, we would prefer
209
# to use the system xulrunner SDK but SongBird is not ready for this, meaning
210
# we'll need to revisit this whole rules file
211
27 by Fabien Tassin
* Update get-orig-source rule to reflect upstream reorganization.
212
SONGBIRD_SVN_URL        := http://publicsvn.songbirdnest.com/client
213
SONGBIRD_SVN_VENDOR_URL := http://publicsvn.songbirdnest.com/vendor
1 by Fabien Tassin
* Initial revision
214
21 by Fabien Tassin
* Support get-orig-source using DEBIAN_TAG=svn_tag=version
215
ifneq (,$(DEBIAN_TAG))
27 by Fabien Tassin
* Update get-orig-source rule to reflect upstream reorganization.
216
SONGBIRD_SVN        := $(SONGBIRD_SVN_URL)/tags/$(shell echo $(DEBIAN_TAG) | cut -d= -f1)
217
SONGBIRD_SVN_VENDOR := $(SONGBIRD_SVN_VENDOR_URL)/tags/$(shell echo $(DEBIAN_TAG) | cut -d= -f1)
218
else
219
SONGBIRD_SVN        := $(SONGBIRD_SVN_URL)/trunk
220
SONGBIRD_SVN_VENDOR := $(SONGBIRD_SVN_VENDOR_URL)/trunk
21 by Fabien Tassin
* Support get-orig-source using DEBIAN_TAG=svn_tag=version
221
endif
222
223
ifneq (,$(DEBIAN_TAG))
27 by Fabien Tassin
* Update get-orig-source rule to reflect upstream reorganization.
224
get-orig-source: TAG  = $(NULL)
225
get-orig-source: VTAG = $(NULL)
21 by Fabien Tassin
* Support get-orig-source using DEBIAN_TAG=svn_tag=version
226
else
27 by Fabien Tassin
* Update get-orig-source rule to reflect upstream reorganization.
227
get-orig-source: TAG  = -r $(shell svn log --limit 1 $(SONGBIRD_SVN) | grep ^r | head -1 | sed -e 's/^r\([^ ]*\).*/\1/')
228
get-orig-source: VTAG = -r $(shell svn log --limit 1 $(SONGBIRD_SVN_VENDOR) | grep ^r | head -1 | sed -e 's/^r\([^ ]*\).*/\1/')
21 by Fabien Tassin
* Support get-orig-source using DEBIAN_TAG=svn_tag=version
229
endif
1 by Fabien Tassin
* Initial revision
230
get-orig-source: gos-all
231
232
get-current-source: TAG = -r $(DEBIAN_REVISION)
27 by Fabien Tassin
* Update get-orig-source rule to reflect upstream reorganization.
233
get-current-source: VTAG = $(NULL)
1 by Fabien Tassin
* Initial revision
234
get-current-source: gos-all
235
70 by Fabien Tassin
* Rewrite get-orig-source to support a local svn branch in order to prevent a
236
DO = (echo "$(1)" ; $(1))
237
SVN_CO = \
238
	for dir in $(4) ; do \
239
	  if [ ! -d $(5)/$$dir ] ; then \
240
	    $(call DO,svn co $(1) $(2) $(3)/$$dir $(5)/$$dir) ; \
241
	  else \
242
	    $(call DO,cd $(5)/$$dir && svn up $(1) $(2)) ; \
243
	  fi \
244
	done
245
246
TTMP := tmp-$(shell echo $$$$)
247
ifeq (,$(LOCAL_BRANCH))
248
TMP := $(TTMP)
249
CO  := co
250
else
251
TMP := $(LOCAL_BRANCH)
252
CO  := update
253
endif
254
1 by Fabien Tassin
* Initial revision
255
gos-all: gos-init gos-co-songbird gos-core
256
257
gos-init:
258
	@if [ ! -e /usr/bin/svn ] ; then echo "*Stop* 'svn' missing" ; exit 1; fi
70 by Fabien Tassin
* Rewrite get-orig-source to support a local svn branch in order to prevent a
259
ifeq (,$(LOCAL_BRANCH))
1 by Fabien Tassin
* Initial revision
260
	rm -rf $(TMP)
70 by Fabien Tassin
* Rewrite get-orig-source to support a local svn branch in order to prevent a
261
endif
262
	@if [ ! -d $(TMP) ] ; then \
263
	  $(call DO,mkdir $(TMP)) ; \
264
	fi
1 by Fabien Tassin
* Initial revision
265
37 by Fabien Tassin
* Fix get-orig-source missing new dirs by making SB_CO_DIRS dynamic
266
FILTER_OUT := \
267
	dependencies \
268
	vcproj \
10 by Fabien Tassin
* Create a tarball stripped of unwanted 3rd party dependencies
269
	$(NULL)
270
37 by Fabien Tassin
* Fix get-orig-source missing new dirs by making SB_CO_DIRS dynamic
271
# All directories, except FILTER_OUT
54 by Fabien Tassin
* Make SB_CO_DIRS a recursively expanded variable instead of a simply
272
SB_CO_DIRS = $(filter-out $(FILTER_OUT),$(shell wget -qO- $(SONGBIRD_SVN_URL)/trunk/ | grep '/<' | cut -d\" -f2 | tr -d /))
37 by Fabien Tassin
* Fix get-orig-source missing new dirs by making SB_CO_DIRS dynamic
273
10 by Fabien Tassin
* Create a tarball stripped of unwanted 3rd party dependencies
274
# Only the dependencies we need
275
SB_CO_DEP_DIRS := \
39 by Fabien Tassin
* Include sources for mozbrowser/ now required
276
	taglib \
277
	mozbrowser \
56 by Fabien Tassin
* Drop the code pulling xulrunner from upstream cvs and pull the patched
278
	xulrunner \
39 by Fabien Tassin
* Include sources for mozbrowser/ now required
279
	$(NULL)
280
1 by Fabien Tassin
* Initial revision
281
gos-co-songbird:
70 by Fabien Tassin
* Rewrite get-orig-source to support a local svn branch in order to prevent a
282
	@$(call SVN_CO,-N,$(TAG),$(SONGBIRD_SVN),/,$(TMP)/trunk)
283
	@$(call SVN_CO,$(NULL),$(TAG),$(SONGBIRD_SVN),$(SB_CO_DIRS),$(TMP)/trunk)
284
	## Dependencies
77 by Fabien Tassin
* The dependencies directory was misplaced in the source tarball, update
285
	@$(call SVN_CO,-N,$(TAG),$(SONGBIRD_SVN),dependencies,$(TMP)/trunk)
70 by Fabien Tassin
* Rewrite get-orig-source to support a local svn branch in order to prevent a
286
	@$(call SVN_CO,-N,$(VTAG),$(SONGBIRD_SVN_VENDOR),/,$(TMP)/trunk/dependencies/vendor)
287
	# we take $(SB_CO_DEP_DIRS) tagged
288
	@$(call SVN_CO,$(NULL),$(VTAG),$(SONGBIRD_SVN_VENDOR),$(SB_CO_DEP_DIRS),$(TMP)/trunk/dependencies/vendor)
78 by Fabien Tassin
* mozjshttpd could not be used in SB_CO_DEP_DIRS as it must be renamed and
289
	# we also get mozjshttpd (tagged) from xulrunner/mozilla/netwerk/test/httpserver
290
	@$(call SVN_CO,$(NULL),$(VTAG),$(SONGBIRD_SVN_VENDOR)/xulrunner/mozilla/netwerk/test/httpserver,/,$(TMP)/trunk/dependencies/vendor/mozjshttpd)
70 by Fabien Tassin
* Rewrite get-orig-source to support a local svn branch in order to prevent a
291
ifneq (,$(LOCAL_BRANCH))
292
	rm -rf $(TTMP)
293
	cp -la $(TMP) $(TTMP)
294
endif
10 by Fabien Tassin
* Create a tarball stripped of unwanted 3rd party dependencies
295
	# drop win32 binaries
70 by Fabien Tassin
* Rewrite get-orig-source to support a local svn branch in order to prevent a
296
	rm -rf $(TTMP)/trunk/tools/win32
1 by Fabien Tassin
* Initial revision
297
70 by Fabien Tassin
* Rewrite get-orig-source to support a local svn branch in order to prevent a
298
gos-core: TMP = $(TTMP)
21 by Fabien Tassin
* Support get-orig-source using DEBIAN_TAG=svn_tag=version
299
ifneq (,$(DEBIAN_TAG))
300
gos-core: VERSION    = $(shell echo $(DEBIAN_TAG) | cut -d= -f2)
301
else
1 by Fabien Tassin
* Initial revision
302
gos-core: REVISION   = $(shell cd $(TMP)/trunk && svn log --xml --limit 1 | grep -E '^( *revision=|<date>)' | tr -d '\n' | \
303
		        sed -e 's/.*"\([0-9]*\)".*>\(....\)-\(..\)-\(..\)T.*/\2\3\4r\1/')
69 by Fabien Tassin
* Update get-orig-source to get the upstream version from SB_MILESTONE
304
gos-core: VERSION    = $(shell grep ^SB_MILESTONE= $(TMP)/trunk/build/sbBuildInfo.mk.in | cut -d= -f2 | sed -e 's/pre/~/' -e 's/\([^~\.0-9][^~\.0-9]*\)$$/~\1~/')svn$(REVISION)
21 by Fabien Tassin
* Support get-orig-source using DEBIAN_TAG=svn_tag=version
305
endif
56 by Fabien Tassin
* Drop the code pulling xulrunner from upstream cvs and pull the patched
306
gos-core: gos-pack-songbird gos-pack-all
1 by Fabien Tassin
* Initial revision
307
308
gos-pack-songbird:
309
	mv $(TMP)/trunk $(TMP)/$(DEB_APPNAME)
310
	@echo "# Creating $(DEB_APPNAME)-$(VERSION)-source.tar.bz2 ..."
311
	cd $(TMP) && tar jcf $(DEB_APPNAME)-$(VERSION)-source.tar.bz2 --exclude=.svn --exclude=CVS $(DEB_APPNAME)
312
	mv $(TMP)/$(DEB_APPNAME) $(TMP)/trunk
313
314
gos-pack-all:
315
	mkdir $(TMP)/$(DEB_APPNAME)-$(VERSION)
316
	mv $(TMP)/$(DEB_APPNAME)-$(VERSION)-source.tar.bz2 $(TMP)/$(DEB_APPNAME)-$(VERSION)
317
	cd $(TMP) && tar zcf ../$(DEB_APPNAME)_$(VERSION).orig.tar.gz $(DEB_APPNAME)-$(VERSION)
318
	rm -rf $(TMP)
319
	@echo "# Done (created $(DEB_APPNAME)_$(VERSION).orig.tar.gz)"
320
	@ls -l $(DEB_APPNAME)_$(VERSION).orig.tar.gz
321
56 by Fabien Tassin
* Drop the code pulling xulrunner from upstream cvs and pull the patched
322
.PHONY: get-orig-source gos-init gos-co-songbird gos-core gos-pack-songbird gos-pack-all