diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -20,13 +20,15 @@ EXEC = ./ DESTDIR = LDLIBS = PUBURL = public.asc.txt +FFMFLAGS = -y -hide_banner -loglevel warning +BASEURL = / .SUFFIXES: .SUFFIXES: .adoc .conf .snippets .indexentry .feedentry .sortdata .xml .txt .SUFFIXES: .htmlbody .htmlheader .htmlfooter .htmllisting .html .links .caslinks -.SUFFIXES: .categorydata .gz +.SUFFIXES: .categorydata .gz .torrent .flac .ogg .adoc.conf: mkwb conf src/global.conf $< > $@ @@ -66,6 +68,9 @@ PUBURL = public.asc.txt printf "%s\n" "_" | sha256sum | \ printf "%s\t%s\n" "`cut -d" " -f1`" "_"' > $@ +.flac.ogg: + ffmpeg $(FFMFLAGS) -i $< -ar 48000 -vn -c:a libvorbis -b:a 320k $@ + all: @@ -93,6 +98,7 @@ categories.htmllisting = $(categories.adoc:.adoc=.htmllisting) categories.txt = $(categories.adoc:.adoc=.txt) categories.xml = $(categories.adoc:.adoc=.xml) categories.xml.gz = $(categories.adoc:.adoc=.xml.gz) +sources.media.torrent = $(sources.media:=.torrent) sources = \ $(sources.adoc) \ @@ -189,6 +195,7 @@ captured-assets = \ src/content/$(PUBURL) \ src/content/favicon.ico \ src/content/favicon.png \ + $(sources.media.torrent) \ side-assets = \ src/collections/*/*/*/*/*.html.*.txt \ @@ -276,6 +283,10 @@ src/content/favicon.ico: src/content/img/favicon.svg src/content/favicon.png: src/content/img/favicon.svg convert src/content/img/favicon.svg $@ +$(sources.media.torrent): + F="`printf '%s\n' $* | cut -d/ -f3-`" && \ + mktorrent -xfd -n $(*F) -o $@ -w "https://$(NAME)$(BASEURL)$${F}" $* + email.txt: meta.json jq -r '.email' < meta.json > $@ |