-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile
40 lines (36 loc) · 1.28 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
O = out
.PHONY: all
#PREFIX = $(shell echo $$PREFIX)
PREFIX = /data/data/com.termux/files/usr
all:
@echo "Available commands:"
@echo "make install-dependence : Install needed dependencines"
@echo "make pack-deb : Build deb package"
@echo "make clear : Clear generated files"
install-dependence:
@echo "[+] Installing dependencines..."
@apt update && apt upgrade && apt install -y root-repo
@apt install -y python pixiewps wpa-supplicant tsu iw
pack-deb:
@mkdir -v $(O)
@mkdir -v $(O)/deb
@mkdir -pv $(O)/deb$(PREFIX)
@mkdir -pv $(O)/deb$(PREFIX)/bin/
@mkdir -pv $(O)/deb$(PREFIX)/share/oneshot/
@cp -rv src/oneshot $(O)/deb$(PREFIX)/bin/
@cp -rv share/* $(O)/deb$(PREFIX)/share/oneshot/
@cp -rv dpkg-conf $(O)/deb/DEBIAN
@printf "\033[1;38;2;254;228;208m[+] Build packages.\033[0m\n"&&sleep 1s
@chmod -Rv 755 $(O)/deb/DEBIAN
@chmod -Rv 755 $(O)/deb$(PREFIX)/bin
@chmod -Rv 777 $(O)/deb$(PREFIX)/bin/oneshot
@cd $(O)/deb&&dpkg -b . ../../oneshot.deb
@printf "\033[1;38;2;254;228;208m .^. .^.\n"
@printf " /⋀\\_ノ_/⋀\\ \n"
@printf " /ノソノ\\ノソ丶)|\n"
@printf " |ルリリ > )リ\n"
@printf " ノノ㇏ V ノ|ノ\n"
@printf " ⠁⠁\n"
@printf "\033[1;38;2;254;228;208m[*] Build done, package: oneshot.deb\033[0m\n"
clear:
rm -rf ./$(O)