-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile
27 lines (24 loc) · 862 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
IDFULL=$(shell cargo pkgid --offline)
ID=$(lastword $(subst #, ,$(IDFULL)))
WINNAME=ttdl_$(ID)_win_x64.zip
LINNAME=ttdl_$(ID)_linux-x64-musl.tar.gz
.PHONY: pkg-win pkg-musl
pkg-win:
@echo Creating windows package: $(WINNAME)...
ifneq ("$(wildcard $(WINNAME))", "")
$(error "$(WINNAME) already exists")
endif
7z a "$(WINNAME)" -tzip .\target\release\ttdl.exe .\README.md .\changelog .\LICENSE .\ttdl.toml
pkg-musl:
@echo Creating linux musl package: $(LINNAME)...
ifneq ("$(wildcard $(LINNAME))", "")
$(error "$(LINNAME) already exists")
endif
rm -rf ./target/pkg
mkdir ./target/pkg
cp ./README.md ./target/pkg/
cp ./changelog ./target/pkg/
cp ./LICENSE ./target/pkg/
cp ./ttdl.toml ./target/pkg/
cp ./target/x86_64-unknown-linux-musl/release/ttdl ./target/pkg/
cd ./target/pkg && tar -czvf "$(LINNAME)" ttdl README.md changelog ttdl.toml LICENSE