add photos
This commit is contained in:
45
Makefile
45
Makefile
@@ -2,9 +2,8 @@ PAGES := index.html 404.html javascript.html contact.html downloads.html
|
||||
SHARED_FILES := stallman.webp stallman_2024.webp favicon.ico \
|
||||
poster_cz.webp poster_en.webp poster_cz.jpg poster_en.jpg \
|
||||
word_cloud_cz.png word_cloud_en.png background.jpg \
|
||||
moon.svg sun.svg narrow_light.svg narrow_dark.svg wide_light.svg wide_dark.svg lang_cz.svg lang_en.svg \
|
||||
styles.css icons.css \
|
||||
countdown.js theme.js lang.js
|
||||
moon.svg sun.svg narrow_light.svg narrow_dark.svg wide_light.svg wide_dark.svg \
|
||||
lang_cz.svg lang_en.svg styles.css icons.css countdown.js theme.js lang.js
|
||||
STATIC_ASSETS := jetbrains_mono.woff2 poster_cz.png poster_en.png
|
||||
SEARCH_REPLACE := lib/search_and_replace/target/release/search_and_replace
|
||||
COMPONENTS := head.html header.html nav.html footer.html
|
||||
@@ -13,11 +12,13 @@ COMPONENTS := head.html header.html nav.html footer.html
|
||||
build: $(PAGES:%=dst/cz/%) $(PAGES:%=dst/en/%) $(SHARED_FILES:%=dst/%) $(STATIC_ASSETS:%=dst/%)
|
||||
|
||||
.PHONY: pack
|
||||
pack: dst/libre_liberec.tar.gz
|
||||
pack: dst/libre_liberec.tar.gz dst/photos_talk.tar.gz dst/photos_people.tar.gz dst/photos_talk.zip \
|
||||
dst/photos_people.zip
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf dst
|
||||
rm -rf tmp
|
||||
|
||||
$(SEARCH_REPLACE): $(shell find lib/search_and_replace/src)
|
||||
cd lib/search_and_replace && cargo build --release
|
||||
@@ -90,3 +91,39 @@ dst/%.woff2: fonts/%.woff2
|
||||
|
||||
dst/libre_liberec.tar.gz: $(PAGES:%=dst/cz/%) $(PAGES:%=dst/en/%) $(SHARED_FILES:%=dst/%)
|
||||
tar --transform='s,^dst/,libre_liberec/,' -czvf $@ $^ --owner=0 --group=0
|
||||
|
||||
tmp/.anchor:
|
||||
ln -sf "$$(mktemp -d)" tmp
|
||||
touch tmp/.anchor
|
||||
|
||||
tmp/photos_%.jpg: photos/%.* tmp/.anchor
|
||||
@mkdir -p $(@D)
|
||||
magick $< -quality 85 -strip $@
|
||||
|
||||
dst/photos_talk.tar.gz: \
|
||||
$(foreach t, $(shell ls photos/talk), tmp/photos_talk/$(t))
|
||||
@mkdir -p $(@D)
|
||||
rm -f $@
|
||||
tar --transform='s,^tmp/,,' -czvf $@ \
|
||||
$$(echo $^ | tr ' ' '\n' | sort) --owner=0 --group=0
|
||||
|
||||
dst/photos_talk.zip: \
|
||||
$(foreach t, $(shell ls photos/talk), tmp/photos_talk/$(t))
|
||||
@mkdir -p $(@D)
|
||||
rm -f $@
|
||||
cd tmp && zip -r photos_talk.zip photos_talk
|
||||
mv tmp/photos_talk.zip $@
|
||||
|
||||
dst/photos_people.tar.gz: \
|
||||
$(foreach t, $(shell ls photos/people), tmp/photos_people/$(t))
|
||||
@mkdir -p $(@D)
|
||||
rm -f $@
|
||||
tar --transform='s,^tmp/,,' -czvf $@ \
|
||||
$$(echo $^ | tr ' ' '\n' | sort) --owner=0 --group=0
|
||||
|
||||
dst/photos_people.zip: \
|
||||
$(foreach t, $(shell ls photos/talk), tmp/photos_talk/$(t))
|
||||
@mkdir -p $(@D)
|
||||
rm -f $@
|
||||
cd tmp && zip -r photos_people.zip photos_people
|
||||
mv tmp/photos_people.zip $@
|
||||
|
Reference in New Issue
Block a user