# vim:ts=2
# Makefile for dwww.
#
ALL_TARGET  :=
SUBDIRS     :=
include ../../common.mk

files  := dwww.xml
ifeq (Ubuntu,$(DISTRIBUTOR))
  browserdirs := /usr/lib/firefox/distribution/searchplugins/common
else
  browserdirs := /usr/share/firefox-esr/distribution/searchplugins/common \
                 /usr/share/firefox/distribution/searchplugins/common
endif

install-local: override ATT := $(AT)
install-local: override AT  :=
install-local:
	$(ATT) $(foreach browserdir,$(browserdirs),$(call install,$(browserdir),$(files)))

update-xml:
	sed -i~ -e 's#\(base64,\).*\(<\)#\1'"`base64 -w 0 dwww.png`"'\2#' dwww.xml

.PHONY: install-local update-xml
