This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
md-pdf-rs/Makefile

48 lines
1.3 KiB
Makefile
Raw Normal View History

2017-08-27 22:17:07 +01:00
LIB_DIR=lib
PANDOC_VERSION=1.19.2.1
WKTOX_VERSION=0.12.4
PANDOC_DL=pandoc-${PANDOC_VERSION}-1-amd64.deb
WKTOX_DL=wkhtmltox-${WKTOX_VERSION}_linux-generic-amd64.tar.xz
2017-08-27 22:25:06 +01:00
build:
@cargo build
cp $(LIB_DIR)/* target/debug/
release:
@cargo build --release
cp $(LIB_DIR)/* target/release/
2017-08-27 22:17:07 +01:00
lib_path:
@rm -rf $(LIB_DIR)
@mkdir -p $(LIB_DIR)
2017-09-01 09:19:30 +01:00
@sudo rm -f /usr/lib/libsciter-gtk-64.so
2017-08-27 22:17:07 +01:00
pandoc: lib_path
wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/${PANDOC_DL} -O $(LIB_DIR)/$(PANDOC_DL)
ar p $(LIB_DIR)/$(PANDOC_DL) data.tar.gz | tar xz --strip-components 2 -C $(LIB_DIR)
mv $(LIB_DIR)/bin/* $(LIB_DIR)
cd $(LIB_DIR) && rm -r bin/ share/ $(PANDOC_DL)
wktox: lib_path
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/${WKTOX_VERSION}/${WKTOX_DL} -O $(LIB_DIR)/$(WKTOX_DL)
tar -xJf $(LIB_DIR)/$(WKTOX_DL) -C $(LIB_DIR)
mv $(LIB_DIR)/wkhtmltox/lib/* $(LIB_DIR)
cd $(LIB_DIR) && rm -r wkhtmltox/ $(WKTOX_DL)
2017-08-31 09:29:14 +01:00
sciter: lib_path
wget https://sciter.com/sdk/sciter-sdk.zip -O $(LIB_DIR)/sciter.zip
2017-08-31 19:05:49 +01:00
unzip -j $(LIB_DIR)/sciter.zip "bin.gtk/libsciter-gtk-64.so" -d $(LIB_DIR)
2017-09-01 09:19:30 +01:00
sudo ln -sfP $(PWD)/$(LIB_DIR)/libsciter-gtk-64.so /usr/lib/libsciter-gtk-64.so
2017-08-31 09:29:14 +01:00
rm $(LIB_DIR)/sciter.zip
lib: pandoc wktox sciter
2017-08-27 22:17:07 +01:00
2017-08-27 22:26:50 +01:00
test:
cargo test
cargo test --release
2017-08-27 22:25:06 +01:00
.PHONY: build pandoc lib_path wktox