diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 35 |
1 files changed, 23 insertions, 12 deletions
@@ -6,43 +6,45 @@ PUB_DIR := /srv/www/pdp8 MUSIC_DIR := $(MEDIA_DIR)/music FLAC := $(wildcard $(MUSIC_DIR)/*/*.flac) -MP3 := $(subst flac, mp3, $(FLAC)) +MP3 := $(subst flac,mp3, $(FLAC)) IMG_DIR := $(MEDIA_DIR)/pictures WEBP_DIR := $(IMG_DIR)/webp JPEG_DIR := $(IMG_DIR)/jpeg +THUMB_DIR := $(IMG_DIR)/thumb TXT_DIR := $(IMG_DIR)/txt JPEG_IMG := $(wildcard $(JPEG_DIR)/*.jpeg) -WEBP_IMG := $(subst jpeg, webp, $(JPEG_IMG)) -TXT_IMG := $(subst jpeg, txt, $(JPEG_IMG)) +WEBP_IMG := $(subst jpeg,webp, $(JPEG_IMG)) +THUMB_IMG := $(addprefix $(THUMB_DIR)/, $(notdir $(WEBP_IMG))) +TXT_IMG := $(subst jpeg,txt, $(JPEG_IMG)) -IMG_COLLECTIONS := $(wildcard $(IMG_DIR)/collections/*) +IMG_ALBUMS := $(wildcard $(IMG_DIR)/albums/*) VIDEO_DIR := /srv/media/videos VIDEO_WEBM := $(wildcard $(VIDEO_DIR)/*/*.webm) -VIDEO_MP4 := $(subst webm, mp4, $(VIDEO_WEBM)) -VIDEO_WEBP := $(subst webm, webp, $(VIDEO_WEBM)) -VIDEO_PNG := $(subst webm, png, $(VIDEO_WEBM)) +VIDEO_MP4 := $(subst webm,mp4, $(VIDEO_WEBM)) +VIDEO_WEBP := $(subst webm,webp, $(VIDEO_WEBM)) +VIDEO_PNG := $(subst webm,png, $(VIDEO_WEBM)) CLIMBING_DIR := /srv/media/climbing CLIMBING_WEBM := $(wildcard $(CLIMBING_DIR)/*.webm) CLIMBING_MP4 := $(subst webm,mp4, $(CLIMBING_WEBM)) CLIMBING_WEBP := $(subst webm,webp, $(CLIMBING_WEBM)) -HTML := index.html music.html pictures.html videos.html climbing.html about.html code.html contact.html social/create.html social/announce.html -OTHER := pdp8.png 540px-PDP-8_.jpg style.css robots.txt sitemap.txt rss.xml +HTML := index.html music.html pictures.html videos.html climbing.html about.html code.html contact.html #social/create.html social/announce.html +OTHER := pdp8.png 540px-PDP-8_.jpg style.css sitemap.txt rss.xml TEST_HTML := $(addprefix $(TEST_DIR)/, $(HTML)) TEST_OTHER := $(addprefix $(TEST_DIR)/, $(OTHER)) PUB_HTML := $(addprefix $(PUB_DIR)/, $(HTML)) all: test - cd $(TEST_DIR); git commit -am "$$(date)"; git push; cd $(PUB_DIR); git pull + cd $(TEST_DIR)/; git commit -am "$$(date)"; git push; cd $(PUB_DIR)/; git pull test: $(TEST_HTML) $(TEST_OTHER) -pictures: $(WEBP_IMG) $(TXT_IMG) +pictures: $(WEBP_IMG) $(THUMB_IMG) $(TEST_DIR)/rss.xml: $(TEST_HTML) ./rss.rb @@ -53,11 +55,17 @@ $(TEST_DIR)/index.html: $(TEST_DIR)/music.html $(TEST_DIR)/music.html: $(MP3) ./music.rb -$(TEST_DIR)/pictures.html: $(IMG_COLLECTIONS) +$(TEST_DIR)/pictures.html: $(IMG_ALBUMS) $(WEBP_IMG) $(THUMB_IMG) ./pictures.rb $(TEST_DIR)/videos.html: $(VIDEO_MP4) $(VIDEO_WEBP) ./videos.rb + +# $(TEST_DIR)/social/create.html: +# ./social.rb create + +# $(TEST_DIR)/social/announce.html: +# ./social.rb announce $(TEST_DIR)/climbing.html: $(CLIMBING_MP4) $(CLIMBING_WEBP) ./climbing.rb @@ -86,5 +94,8 @@ $(TEST_DIR)/%.txt: ./html/%.txt $(WEBP_DIR)/%.webp: $(JPEG_DIR)/%.jpeg magick $< -resize 1536x1024 -quality 85 $@ +$(THUMB_DIR)/%.webp: $(JPEG_DIR)/%.jpeg + magick $< -resize 150x100 -quality 85 $@ + %.mp4: %.webm ffmpeg -i $< -vf scale=1280:-2 -c:v h264 -c:a aac -b:a 128k -strict -2 -movflags faststart $@ |