Skip to content

Commit

Permalink
feat: Build origami-kernel as deb package
Browse files Browse the repository at this point in the history
Signed-off-by: Rem01Gaming <Rem01_Gaming@proton.me>
  • Loading branch information
Rem01Gaming committed Jan 27, 2024
1 parent b777046 commit 3cb143e
Show file tree
Hide file tree
Showing 14 changed files with 725 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore output files
/out/
origami-kernel.deb
34 changes: 31 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ all:
@echo "make install : Install directly to your termux"
@echo "make uninstall : Uninstall from your termux"
@echo "make install-dependence : Install needed dependencines"
@echo "make pack-deb : Build deb package"
@echo "make clear : Clear generated files"

install:
cp origami-kernel $(PREFIX)/bin/$(SCRIPT_NAME)
cp ./src/origami-kernel $(PREFIX)/bin/$(SCRIPT_NAME)
mkdir $(PREFIX)/share/origami-kernel
cp -r ./init $(PREFIX)/share/origami-kernel
cp -r ./utils $(PREFIX)/share/origami-kernel
cp -r ./share/* $(PREFIX)/share/origami-kernel
chmod +x $(PREFIX)/bin/$(SCRIPT_NAME)
@echo "$(SCRIPT_NAME) installed to $(PREFIX)/bin"

Expand All @@ -43,3 +44,30 @@ uninstall:
install-dependence:
@echo "[+] Installing dependencines..."
@pkg install make fzf fzy git tsu jq

pack-deb:
@if [ ! -d $(O) ]; then mkdir -v $(O); fi
@mkdir -v $(O)/deb
@mkdir -pv $(O)/deb/data/data/com.termux/files/usr
@mkdir -pv $(O)/deb/data/data/com.termux/files/usr/bin/
@mkdir -pv $(O)/deb/data/data/com.termux/files/usr/share/origami-kernel/
@mkdir -pv $(O)/deb/data/data/com.termux/files/usr/share/origami-kernel/doc
@cp -rv share/* $(O)/deb/data/data/com.termux/files/usr/share/origami-kernel/
@cp -rv src/origami-kernel $(O)/deb/data/data/com.termux/files/usr/bin/
@cp -rv doc/ $(O)/deb/data/data/com.termux/files/usr/share/origami-kernel/doc
@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/data/data/com.termux/files/usr/bin
@chmod -Rv 777 $(O)/deb/data/data/com.termux/files/usr/bin/origami-kernel
@cd $(O)/deb&&dpkg -b . ../../origami-kernel.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: origami-kernel.deb\033[0m\n"

clear:
rm -rf ./out
674 changes: 674 additions & 0 deletions doc/LICENSE

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions dpkg-conf/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Package: origami-kernel
Architecture: all
Maintainer: Rem01Gaming
Installed-Size: 910
Version: 1.0.2
Homepage: https://github.com/Rem01Gaming/origami_kernel_manager
Depends: tsu, make, fzf, fzy, jq
Description: Yet another kernel manager.
9 changes: 9 additions & 0 deletions dpkg-conf/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/data/data/com.termux/files/usr/bin/bash

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[+] origami-kernel installed, run with sudo origami-kernel\033[0m\n"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 3cb143e

Please sign in to comment.