2024-08-24 20:46:17 +02:00
|
|
|
CSS = $(shell find style -type f)
|
|
|
|
PAGES = index.html where.html pubkey.txt id.html links.html
|
|
|
|
MEDIA = $(patsubst %,media/%, \
|
2024-03-02 18:23:17 +01:00
|
|
|
bg.png bg_2x.png bg_dim.png bg_2x_dim.png kesi.png quoxtrans.png \
|
2024-08-24 20:46:17 +02:00
|
|
|
mlem.gif mlem_static.png chitter.png butterfly.png lockpen.png \
|
2024-03-02 18:23:17 +01:00
|
|
|
quobl.png quobl2.png \
|
2021-05-24 20:55:13 +02:00
|
|
|
) \
|
2024-08-24 20:46:17 +02:00
|
|
|
$(wildcard media/*.svg) $(wildcard media/flags/*) \
|
|
|
|
$(wildcard media/buttons/*) \
|
|
|
|
8831.png 8831-quox.png
|
|
|
|
MISC = $(shell find .well-known -type f)
|
|
|
|
ALL = $(CSS) $(PAGES) $(MEDIA) $(MISC)
|
2020-06-30 16:25:01 +02:00
|
|
|
|
2020-06-30 19:33:54 +02:00
|
|
|
BUILDDIR ?= _build
|
|
|
|
TMPDIR ?= _tmp
|
2020-06-30 16:25:01 +02:00
|
|
|
|
2020-06-30 19:34:20 +02:00
|
|
|
HOST ?= yummy.cricket
|
|
|
|
REMOTE_USER ?= www-data
|
|
|
|
IDFILE ?= ~/.ssh/xyz
|
|
|
|
REMOTE_DIR ?= yummy
|
2020-06-30 19:33:54 +02:00
|
|
|
|
|
|
|
all: build
|
|
|
|
|
2024-08-24 20:46:17 +02:00
|
|
|
build: $(patsubst %,$(BUILDDIR)/%,$(ALL))
|
2020-06-30 19:33:54 +02:00
|
|
|
|
2020-06-30 19:34:20 +02:00
|
|
|
upload: build
|
2021-05-24 11:41:49 +02:00
|
|
|
@rsync --recursive --partial --progress --copy-links \
|
|
|
|
--compress --human-readable --hard-links --size-only \
|
|
|
|
--delete --delete-after \
|
|
|
|
--rsh='ssh -l $(REMOTE_USER) -i $(IDFILE)' \
|
|
|
|
$(BUILDDIR)/ $(HOST):$(REMOTE_DIR)/
|
2020-06-30 19:34:20 +02:00
|
|
|
|
2020-06-30 19:33:54 +02:00
|
|
|
$(BUILDDIR)/%: %
|
2020-06-30 16:25:01 +02:00
|
|
|
@echo $*
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@cp $< $@
|
|
|
|
|
2020-06-30 19:33:54 +02:00
|
|
|
$(BUILDDIR)/%.gif: %_bg.gif
|
2020-07-02 20:06:51 +02:00
|
|
|
@echo $(notdir $@)
|
2020-07-03 20:13:03 +02:00
|
|
|
@mkdir -p $(dir $(BUILDDIR)/$* $(TMPDIR)/$*)
|
2020-06-30 19:33:54 +02:00
|
|
|
@gifsicle -U $*_bg.gif -o $(TMPDIR)/$*_bg_u.gif
|
|
|
|
@convert -transparent '#ff9bc7' $(TMPDIR)/$*_bg_u.gif $(TMPDIR)/$*_t.gif
|
|
|
|
@gifsicle --disposal=previous $(TMPDIR)/$*_t.gif -o $(BUILDDIR)/$*.gif
|
2020-06-29 02:21:02 +02:00
|
|
|
|
2020-07-02 20:13:23 +02:00
|
|
|
$(BUILDDIR)/%_small.png: %.svg
|
|
|
|
@echo $(notdir $@)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@inkscape -e $@ -h 16 $< >/dev/null
|
|
|
|
|
|
|
|
$(BUILDDIR)/%_large.png: %.svg
|
|
|
|
@echo $(notdir $@)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@inkscape -e $@ -h 30 $< >/dev/null
|
|
|
|
|
2020-07-03 20:05:52 +02:00
|
|
|
$(BUILDDIR)/%_dim.png: %.png
|
|
|
|
@echo $(notdir $@)
|
|
|
|
@convert -channel A -evaluate Multiply 0.75 $< $@
|
|
|
|
|
2022-05-30 16:49:46 +02:00
|
|
|
$(BUILDDIR)/%.GIF: %.ICO
|
|
|
|
@echo $*.GIF
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
@convert '$<[0]' $@
|
|
|
|
|
2020-06-29 02:21:02 +02:00
|
|
|
clean:
|
2020-06-30 19:33:54 +02:00
|
|
|
$(RM) -r $(TMPDIR) $(BUILDDIR)
|
2020-06-29 02:21:02 +02:00
|
|
|
|
2020-06-30 19:34:20 +02:00
|
|
|
.PHONY: clean all build upload
|