#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/gnome.mk

DISTRIBUTOR := $(shell lsb_release -is)

# Tweak User-Agent which users might also see in the "about:" page; this is
# information disclosure, but we want the User-Agent to reflect the OS for
# stats such as Netcraft's
USERAGENT_VENDORSUB := $(DEB_UPSTREAM_VERSION) ($(DISTRIBUTOR) $(DEB_VERSION))

DEB_CONFIGURE_EXTRA_FLAGS += \
	--enable-nautilus-view=no \
	--with-mozilla=libxul-embedding-unstable \
	--with-useragent-vendorsub="$(USERAGENT_VENDORSUB)"

LDFLAGS += -Wl,-z,defs -Wl,--as-needed

common-install-indep::
	# decode new icons, replace sucky icons
	for i in $(wildcard $(CURDIR)/debian/pixmaps/*.uue); do \
	    uudecode \
	        -o $(CURDIR)/debian/tmp/usr/share/galeon/`basename $$i .uue` \
	        $$i; \
	done

binary-predeb/galeon::
	dh_xulrunner -pgaleon
