~gyancey/firefox/firefox-alsa

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/usr/bin/make -f

MOZ_PKG_BASENAME	:= firefox

include $(CURDIR)/debian/build/config.mk

MOZ_APP			:= browser
MOZ_VENDOR		:= Mozilla
MOZ_MOZDIR		:=

MOZ_APP_SUBDIR	:= browser

MOZ_BRANDING		:= $(CHANNEL)
ifneq (,$(filter release beta, $(MOZ_BRANDING)))
MOZ_BRANDING		:= official
endif
ifeq (1,$(MOZ_FORCE_UNOFFICIAL_BRANDING))
ifneq (,$(filter official aurora, $(MOZ_BRANDING)))
MOZ_BRANDING		:= unofficial
endif
endif
MOZ_BRANDING_DIR 	:= $(MOZ_APP)/branding/$(MOZ_BRANDING)
ifeq (official,$(MOZ_BRANDING))
MOZ_BRANDING_OPTION	:= --enable-official-branding
else
MOZ_BRANDING_OPTION	:= --with-branding=$(MOZ_BRANDING_DIR)
endif

MOZ_PKGNAME_SUBST_FILES = \
	debian/usr.bin.$(MOZ_PKG_NAME) \
	debian/README.Debian \
	debian/$(MOZ_PKG_NAME)-locale.preinst \
	debian/$(MOZ_PKG_BASENAME).sh \
	debian/apport/blacklist \
	debian/apport/native-origins \
	debian/apport/source_$(MOZ_PKG_NAME).py \
	debian/testing/run_mochitest \
	debian/testing/run_reftest \
	$(NULL)

MOZ_APPNAME_SUBST_FILES = \
	debian/$(MOZ_APP_NAME).1 \
	$(NULL)

ifeq (1,${MOZ_OFFICIAL_BUILD})
export MOZILLA_OFFICIAL=1
endif
ifeq (1,${MOZ_ENABLE_TELEMETRY})
export MOZ_TELEMETRY_REPORTING=1
export MOZ_SOURCE_REPO=${MOZILLA_REPO}
export MOZ_SOURCE_CHANGESET=$(shell cat $(DEB_SRCDIR)/SOURCE_CHANGESET)
endif

include $(CURDIR)/debian/build/rules.mk

#MOZ_EXECUTABLES_$(MOZ_PKG_NAME)-testsuite =	$(MOZ_LIBDIR)/testing/run_mochitest \
						$(MOZ_LIBDIR)/testing/run_reftest \
						$(MOZ_LIBDIR)/testing/run_xpcshell_tests \
						$(MOZ_LIBDIR)/xpcshell \
						$(MOZ_LIBDIR)/testing/filter_results \
						$(NULL)

debian/usr.bin.firefox.in:
	if [ '$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)' -ge '1410' ]; then \
		cp $(CURDIR)/debian/usr.bin.firefox.apparmor.14.10 $(CURDIR)/debian/usr.bin.firefox.in ; \
	elif [ '$(DISTRIB_VERSION_MAJOR)$(DISTRIB_VERSION_MINOR)' -ge '1310' ]; then \
		cp $(CURDIR)/debian/usr.bin.firefox.apparmor.13.10 $(CURDIR)/debian/usr.bin.firefox.in ; \
	else \
		cp $(CURDIR)/debian/usr.bin.firefox.apparmor.12.04 $(CURDIR)/debian/usr.bin.firefox.in ; \
	fi

ifeq (firefox, $(MOZ_APP_NAME))
ifneq (,$(filter precise, $(DISTRIB_CODENAME)))
PLUGIN_BREAKS := flashplugin-installer (<= 11.1.102.63ubuntu1), adobe-flashplugin (<= 11.1.102.63-0precise1)
PLUGIN_CONFLICTS := gcu-plugin (<= 0.12.10-1ubuntu1)
endif
endif

WRITE_SUBSTVARS = $(shell echo "$(2)=$(3)" | sed 's/[ \t\n]\+/ /g' >> debian/$(1).substvars)

ifeq (firefox, $(MOZ_PKG_NAME))
ifeq (,$(filter precise, $(DISTRIB_CODENAME)))
install/firefox::
	$(call WRITE_SUBSTVARS,firefox,transitional:Replaces,kubuntu-firefox-installer)
else
FIREFOX_REPLACES = abrowser, abrowser-branding, firefox-branding, kubuntu-firefox-installer
FIREFOX_BREAKS = abrowser (<= 4.0~b11+build3+nobinonly-0ubuntu1), abrowser-branding (<= 4.0~b11+build3+nobinonly-0ubuntu1), \
		 firefox-branding (<= 4.0~b11+build3+nobinonly-0ubuntu1), $(PLUGIN_BREAKS)
install/firefox::
	$(call WRITE_SUBSTVARS,firefox,transitional:Replaces,$(FIREFOX_REPLACES))
	$(call WRITE_SUBSTVARS,firefox,transitional:Breaks,$(FIREFOX_BREAKS))
	$(call WRITE_SUBSTVARS,firefox,transitional:Conflicts,$(PLUGIN_CONFLICTS))
endif
endif

binary-post-install/$(MOZ_PKG_NAME):: install-distribution-searchplugins-$(MOZ_PKG_NAME)

$(patsubst %,binary-post-install/%,$(MOZ_LOCALE_PKGS)):: binary-post-install/%: install-distribution-searchplugins-%

$(patsubst %,install-distribution-searchplugins-%,$(MOZ_LOCALE_PKGS) $(MOZ_PKG_NAME)) :: install-distribution-searchplugins-% :
	@echo ""
	@echo "Installing distribution searchplugins for $*"
$(patsubst %,install-distribution-searchplugins-%,$(MOZ_LOCALE_PKGS) $(MOZ_PKG_NAME)) :: install-distribution-searchplugins-% : install-distribution-searchplugins-IMPL-%
$(patsubst %,install-distribution-searchplugins-%,$(MOZ_LOCALE_PKGS) $(MOZ_PKG_NAME)) :: install-distribution-searchplugins-% :
	@echo ""

install-distribution-searchplugins-IMPL-%:
	$(foreach lang,$(call locales_for_langpack,$*), \
		python debian/install-distribution-searchplugins.py -c debian/config/searchplugins.conf -l $(lang) -u $(firstword $(wildcard $(MOZ_DISTDIR)/xpi-stage/locale-$(lang)/browser/chrome/$(lang)/locale/browser/searchplugins) $(MOZ_DISTDIR)/bin/browser/chrome/en-US/locale/browser/searchplugins) -d debian/$*/$(MOZ_LIBDIR)/distribution/searchplugins/locale/$(lang) -s debian/searchplugins;)

make-langpack-preinsts:: $(foreach langpack,$(MOZ_LOCALE_PKGS),debian/$(langpack).preinst)
$(patsubst %,debian/%.preinst,$(MOZ_LOCALE_PKGS)) :: debian/%.preinst : debian/$(MOZ_PKG_NAME)-locale.preinst
	cp $< $@

pre-build:: make-langpack-preinsts

clean::
	rm -f debian/$(MOZ_PKG_NAME)-locale-*.preinst
	rm -f debian/usr.bin.firefox.in

.PHONY: make-langpack-preinsts