yummy.cricket website https://yummy.cricket
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

60 lines
1.5 KiB

  1. FONTS = $(shell find fonts -type f)
  2. CSS = style.css where.css
  3. PAGES = index.html where.html pubkey.txt
  4. MEDIA = $(patsubst %,media/%, \
  5. bg.png bg_2x.png bg_dim.png bg_2x_dim.png \
  6. mlem.gif mlem_static.png cybre.png donphan.png types.png \
  7. niss-nisse.mp3 niss-nisse.ogg \
  8. ) \
  9. $(wildcard media/*.svg)
  10. BUILDDIR ?= _build
  11. TMPDIR ?= _tmp
  12. HOST ?= yummy.cricket
  13. REMOTE_USER ?= www-data
  14. IDFILE ?= ~/.ssh/xyz
  15. REMOTE_DIR ?= yummy
  16. all: build
  17. build: $(patsubst %,$(BUILDDIR)/%,$(FONTS) $(CSS) $(PAGES) $(MEDIA))
  18. upload: build
  19. @rsync --recursive --partial --progress --copy-links \
  20. --compress --human-readable --hard-links --size-only \
  21. --delete --delete-after \
  22. --rsh='ssh -l $(REMOTE_USER) -i $(IDFILE)' \
  23. $(BUILDDIR)/ $(HOST):$(REMOTE_DIR)/
  24. $(BUILDDIR)/%: %
  25. @echo $*
  26. @mkdir -p $(dir $@)
  27. @cp $< $@
  28. $(BUILDDIR)/%.gif: %_bg.gif
  29. @echo $(notdir $@)
  30. @mkdir -p $(dir $(BUILDDIR)/$* $(TMPDIR)/$*)
  31. @gifsicle -U $*_bg.gif -o $(TMPDIR)/$*_bg_u.gif
  32. @convert -transparent '#ff9bc7' $(TMPDIR)/$*_bg_u.gif $(TMPDIR)/$*_t.gif
  33. @gifsicle --disposal=previous $(TMPDIR)/$*_t.gif -o $(BUILDDIR)/$*.gif
  34. $(BUILDDIR)/%_small.png: %.svg
  35. @echo $(notdir $@)
  36. @mkdir -p $(dir $@)
  37. @inkscape -e $@ -h 16 $< >/dev/null
  38. $(BUILDDIR)/%_large.png: %.svg
  39. @echo $(notdir $@)
  40. @mkdir -p $(dir $@)
  41. @inkscape -e $@ -h 30 $< >/dev/null
  42. $(BUILDDIR)/%_dim.png: %.png
  43. @echo $(notdir $@)
  44. @convert -channel A -evaluate Multiply 0.75 $< $@
  45. clean:
  46. $(RM) -r $(TMPDIR) $(BUILDDIR)
  47. .PHONY: clean all build upload