-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
85 lines (71 loc) · 2.02 KB
/
Makefile.toml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# [tasks.myclean]
# description = "Clean previous build files"
# script = [
# "rm -f packages/* | tr '\n' ','"
# ]
[tasks.myclean]
description = "Clean previous build files"
command = "cargo"
args = ["clean"]
[tasks.linux_build]
description = "Build for linux"
script = [
"cargo build --release",
"strip -s target/release/zr-alshasha",
]
[tasks.rpm_build]
description = "Build RPM"
install_crate = "cargo-generate-rpm"
dependencies = ["linux_build"]
command = "cargo"
args = ["generate-rpm"]
[tasks.deb_build]
description = "Build DEB"
install_crate = "cargo-deb"
command = "cargo"
args = ["deb"]
[tasks.aur_build]
description = "Build tarbell and PKGBUILD"
install_crate = "cargo-aur"
dependencies = ["linux_build"]
command = "cargo"
args = ["aur"]
[tasks.windows_build]
description = "Build for windows"
command = "cargo"
args = ["build", "--release", "--target", "x86_64-pc-windows-gnu"]
[tasks.package_linux]
description = "Add the linux binary to the packages directory"
dependencies = ["linux_build"]
script = [
"mv -f target/release/zr-alshasha packages/zr-alshasha-linux-x64-86"
]
[tasks.package_deb]
description = "Add the deb package to the packages directory"
dependencies = ["deb_build"]
script = [
"mv -f target/debian/*.deb packages/"
]
[tasks.package_rpm]
description = "Add the rpm package to the packages directory"
dependencies = ["rpm_build"]
script = [
"mv -f target/generate-rpm/*.rpm packages/"
]
[tasks.package_aur]
description = "Add the rpm package to the packages directory"
dependencies = ["aur_build"]
script = [
"mv -f PKGBUILD packages/",
"mv -f *.tar.gz packages/"
]
[tasks.package_windows]
description = "Package ffmpeg and yt-dlp and compress it with the app binary for windows"
dependencies = ["windows_build"]
script = [
"mkdir -p windows",
"mv -f target/x86_64-pc-windows-gnu/release/zr-alshasha.exe windows",
"zip -rj packages/zr-alshasha-windows-64.zip windows/*"
]
[tasks.packages]
dependencies = ["myclean", "package_rpm", "package_deb", "package_aur", "package_linux", "package_windows"]