Readability/Makefile

40 lines
1.2 KiB
Makefile
Raw Normal View History

PROJECT = readability
VERSION = 2.0.1
FILES = $(PROJECT)/main.qml
FILES += $(PROJECT)/metadata.desktop
FILES += $(PROJECT)/LICENSE
FILES += $(PROJECT)/data/Call.js
FILES += $(PROJECT)/data/Readability.js
FILES += $(PROJECT)/data/Toolbar.js
FILES += $(PROJECT)/data/style.css
FILES += $(PROJECT)/data/icon-dark.png
FILES += $(PROJECT)/data/icon-light.png
IMAGES = $(PROJECT)/images/RM-close-hover.png
IMAGES += $(PROJECT)/images/RM-close.png
IMAGES += $(PROJECT)/images/RM-Delete-24x24.png
IMAGES += $(PROJECT)/images/RM-Minus-24x24.png
IMAGES += $(PROJECT)/images/RM-Plus-24x24.png
IMAGES += $(PROJECT)/images/RM-Type-Controls-24x24.png
IMAGES += $(PROJECT)/images/RM-Type-Controls-Arrow.svg
package: build
zip -X $(PROJECT)_v$(VERSION).zip $(FILES)
copy_license:
@cp "LICENSE" "$(PROJECT)/LICENSE"
copy_styles:
@cp "$(PROJECT)/data/style.orig.css" "$(PROJECT)/data/style.css"
build: copy_styles copy_license
$(foreach IMG,$(IMAGES), \
$(shell sed -i "s|{$(shell basename "$(IMG)")}|data:$(shell mimetype -b "$(IMG)");base64,$(shell basenc --base64 --wrap=0 "$(IMG)")|g" "$(PROJECT)/data/style.css") \
)
clean:
rm "$(PROJECT)/LICENSE"
rm "$(PROJECT)/data/style.css"
rm "./$(PROJECT)_v$(VERSION).zip"