33 lines
926 B
Makefile
33 lines
926 B
Makefile
.PHONY: all clean local-install
|
|
|
|
LOGO_URL=https://duckduckgo.com/assets/common/dax-logo.svg
|
|
ICON_EXISTS=$(shell ./scripts/check-icon.py duckduckgo)
|
|
|
|
ifeq ($(ICON_EXISTS),false)
|
|
export DDG_ICON_NAME=haskal-duckduckgo
|
|
all: meta.json haskal-duckduckgo.svg
|
|
else
|
|
export DDG_ICON_NAME=duckduckgo
|
|
all: meta.json
|
|
endif
|
|
|
|
haskal-duckduckgo.svg:
|
|
curl -SsLo "$@" "$(LOGO_URL)" || wget -nv -O "$@" "$(LOGO_URL)"
|
|
|
|
meta.json:
|
|
./scripts/make-meta.py > $@
|
|
|
|
clean:
|
|
$(RM) haskal-duckduckgo* meta.json
|
|
|
|
local-install: all
|
|
mkdir -p ~/.local/share/pop-shell/launcher/duckduckgo/
|
|
cp duckduckgo_search.py ~/.local/share/pop-shell/launcher/duckduckgo/
|
|
cp meta.json ~/.local/share/pop-shell/launcher/duckduckgo/
|
|
ifeq ($(ICON_EXISTS),false)
|
|
for size in 256 128 96 64 48 32 24 16; do \
|
|
inkscape -w $$size -h $$size haskal-duckduckgo.svg -o haskal-duckduckgo.png; \
|
|
xdg-icon-resource install --size $$size haskal-duckduckgo.png; \
|
|
done
|
|
endif
|